def update_backup(self): day_after = self.df_fra_backup.index[-1] + pandas.Timedelta(1, unit='d') self.df_fra_backup = pandas.concat([ self.df_fra_backup.loc[:, ['cases']], self.df_fra_nat.loc[day_after:, ['cases']] ]) df_fct.export_df([['Fra_Backup', self.df_fra_backup]], ['raw'])
def main(self): self.clean_up_CountryLatLong() self.clean_up_WorldShp() self.clean_up_pop_World() self.append_data_world() df_fct.export_df([['World_pop', self.World_pop]], ['processed']) return self.World_JH
def main(self): self.clean_up_testing_1() self.clean_up_testing_2() self.concat_testing() df_fct.export_df([['Fra_Testing', self.fra_testing]], ['processed']) return self.fra_testing
def main(self): self.clean_up_USShp() self.clean_up_pop_US() self.clean_up_data_US() self.df_us = self.append_data('df_us', 'US_States_shapefile', 'US_pop') self.df_us = self.rel_values('df_us') df_fct.export_df([['US_pop', self.US_pop]], ['processed']) return self.df_us
def main(self): self.indic_nat() self.indic_dpt() df_fct.export_df([['Fra_Indic_Nat', self.df_indic_nat], ['Fra_Indic_Dpt_graph', self.df_indic_dpt_graph]], ['processed', 'processed']) return self.df_indic_dpt_map
def main(self): self.clean_up_nat() self.clean_up_reg() self.clean_up_dpt() df_fct.export_df( [['Fra_Nat', self.df_fra_nat], ['Fra_Reg', self.df_fra_reg], ['Fra_Dpt', self.df_fra_dpt], ['Fra_Backup', self.df_fra_backup]], ['processed', 'processed', 'processed', 'processed'])
def main(self, period, center): self.import_db() self.clean_up_JH() #self.clean_up_Fra_gen () self.ajust_values() self.complete_data() self.smooth(period, center) self.remove_neg_val() df_fct.export_df([['World_JH', self.df_world]], ['processed']) return self.df_world
def clean_up_nat_v2(self): self.df_fra_nat_v2 = self.df_fra_test[0] self.df_fra_nat_v2.loc['jour'] = pandas.to_datetime( self.df_fra_nat_v2['jour'], format='%Y-%m-%d') self.df_fra_nat_v2 = self.df_fra_nat_v2[self.df_fra_nat_v2['cl_age90'] == 0] self.df_fra_nat_v2 = self.df_fra_nat_v2.set_index( pandas.DatetimeIndex(self.df_fra_nat_v2['jour'])) self.df_fra_nat_v2 = self.df_fra_nat_v2[['P', 'T']] self.df_fra_nat_v2.index = self.df_fra_nat_v2.index.rename('date') self.df_fra_nat_v2 = self.df_fra_nat_v2.rename(columns={ 'P': 'cases', 'T': 'tests' }) df_fct.export_df([ ['Fra_Nat_v2', self.df_fra_nat_v2], ], [ 'processed', ])
def main(self): self.clean_up_testing() df_fct.export_df([['US_Testing', self.us_testing]], ['processed']) return self.us_testing
def main(self): self.clean_up_vax() df_fct.export_df([['Fra_Vax', self.data_vax]], ['processed']) return self.data_vax