Learn R Programming

⚠️There's a newer version (3.0.3) of this package.Take me there.

Coronavirus COVID-19 (2019-nCoV) Epidemic Datasets

The repository aims at unifying COVID-19 datasets across different sources in order to simplify the data acquisition process and the subsequent analysis. You are welcome to join and contribute by extending the number of supporting data sources as a joint effort against COVID-19.

The data are available to the end-user via the R package COVID19 or in csv format (see below or on Kaggle).

About

Goal

Provide the research community with a unified data hub by collecting worldwide fine-grained data merged with demographics, air pollution, and other exogenous variables helpful for a better understanding of COVID-19.

How

The data are collected with the R package COVID19. For R users, the COVID19 package is the recommended way to interact with the dataset. For non R users, the data are provided in csv format and regularly updated (see below or on Kaggle).

Join the mission

Whether or not you are an R user... take part in the data collection! Your contribution will be gratefully acknowledged.

R users

Find real-time data sources and write R function(s) to import the data.

  1. Find data sources for real-time data such as number of cases, deaths, tests, hospitalized and new variables of this kind. See the data coverage table below to avoid working on something that is already available.
  2. Write an R function to import the data, just like this.
  3. Submit your function to this repository by creating a pull request

non-R users

Find historical data sources and put them into csv files.

  1. Find data sources for historical data such as demographics, population density, age, air quality and new variables of this kind. See the data coverage table below to avoid working on something that is already available.
  2. Create or improve a csv file, just like this.
  3. Submit your csv file to this repository by creating a pull request

R Package COVID19

Simple, yet effective R package to acquire tidy format datasets of the 2019 Novel Coronavirus COVID-19 (2019-nCoV) epidemic. The data are downloaded in real-time, cleaned and matched with exogenous variables.

Quickstart

# Install COVID19
install.packages("COVID19")

# Load COVID19
require("COVID19")

Data Acquisition

# Diamond Princess 
d1 <- diamond()

# World
w1 <- world("country")       # data by country
w2 <- world("state")         # data by state

# US 
u1 <- us("country")          # data by country
u1 <- us("state")            # data by state

# Italy
i1 <- italy("country")       # data by country 
i2 <- italy("state")         # data by region 
i3 <- italy("city")          # data by city

# Switzerland 
s1 <- switzerland("country") # data by country
s2 <- switzerland("state")   # data by canton

# Liechtenstein 
l1 <- liechtenstein()        # data by country

Data Hub (csv)

Daily updated datasets of the 2019 Novel Coronavirus COVID-19 (2019-nCoV) epidemic in csv format. The following table shows the data coverage for each variable in each file.

deathsconfirmedtestspoppop_14pop_15_64pop_65pop_agepop_densitypop_death_rate
number of COVID19 deathsnumber of COVID19 confirmed casesnumber of COVID19 teststotal populationpopulation ages 0-14 (% of total population)*population ages 15-64 (% of total population)**population ages 65+ (% of total population)median age of populationpopulation density per km2population mortality rate
World
World: country level
World: state level
US
US: country level
US: state level
Italy
Italy: country level
Italy: state level
Italy: city level
Switzerland
Switzerland: country level
Switzerland: state level
Liechtenstein
Liechtenstein: country level
Diamond Princess
Diamond Princess

* Switzerland: ages 0-19

** Switzerland: ages 20-64

Data Sources

The following sources are gratefully acknowledged for making the data available to the public.

deathsconfirmedtestspoppop_14pop_15_64pop_65pop_agepop_densitypop_death_rate
number of COVID19 deathsnumber of COVID19 confirmed casesnumber of COVID19 teststotal populationpopulation ages 0-14 (% of total population)*population ages 15-64 (% of total population)**population ages 65+ (% of total population)median age of populationpopulation density per km2population mortality rate
WorldJHU CSSEJHU CSSEJHU CSSEWorld Bank Open Data (2018)World Bank Open Data (2018)World Bank Open Data (2018)World Bank Open Data (2018)World Factbook by CIA (2018)World Bank Open Data (2018)World Bank Open Data (2018)
USJHU CSSEJHU CSSEJHU CSSEJHU CSSE
ItalyMinistero della SaluteMinistero della SaluteMinistero della SaluteIstituto Nazionale di Statistica (2018)Istituto Nazionale di Statistica (2018)Istituto Nazionale di Statistica (2018)Istituto Nazionale di Statistica (2018)Istituto Nazionale di Statistica (2018)Istituto Nazionale di Statistica (2018)Istituto Nazionale di Statistica (2018)
SwitzerlandOpen Government DataOpen Government DataOpen Government DataSwiss Federal Statistical Office (2018)Swiss Federal Statistical Office (2018)Swiss Federal Statistical Office (2018)Swiss Federal Statistical Office (2018)Swiss Federal Statistical Office (2018)Swiss Federal Statistical Office (2018)Swiss Federal Statistical Office (2018)
LiechtensteinOpen Government DataOpen Government DataOpen Government Data
Diamond PrincessJHU CSSE, WikipediaJHU CSSE, WikipediaWikipediaWikipedia

* Switzerland: ages 0-19

** Switzerland: ages 20-64

Acknowledgements

The following people have contributed to the data collection as a joint effort against COVID-19.

deathsconfirmedtestspoppop_14pop_15_64pop_65pop_agepop_densitypop_death_rate
number of COVID19 deathsnumber of COVID19 confirmed casesnumber of COVID19 teststotal populationpopulation ages 0-14 (% of total population)*population ages 15-64 (% of total population)**population ages 65+ (% of total population)median age of populationpopulation density per km2population mortality rate
World
World: country levelE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.Guidotti
World: state levelE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.Guidotti
US
US: country levelE.GuidottiE.GuidottiE.GuidottiE.Guidotti
US: state levelE.GuidottiE.GuidottiE.GuidottiE.Guidotti
Italy
Italy: country levelE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.Guidotti
Italy: state levelE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.Guidotti
Italy: city levelE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.Guidotti
Switzerland
Switzerland: country levelE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.Guidotti
Switzerland: state levelE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.GuidottiE.Guidotti
Liechtenstein
Liechtenstein: country levelE.GuidottiE.GuidottiE.Guidotti
Diamond Princess
Diamond PrincessE.GuidottiE.GuidottiE.GuidottiE.Guidotti

* Switzerland: ages 0-19

** Switzerland: ages 20-64

Use Cases

  • Monitoring the advancement of the COVID–19 contagion in the regions of Italy (code)

Copy Link

Version

Install

install.packages('COVID19')

Monthly Downloads

737

Version

0.3.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Emanuele Guidotti

Last Published

April 11th, 2020

Functions in COVID19 (0.3.0)

liechtenstein

Liechtenstein
switzerland

Switzerland
italy

Italy
world

World
diamond

Diamond Princess
us

United States