Skip to content

Python scripts for collecting historical case numbers of the spread of COVID-19 in Germany from Robert Koch Institut.

Notifications You must be signed in to change notification settings

milanowicz/COVID-19-RKI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COVID-19 case numbers from Robert Koch-Institut in Germany

Python scripts for collecting historical case numbers of the spread of COVID-19 in Germany from Robert Koch-Institut. https://www.rki.de/DE/Content/InfAZ/N/Neuartiges_Coronavirus/Fallzahlen.html

Data is updated on a daily basis and published in a csv file here: https://github.com/Milanowicz/COVID-19-Dataset/blob/master/data/rki/time_series_confirmed_and_death.csv

Description of columns

StateDateConfirmedDeaths
Name of federal state (German Bundesland) Date in %Y-%m-%d format Numbers of confirmed cases Numbers of deaths

Dataset rki_data.csv

Install Python environment

Create environment and install Python libs for a GNU/Linux operation system:

$ . env.sh
$ pip3 install pandas numpy BeautifulSoup4 cloudscraper requests lxml

Usage from Python scripts

Python script for downloading current case numbers from the RKI server:

rki_get_cases.py

Python script combine cases to one single csv file with the following structure:

rki_merge_cases.py

or execute by this shell script:

$ . update.sh

The Robert-Koch-Institut frequently changes the structure of the data table. This script tackles resulting problems with the historical csvs to fit the new structure.

clean_archive.py

About

Python scripts for collecting historical case numbers of the spread of COVID-19 in Germany from Robert Koch Institut.

Topics

Resources

Stars

Watchers

Forks

Languages

  • Python 96.4%
  • Shell 3.6%