task_geo.data_sources.covid.fr_covidata.fr_covidata module¶
fr_covidata.py
- Functions:
fr_covidata_connector: Extracts data from CSV URL
fr_covidata_formatter: Cleans CSV data
fr_covidata: Combines the two previous functions
- Data Credits:
OpenCOVID19-fr https://www.data.gouv.fr/en/datasets/chiffres-cles-concernant-lepidemie-de-covid19-en-france/ https://github.com/opencovid19-fr/data
Functions
Data Source for the French COVID-19 Data. |
|
Extract data from OpenCOVID19-fr’s Github repository. |
|
|
Formatter for FR COVID-19 Data. |
-
task_geo.data_sources.covid.fr_covidata.fr_covidata.
fr_covidata
()[source]¶ Data Source for the French COVID-19 Data. :param None:
- Returns
pandas.DataFrame
-
task_geo.data_sources.covid.fr_covidata.fr_covidata.
fr_covidata_connector
()[source]¶ Extract data from OpenCOVID19-fr’s Github repository. Description:
Downloads the URL’s data in a Unicode CSV Format
Unicode CSV Format: ACS 5Y UTF-8
- Returns
dataset (DataFrame with CSV Data)
-
task_geo.data_sources.covid.fr_covidata.fr_covidata.
fr_covidata_formatter
(dataset)[source]¶ Formatter for FR COVID-19 Data. :param dataset: Data as returned by fr_covidata_connector. :type dataset: pandas.DataFrame
- Description:
Drop unnecessary rows with irrelevant regions’ info and only keep
info related to subregions in Metropolitan France, as well as repetitive data - Check the dataset for instances where there are more than one source of data in the same subregion for the same date, then complement all the sources information, and take the highest value in case there are different values for the same column, while aggregating the sources info - Rename/Translate the column titles, and add a country column (France)
- Returns
frcovidata(pandas.DataFrame)