Beispiel #1
0
 def export(self):
     data = self.read()
     increment(
         count=data["count"],
         sheet_name=self.location,
         country=self.location,
         units=self.units,
         date=data["date"],
         source_url=self.source_url,
         source_label=self.source_label,
     )
Beispiel #2
0
 def export(self):
     data = self._parse_data()
     increment(
         daily_change=data["count"],
         sheet_name=self.location,
         country=self.location,
         units=self.units,
         date=data["date"],
         source_url=self.source_url,
         source_label=self.source_label,
     )
Beispiel #3
0
 def export(self):
     data = self.read()
     increment(
         sheet_name=self.location,
         country=self.location,
         units=self.units,
         date=data["date"],
         source_url=data["source_url"],
         source_label=self.source_label,
         daily_change=data["daily_change"],
     )
Beispiel #4
0
 def export(self):
     """Export data to csv."""
     data = self.read()
     increment(
         sheet_name=self.location,
         country=self.location,
         units=self.units,
         date=data["date"],
         source_url=data["source_url"],
         source_label=self.source_label,
         count=data["count"],
     )
Beispiel #5
0
 def increment_countries(self, df: pd.DataFrame):
     for row in df.sort_values("location").iterrows():
         row = row[1]
         country = row["location"]
         # print(country, row["Cumulative total"])
         notes = ACDC_COUNTRIES[country].get("notes", self.notes)
         units = ACDC_COUNTRIES[country].get("units", self.units)
         increment(
             count=row["Cumulative total"],
             sheet_name=country,
             country=country,
             units=units,
             date=row["date"],
             source_url=self.source_url_ref,
             source_label=self.source_label,
             notes=notes,
         )