Skip to content
COVID19 case numbers Cantons of Switzerland and Principality of Liechtenstein (FL) - case numbers include persons tested in the respective area. The data is updated at best once a day (times of collection and update may vary). Start with the README.
Python Jupyter Notebook Shell JavaScript Ruby
Branch: master
Clone or download

Latest commit

GitHub Action Scraper
Latest commit d76d818 May 18, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Notify slack if job got cancelled May 17, 2020
binder Add fie listing dependencies Mar 21, 2020
dashboard Update dashboard screenshot May 18, 2020
fallzahlen_kanton_alter_geschlecht_csv Add Fallzahlen Kanton ZH 20200518 May 18, 2020
fallzahlen_kanton_total_csv Update COVID19_Fallzahlen_CH_total.csv May 18, 2020
fallzahlen_kanton_total_csv_v2 Update COVID19_Fallzahlen_Kanton_NE_total.csv from scraper May 18, 2020
scrapers Remove expectations for NE May 18, 2020
scripts Set FACTOR to 1.5 again May 12, 2020
.gitignore Add script for outlier detection May 12, 2020
COVID19_Fallzahlen_Beispiel.csv Update COVID19_Fallzahlen_Beispiel.csv Apr 7, 2020
COVID19_Fallzahlen_CH_total.csv Update COVID19_Fallzahlen_CH_total.csv May 18, 2020
COVID19_Fallzahlen_CH_total_v2.csv Update COVID19_Fallzahlen_CH_total.csv May 18, 2020
COVID19_Fallzahlen_Kanton_ZH_Beispiel_alter_geschlecht_.csv Update COVID19_Fallzahlen_Kanton_ZH_Beispiel_alter_geschlecht_.csv Apr 14, 2020
LICENSE Create LICENSE Mar 9, 2020
README.html Merge @baryluk scrapers into master branch Mar 22, 2020
README.md Add BL to run scraper workflow May 15, 2020
gd.png logo with transparent bg Mar 11, 2020
logos.png Merge @baryluk scrapers into master branch Mar 22, 2020
mappingCanton_BFS.csv Update mappingCanton_BFS.csv Mar 26, 2020
package-lock.json Update node packages Mar 26, 2020
package.json Adapt scripts for v2 Apr 8, 2020
requirements.txt Run validation seprate from scraping May 12, 2020
setup.py Move test in its own test file May 6, 2020
shadow_list_for_internal_purpose Update shadow_list_for_internal_purpose Mar 27, 2020
statistisches_amt_kt_zh.png Add files via upload Mar 15, 2020
visualise.ipynb Add simple notebook to visualise data Mar 21, 2020

README.md

OpenZH-logo

GD-logo

GitHub commit Binder

SARS-CoV-2 Cases communicated by Swiss Cantons and Principality of Liechtenstein (FL)

We are providing a common official OGD dataset of SARS-CoV-2 case numbers, which are communicated by official Swiss canton's (26 cantons, abbreviations see below) and Principality of Liechtenstein's (abbreviation: FL) sources.

The infection rates refer to the infection with SARS-CoV-2, whereas the disease caused by the virus is called Covid-19.

We are providing SARS-CoV-2 case numbers in machine-readable form (CSV) as OGD resources (Open Government Data), that have been published by official sources (Cantons and FL) online. Sources are specified with the respective URL(s).

Case numbers include persons tested and treated in the respective Canton resp. Principality of Liechtenstein. Important: Since 09.03.2020, only persons who meet certain test criteria are tested (see e.g. with the Canton of Zurich "Testkriterien" at www.gd.zh.ch/coronavirus).

The data is updated regularly - if available daily. Times of collection and update of the data may vary. We are specifying the date of the last reporting, and - if available - a time-stamp, too.

The data is both automatically and manually updated, and regularly checked. We are performing a complete manual update and verification once a day; this "roundtrip" starts at 6pm CET. It is usually completed within 120 minutes.

There is a merged file of all Cantons and FL that is automatically updated for use in data analysis.

You can get started exploring the data with visualise.ipynb (run it in your browser).

We are available to advise and support interested authorities, how to easily complete both historized data, and missing columns. You can reach us:

Data Updates

--> Check our status dashboard with the latest data updates

Note: Image below is updated every 20 minutes. Dashboard of data updates

Cantonal / FL data resources

Canton / FL updated by data historized
FL manually yes
AG scraping yes
AI scraping yes
AR scraping yes
BE scraping yes
BL scraping yes
BS scraping yes
FR scraping yes
GE manually yes
GL scraping no
GR scraping no
JU scraping yes
LU scraping yes
NE scraping yes
NW scraping no
OW scraping no
SG scraping yes
SH scraping no
SO scraping yes
SZ scraping no
TG scraping no
TI scraping yes
UR scraping yes
VD scraping yes
VS scraping yes
ZG scraping no
ZH manually (by ZH) yes

Data structure

Data on Cantonal Case Numbers

Single Cantonal Files

https://github.com/openZH/covid_19/tree/master/fallzahlen_kanton_total_csv_v2

Merged File for all Cantons

https://github.com/openZH/covid_19/blob/master/COVID19_Fallzahlen_CH_total_v2.csv

The dataset containing the cantonal case numbers is structured as follows:

example-file

Field Name Description Format Note
date Date of notification YYYY-MM-DD
time Time of notification HH:MM
abbreviation_canton_and_fl Abbreviation of the reporting canton Text
ncumul_tested Reported number of tests performed as of date Number Irrespective of canton of residence
ncumul_conf Reported number of confirmed cases as of date Number Only cases that reside in the current canton
new_hosp new hospitalisations since last date Number Irrespective of canton of residence
current_hosp Reported number of hospitalised patients on date Number Irrespective of canton of residence
current_icu Reported number of hospitalised patients in ICUs on date Number Irrespective of canton of residence
current_vent Reported number of patients requiring invasive ventilation on date Number Irrespective of canton of residence
ncumul_released Reported number of patients released from hospitals or reported recovered as of date Number Irrespective of canton of residence
ncumul_deceased Reported number of deceased as of date Number Only cases that reside in the current canton
source Source of the information href

Note that only numbers communicated by the cantons are published in the files, i.e. it's possible that there are gaps, when a canton did not provide a certain number on a date. It's on purpose that the cumulative numbers are not carried forward if no new number is communicated.

Note about empty values vs. 0:

Value Meaning
0 canton communicated 0 for this variable on that date
empty canton communicated nothing/did not provide a value for this variable on that date

Confirmed Cases and Fatalities by Age, Gender and Pre-existing Conditions

Selected Cantons publish more detailed datasets, which are available in this directory: https://github.com/openZH/covid_19/tree/master/fallzahlen_kanton_alter_geschlecht_csv

Field Name Description Format Reporting Cantons
Date ZH = Date of test result (NewConfCases) / Date of death (NewDeaths)
BL = Date of death
BS = Date of notification
YYYY-MM-DD
Area Abbreviation of the reporting canton
AgeYear Number ZH,BS,BL
Gender Text ZH,BS,BL
NewConfCases Number of Confirmed Cases Number ZH
NewDeaths Number of Deceased Number ZH,BS,BL
PreExistingCond Pre-Existing Conditions Text BL,BS

Comparable data for the Canton Thurgau in a slightly different format is available on opendata.swiss.

Community Contributions

Visualization of Swiss and Cantonal Case Numbers over Time

Operations Dashboard

corona-data.ch

Interactive Small Multiples of Case Numbers by Canton

REST-API

Estimated reproduction number by Canton

Data for Basel-Stadt

COVID-19 Data Hub

Many thanks for the great work!

You can’t perform that action at this time.