Warning

Important: This is the documentation of code no longer in active development. This is the link to the current docs: covid19-inference

Data Retrieval

covid19_inference.data_retrieval.get_jhu_confirmed_cases()[source]

Attempts to download the most current data from the online repository of the Coronavirus Visual Dashboard operated by the Johns Hopkins University and falls back to the backup provided with our repo if it fails. Only works if the module is located in the repo directory.

Returns:confirmed_cases – pandas table with confirmed cases
covid19_inference.data_retrieval.get_jhu_deaths()[source]

Attempts to download the most current data from the online repository of the Coronavirus Visual Dashboard operated by the Johns Hopkins University and falls back to the backup provided with our repo if it fails. Only works if the module is located in the repo directory.

Returns:deaths – pandas table with reported deaths
covid19_inference.data_retrieval.filter_one_country(data_df, country, begin_date, end_date)[source]

Returns the number of cases of one country as a np.array, given a dataframe returned by get_jhu_confirmed_cases :param data_df: :type data_df: pandas.dataframe :param country: :type country: string :param begin_date: :type begin_date: datetime.datetime :param end_date: :type end_date: datetime.datetime

Returns:array