Esempio n. 1
0
 def cases(self) -> pd.DataFrame:
     raw_cases = self.raw_cases()
     cases = transformations.add_both_sexes(raw_cases)
     cases = transformations.rescale(
         cases, self._reference_data.query(f'ISO == "{ISO}"'), 'cases_new')
     cases['ISO'] = ISO
     return cases
Esempio n. 2
0
 def cases(self) -> pd.DataFrame:
     cases = self.raw_cases()
     cases = transformations.add_both_sexes(cases)
     cases = transformations.cumulative_to_new(cases)
     cases = transformations.periodic_to_daily(cases)
     cases['ISO'] = ISO
     return cases
Esempio n. 3
0
 def cases(self) -> pd.DataFrame:
     cases = self.raw_cases()
     cases = transformations.ensure_contiguous(cases)
     cases = transformations.cumulative_to_new(cases)
     cases = transformations.add_both_sexes(cases)
     cases = cases.query('Date > "2020-03-25"')
     cases['ISO'] = ISO
     return cases
Esempio n. 4
0
 def deaths(self) -> pd.DataFrame:
     raw_deaths = self.raw_deaths()
     deaths = transformations.add_both_sexes(raw_deaths)
     deaths = transformations.rescale(
         deaths, self._reference_data.query(f'ISO == "{ISO}"'),
         'deaths_new')
     deaths['ISO'] = ISO
     return deaths
Esempio n. 5
0
 def deaths(self) -> pd.DataFrame:
     deaths = self.raw_deaths()
     deaths = transformations.ensure_contiguous(deaths)
     deaths = transformations.add_both_sexes(deaths)
     deaths = transformations.smooth_sample(deaths, rolling_window=5)
     deaths = transformations.rescale(
         deaths, self._reference_data.query('ISO == "CAN"'), 'deaths_new')
     deaths['ISO'] = ISO
     return deaths
Esempio n. 6
0
 def cases(self) -> pd.DataFrame:
     cases = self.raw_cases()
     cases = transformations.ensure_contiguous(cases)
     cases = transformations.add_both_sexes(cases)
     cases = transformations.smooth_sample(cases, rolling_window=5)
     cases = transformations.rescale(
         cases, self._reference_data.query('ISO == "CAN"'), 'cases_new')
     cases['ISO'] = ISO
     return cases
 def cases(self) -> pd.DataFrame:
     raw_cases = self.raw_cases()
     cases = transformations.ensure_contiguous(raw_cases)
     cases = transformations.add_both_sexes(cases)
     cases['ISO'] = ISO
     return cases
Esempio n. 8
0
 def deaths(self) -> pd.DataFrame:
     deaths = self.raw_deaths()
     deaths = transformations.add_both_sexes(deaths)
     deaths['ISO'] = ISO
     return deaths
Esempio n. 9
0
 def cases(self) -> pd.DataFrame:
     cases = self.raw_cases()
     cases = transformations.add_both_sexes(cases)
     cases['ISO'] = ISO
     return cases