This repository has Coronavirus (Covid-19) data related to CGHR's COVID-19 initiative. All data posted here are free for the public to use.
There several sources of COVID-19 data on the web. Here we list some sources we have identified so far.
Data sources on the web:
- John Hopkins CSSE
- Coronavirus App
- INED
- European Centre for Disease Prevention and Control
- Italian data
- French data
- Canadian data
- USA
- Belgium
- Our World in Data
- Worldometers
In our COVID-19 forecasting paper we mostly used data from Coronavirus App.
The data found in this repository can be downloaded by clicking on the file name above and then right clicking on the "Raw" menu button and choosing "Save Link As". Alternatively, you can clone this repository in your computer by using Git.
Additionally, CGHR and non-CGHR researchers can access the data above and other data sets through our COVID-19 database (db). Our db was created using PostgreSQL, an open-source db software. You can connect to it using most statistics programs (R, Stata, Excel, etc.).
Please contact us to request a login or a SQL dump file.
Note: The data are updated twice a week.
- See datasets.csv for an overview of current data sets shared in this repository
R is an open-source statistical and computational program. You can download it here R-project.
-
Sample code to grab data from CGHR's public COVID-19 db
#Install libraries install.packages("DBI") # Load library library(DBI) # create connection to db con <- DBI::dbConnect(drv = RPostgres::Postgres(), user='?', password='?', host='IP', port='?', dbname='covid_19') # get table from db res <- dbSendQuery(con, "SELECT * FROM jh_ts_covid19_deaths_global") cv19 <- dbFetch(res) # See data table dimensions dim(cv19) # See first and last 6 rows head(cv19) tail(cv19) # write table as CSV file write.table(cv19, "/path/cv19.txt", sep=",", row.names=FALSE) # remove res object dbClearResult(res) # disconnect from db dbDisconnect(con)
The content presented here is free for the public to use.
Contact: [email protected], CGHR.org