memilio.epidata.getJHData
getJHData.py
Download data from John Hopkins University
Functions
|
Download data from John Hopkins University |
|
Main program entry. |
- memilio.epidata.getJHData.get_jh_data(
- read_data=False,
- file_format='json_timeasstring',
- out_folder='/home/docs/checkouts/readthedocs.org/user_builds/memilio/data/',
- start_date=datetime.date(2020, 1, 22),
- end_date=datetime.date(2026, 5, 11),
- impute_dates=False,
- **kwargs,
Download data from John Hopkins University
Data is either downloaded and afterwards stored or loaded from a stored filed. The file is “FullData_JohnHopkins.json”
Working with the data includes - rename columns such that “/” is deleted, e.g Country/Region becomes CountryRegion - data of all countries together are written to a file - download the data from following countries in a separate file and are stored in the according folders with the country name - Germany, SouthKorea, Spain, France, Italy, US, China - furthermore, all countries, for which provinces are added, are written to a file
- Parameters:
read_data – True or False. Defines if data is read from file or downloaded. Default defined in defaultDict. (Default value = dd.defaultDict[‘read_data’])
file_format – File format which is used for writing the data. Default defined in defaultDict. (Default value = dd.defaultDict[‘file_format’])
out_folder – Folder where data is written to. Default defined in defaultDict. (Default value = dd.defaultDict[‘out_folder’])
start_date – Date of first date in dataframe. Default defined in defaultDict. (Default value = date(2020, 1, 22))
end_date – Date of last date in dataframe. Default defined in defaultDict. (Default value = dd.defaultDict[‘end_date’])
impute_dates – Currently not used] True or False. Defines if values for dates without new information are imputed. Default defined in defaultDict. (Default value = dd.defaultDict[‘impute_dates’])
**kwargs –
- memilio.epidata.getJHData.main()
Main program entry.