[docs]defread(self)->pd.DataFrame:df=pd.read_excel(self.source_url)check_known_columns(df,["Date","Nombre de dose 1","Nombre de dose 2","Nombre de Dose complémentaire par rapport à schéma complet","Nombre total de doses",],)returndf
[docs]defpipe_rename_columns(self,df:pd.DataFrame)->pd.DataFrame:returndf.rename(columns={"Date":"date","Nombre de dose 1":"people_vaccinated","Nombre de dose 2":"people_fully_vaccinated","Nombre de Dose complémentaire par rapport à schéma complet":"total_boosters","Nombre total de doses":"total_vaccinations",})
[docs]defpipe_correct_time_series(self,df:pd.DataFrame)->pd.DataFrame:""" Since 2021-04-14 Luxembourg is using J&J, therefore dose2 == people_fully_vaccinated no longer works. As a temporary fix while they report the necessary data, we're inserting one PDF report to avoid showing an old value for people_fully_vaccinated in dashboard that re-use our latest totals without showing how old they are. The publisher was contacted on 2021-O9-21 https://twitter.com/redouad/status/1439992459166158857 """df.loc[df.date>="2021-04-14","people_fully_vaccinated"]=pd.NAdf=add_latest_who_values(df,"Luxembourg",["people_fully_vaccinated"])returndf