Exploring 'COVID'-19 Statistics

covid-19, covid-api, covid-data, covid-virus, covid19-data, covid19-tracker, sars-cov-2


nCov2019: An R package for exploring COVID-19 statistics

The package was developed since Jan. 2020 and originally hosted on GuangchuangYu/nCov2019. This repo contains an up-to-date version with data from new sources (from worldometers and JHUCSSE) and new data types (vaccine and therapeutics data).

🏠 Data Sources

Fetching data using API provided by

Find out more on the vignette vignette.

✍️ Authors

Guangchuang YU and Tianzhi Wu

If you use nCov2019, please cite the following preprint:

Tianzhi Wu, Erqiang Hu, Xijin Ge*, Guangchuang Yu*. Open-source analytics tools for studying the COVID-19 coronavirus outbreak. medRxiv, 2020.02.25.20027433. doi:


Get the development version from github:

## install.packages("remotes")

🔰 Usages

  • res <- query() to query 5 types of statistics
    • global summary,
    • latest data
    • historical data
    • vaccine data
    • therapeutic data
  • x <- res$global to access global summary data
    • summary(x) will return global overview
    • x$affectedCountries will return total affected countries,(other 20 types of statistics is available)
  • y <- res$latest or y <- res$historical to access latest or historical data
    • y["global"] will return all countries' statistics
    • y[country] will return country level statistics
    • For countries in China, UK, Australia, Canada ,Denmark , France and Netherlands, provincial data is also available and y[country,province] will return statistics data of the selected province
  • z <- res$vaccine or y <- res$therapeutics to access vaccine or therapeutic data
    • summary(z) will return the summary of their trial phase
    • z["all"] will return all candidate
    • z[ID="id1"] each vaccine or therapeutics candidate has an id, this will return detail description of the selected candidate (e.g., "id1")
  • plot() to present data on map
  • dashboard() to open Shiny app dashboard

🎨 Example

Run the script example.R in R using source("example.R"), will produce the following figure:

📖 Documents

📈 Shiny Apps that use nCov2019

💖 Collected in resource list