[docs]classSouthAfrica(CountryTestBase):location:str="South Africa"source_url:str="https://raw.githubusercontent.com/dsfsi/covid19za/master/data/covid19za_timeline_testing.csv"units:str="people tested"source_label:str="National Institute for Communicable Diseases (NICD)"source_url_ref:str="https://github.com/dsfsi/covid19za"notes:str="Made available by the University of Pretoria on Github"rename_columns={"YYYYMMDD":"Date","cumulative_tests":"Cumulative total",}
[docs]defpipe_add_datapoint(self,df:pd.DataFrame)->pd.DataFrame:# Hard-coded first point for 7 February 2020, missing from GitHubdatapoint={"Date":"2020-02-07","Country":self.location,"Units":self.units,"Cumulative total":42,"Source label":self.source_label,"Source URL":"https://www.nicd.ac.za/novel-coronavirus-update","Notes":pd.NA,}returndf.append(datapoint,ignore_index=True)