コード例 #1
0
 def pipe_add_vaccines(self, df: pd.DataFrame) -> pd.DataFrame:
     schedule = {
         "Pfizer/BioNTech": "2020-12-01",
         "Moderna": "2020-12-23",
         "Johnson&Johnson": "2021-03-05",
     }
     return build_vaccine_timeline(df, schedule)
コード例 #2
0
 def pipe_add_vaccines(self, df: pd.DataFrame) -> pd.DataFrame:
     return build_vaccine_timeline(
         df,
         {
             "Sinovac": "2021-02-22",
             "Pfizer/BioNTech": "2021-03-06",
         },
     )
コード例 #3
0
 def pipe_metadata(self, df: pd.DataFrame) -> pd.DataFrame:
     # Metadata
     df = df.assign(location=self.location, source_url=self.source_url)
     # Add vaccines
     return build_vaccine_timeline(
         df,
         self.vax_timeline,
     )
コード例 #4
0
 def pipe_vaccine(self, df: pd.DataFrame, vax_timeline):
     dfs = []
     locations = df.location.unique()
     for location in locations:
         df_c = df[df.location == location]
         df_c = build_vaccine_timeline(df_c, vax_timeline[location])
         dfs.append(df_c)
     return pd.concat(dfs, ignore_index=True)
コード例 #5
0
 def pipe_vaccine(self, df: pd.DataFrame) -> pd.DataFrame:
     vax_timeline = {
         "Oxford/AstraZeneca": "2021-02-26",
         "Pfizer/BioNTech": "2021-02-27",
         "Moderna": "2021-06-18",
         "Johnson&Johnson": "2021-06-10",
         "Novavax": "2022-02-14",
     }
     return build_vaccine_timeline(df, vax_timeline)
コード例 #6
0
ファイル: portugal.py プロジェクト: LimLim0a0/covid-19-data
 def pipe_vaccine(self, df: pd.DataFrame) -> pd.DataFrame:
     return build_vaccine_timeline(
         df,
         {
             "Pfizer/BioNTech": "2020-01-01",
             "Moderna": "2021-02-09",
             "Oxford/AstraZeneca": "2021-02-09",
             "Johnson&Johnson": "2021-04-26",
         },
     )
コード例 #7
0
 def pipe_vaccine(self, df: pd.DataFrame) -> pd.DataFrame:
     df = build_vaccine_timeline(
         df,
         {
             "Sinopharm/Beijing": "2021-01-01",
             "Oxford/AstraZeneca": "2021-03-29",
             "Sinovac": "2021-03-30",
             "Sputnik V": "2021-06-11",
         },
     )
     return df
コード例 #8
0
 def pipe_vaccine(self, df: pd.DataFrame) -> pd.DataFrame:
     return build_vaccine_timeline(
         df,
         {
             "Sputnik V": "2021-01-01",
             "Oxford/AstraZeneca": "2021-04-04",
             "Sinopharm/Beijing": "2021-04-04",
             "Pfizer/BioNTech": "2021-05-04",
             "Johnson&Johnson": "2021-08-24",
         },
     )
コード例 #9
0
ファイル: ukraine.py プロジェクト: LimLim0a0/covid-19-data
 def pipe_vaccine(self, df: pd.DataFrame) -> pd.DataFrame:
     df = build_vaccine_timeline(
         df,
         {
             "Oxford/AstraZeneca": "2021-01-01",
             "Sinovac": "2021-04-14",
             "Pfizer/BioNTech": "2021-04-18",
             "Johnson&Johnson": "2021-05-22",
             "Moderna": "2021-07-23",
         },
     )
     return df
コード例 #10
0
ファイル: argentina.py プロジェクト: LimLim0a0/covid-19-data
 def pipe_vaccine(self, df: pd.DataFrame):
     return build_vaccine_timeline(
         df,
         {
             "Sputnik V": "2020-12-29",
             "Sinopharm/Beijing": "2021-03-08",
             "Oxford/AstraZeneca": "2021-03-08",
             "Moderna": "2021-08-03",
             "CanSino": "2021-09-09",
             "Pfizer/BioNTech": "2021-09-17",
         },
     )
コード例 #11
0
ファイル: canada.py プロジェクト: LimLim0a0/covid-19-data
 def pipe_metadata(self, df: pd.DataFrame):
     df = df.assign(
         location=self.location,
         source_url=self.source_url_ref,
         vaccine="Moderna, Oxford/AstraZeneca, Pfizer/BioNTech",
     )
     df = build_vaccine_timeline(
         df,
         {
             "Moderna": "2021-01-02",
             "Oxford/AstraZeneca": "2021-03-13",
             "Pfizer/BioNTech": "2020-12-01",
             "Johnson&Johnson": "2021-07-17",
         },
     )
     return df
コード例 #12
0
 def pipe_vaccine(self, df: pd.DataFrame) -> pd.DataFrame:
     df = build_vaccine_timeline(df, self.vax_timeline)
     return df
コード例 #13
0
ファイル: germany.py プロジェクト: LimLim0a0/covid-19-data
 def enrich_vaccine(self, df: pd.DataFrame) -> pd.DataFrame:
     vax_timeline = self._vaccine_start_dates(df)
     return build_vaccine_timeline(df, vax_timeline)
コード例 #14
0
ファイル: romania.py プロジェクト: LimLim0a0/covid-19-data
 def pipe_vaccines(self, df: pd.DataFrame) -> pd.DataFrame:
     return build_vaccine_timeline(df, self.vaccine_timeline)
コード例 #15
0
 def pipe_vaccine(self, df: pd.DataFrame) -> pd.DataFrame:
     """Builds the vaccine timeline."""
     return build_vaccine_timeline(df, self.vaccines_start_date)