[docs]classLiechtenstein(CountryTestBase):location="Liechtenstein"units="tests performed"source_url=("https://www.covid19.admin.ch/api/data/20220112-m4gbccen/sources/COVID19Test_geoRegion_PCR_Antigen.json")source_url_ref="https://opendata.swiss/en/dataset/covid-19-schweiz"source_label="Federal Office of Public Health"rename_columns={"datum":"Date","entries":"Daily change in cumulative total"}
[docs]defpipe_groupby(self,df:pd.DataFrame)->pd.DataFrame:returndf.groupby("Date",as_index=False)[["Daily change in cumulative total","entries_pos"]].sum()
[docs]defpipe_positive_rate(self,df:pd.DataFrame)->pd.DataFrame:df["Positive rate"]=(df.entries_pos.rolling(7).mean()/df["Daily change in cumulative total"].rolling(7).mean()).round(3)returndf