Skip to content

SARS-CoV-2 infection data (from the official dashboard) published by the city of Dresden

License

Notifications You must be signed in to change notification settings

jdieg0/coronavirus-dresden-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coronavirus Dresden Data

Go to data collection code License Last commit

The present raw data is published daily around midday by the city of Dresden. This is the data set that the city uses for its official dashboard.

There is no history of the data from the city side, as the same data set, which is offered for download, is always overwritten by the daily updated state of data.

This repository contains up-to-the-minute data, which I have been recording since 18.10.2020 in the course of developing my own SARS-CoV-2 dashboard. On the project site you will also find further information on how you can keep track of the data changes yourself.

Note After more than two years, the active maintenance of this data collection project ended on 04/26/2023. Thanks to all who have accompanied and actively supported this project throughout that time! ❤️

Data source and license

The data sets are obtained from the following source:

The Data is available under an open licence compatible with CC-BY: Landeshauptstadt Dresden, dl-de/by-2-0, opendata.dresden.de.

Files

The data is archived in two different JSON styles in this repo:

  • Under /json are the JSON files without line breaks and indentations, which can potentially be processed faster.
  • Under /pjson there is "pretty printed" JSON, which is human-readable and more convenient for browsing and debugging.

The version of the JSON files is stored in the file name as an ISO-8601 (UTC) date, that is, in the form:

YYYY-MM-DDThhmmssZ.json

The date is the time of detection and download of a new data set. Every minute a cronjob searches for modifications, i.e. the data set was usually updated by the city within the minute before.

Processing the data

„Coronavirus Dresden“ Python script + InfluxDB

The same script I use to collect the data can also be used to import the JSON files into InfluxDB. From there it can be processed and visualised using the SQL-like query language InfluxQL and, for instance, Grafana.

Installation instructions can be found on the Coronavirus Dresden project site.

Usage

When everything is set up, the JSON file can be read and written to InfluxDB with the following command:

python collect.py --file YYYY-MM-DDThhmmssZ.json

If you want to import a file without a valid ISO-8601 timestamp or if you want to use a different date, you can pass it along with:

python collect.py --file file.json --date YYYY-MM-DDThhmmssZ

To use the current date and ignore the file name, type:

python collect.py --file file.json --auto-date

Note that the script uses a cache file to track changes. If you have previously imported the same file, you must force the import with

python collect.py --file YYYY-MM-DDThhmmssZ.json --force-collect

or prevent the saving of a cache file during the initial import:

python collect.py --file YYYY-MM-DDThhmmssZ.json --no-cache

To display all data collection options, type:

python collect.py --help

About

SARS-CoV-2 infection data (from the official dashboard) published by the city of Dresden

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •