To provide convenient access to epidemiological data on the coronavirus outbreak, we developed an R package, nCov2019 ( Besides detailed basis statistics, it also includes information about vaccine development and therapeutics candidates. We redesigned the function plot() for geographic maps visualization and provided a interactive shiny app. These analytics tools could be useful in informing the public and studying how this and similar viruses spread in populous countries.

Our R package is designed for both command line and dashboard interaction analysis, As show in diagram, while dashboard() is the main entry for the GUI explore part, the query() is the main function used in CLI explore part, 5 types of data were contain in its return result. Result type were explain in Statistic query part.


To start off, users could utilize the ‘remotes’ package to install it directly from GitHub by running the following in R:

remotes::install_github("yulab-smu/nCov2019", dependencies = TRUE)

Statistic query

Data query is simple as one command:

res <- query()
## Querying the latest data...
## last update: 2021-06-10
## Querying the global data...
## Gloabl total  175215818  cases; and  3778161  deaths
## Gloabl total affect country or areas: 222
## Gloabl total recovered cases: 69164
## last update: 2021-06-10
## Querying the historical data...
## Querying the vaccine data...
## Total Candidates Programs : 51
## Querying the therapeutics data...
## Total Candidates Programs : 54
## Query finish, each time you can launch query() to reflash the data

This may take seconds to few minutes, which depend on the users’ network connection, if the user connection is broken, a local stored version data will be used for demo.

The result returned by query() function will contains 5 types of statistic:

## [1] "latest"       "global"       "historical"   "vaccine"      "therapeutics"

The query() only need to be performed once in a session, print each of statistic objects, users could get their update time. And for the vaccine and therapeutics query results, print them will return the candidates number.

Global data

The query result of global status will contain a data frame with 21 types of statistic, which have detail explanation on the bottom of this documents. And summary(x) will return overview of global status.

x = res$global
x$affectedCountries # total affected countries
## [1] 222
## Gloabl total  175215818  cases; and  3778161  deaths
## Gloabl total affect country or areas: 222
## Gloabl total recovered cases: 69164
## last update: 2021-06-10

Latest data

Here is the example for operating latest data. once again, all data have queried and store in res.

x = res$latest

And then print(x) will return the update time for the latest data

print(x) # check update time
## last update: 2021-06-10

To subset latest data could be easily done by using [. x["Global"] or x["global"] will return the data frame for all countries but users could determine a specific country, such as:

head(x["Global"]) # return all global countries.
x[c("USA","India")] # return only for USA and India 

The data is order by “todayCases” column, users could sort them by other order.

df = x["Global"]
head(df[order(df$cases, decreasing = T),])  

As for the latest data, it provides 11 types of main information by default, but 12 more statistic type are provided in the “latest$detail”, they also have corresponding explanation on the bottom.

x = res$latest
head(x$detail)  # more detail data 

Historical data

Historical data is useful in retrospective analysis or to establish predictive models, the operation is similar as latest data, user could get the data frame for all countries or some specific countries within c() vector, such as head(Z[c(country1,country2,country3)])

Z = res$historical
print(Z) # update time
## last update: 2021-06-09

For the following countries, we provide detail province data, which can be obtained in a similar way but within [ operation: head(Z[country,province])

  • Australia Canada China Denmark France Netherlands

For users’ own historical data, we provide a convert() function, users could convert other data into class of nCov2019History data, and then explore in nCov2019:

userowndata <- read.csv("path_to_user_data.csv")
# userowndata, it should contain these 6 column: 
# "country","province","date","cases","deaths","recovered"
Z = convert(data=userowndata)

Vaccine and therapeutics data

Users could check for the vaccine or therapeutics developing status. Let x be the vaccine or therapeutics query result, then summary() will return the summary of their trial phase, and x[“all”] or x[“All”] will return the summary information, such as mechanism, trial Phase, institutions and so on. Then the detail background info will return with provided id, for example x[ID=“id3”] or simple as x[“id3”]. The same operation could apply to therapeutics data.

X <- res$vaccine
# check for the details about the mRNA-based vaccine, id3
## [1] "Background: China&rsquo;s CanSino Biologics has developed a recombinant novel coronavirus vaccine that incorporates the adenovirus type 5 vector (Ad5) named Ad5-nCoV. Trials: Multiple trials are in various stages of recruitment and completion: - A Phase 1 clinical trial in China of 108 participants between 18 and 60 years old who will receive low, medium, and high doses of Ad5-nCoV is active, but not recruiting (NCT04313127). - A Phase 1 trial in China is evaluating intramuscular vaccination and mucosal vaccination of Ad5-nCoV across two doses (NCT04552366). - A Phase 1/2 trial of up to 696 participants in Canada (NCT04398147). - A Phase 2 double-blind, placebo-controlled trial of up to 508 participants in China (NCT04341389) is active, but not recruiting. - A Phase 2b trial in China evaluating safety and immunogenicity of Ad5-nCoV in participants 6 years and older (NCT04566770). - A Phase 3 trial in Russia of up to 500 participants across multiple study centers (NCT04540419). - A Phase 3 trial of up to 40,000 participants internationally, including Pakistan, Saudi Arabia and Mexico (NCT04526990). Outcomes: A single dose of Ad5-nCoV protected against upper respiratory infection of SARS-CoV-2 in ferrets, according to a paper published 14 August in Nature Communications. Results from a Phase 1 trial show a humoral and immunogenic response to the vaccine, according to a paper published in The Lancet. Adverse reactions such as pain (54%), fever (46%), fatigue (44%), headache (39%), and muscle pain (17%) occurred in 83% of patients in the low and medium dose groups and 75% of patients in the high dose group. In the Phase 2 trial, neutralizing antibodies and specific interferon γ enzyme-linked immunospot assay responses were observed at all dose levels for most participants. Status: On 25 June, China’s Central Military Commission announced the military had been approved to use Ad5-nCoV for a period of 1 year, according to reporting in Reuters."
X <- res$therapeutics
## [1] "Background: Actemra is a indicated to treat autoimmune diseases such as rheumatoid arthritis as well as cytokine release syndrome. Research from China has shown Actemra may be an effective treatment for patients with severe cases of COVID-19.  Trials: Actemra is being evaluated in the following high-profile trials: COVACTA (NCT04320615) and EMPACTA (NCT04372186). The Hôpitaux de Paris (CORIMUNO-19) is assessing Actemra in a trial for COVID-19 associated pneumonia (NCT04331808) in a Phase 2 trial.  Outcomes: Evidence is beginning to point to Actemra having a beneficial outcome for COVID-19 patients in some, but not all, scenarios. Evidence for benefit: - Results from EMPACTA indicate Actemra reduced the need for mechanical ventilation in patients with COVID-19 associated pneumonia. In EMPACTA, 12.0% of patients receiving Actemra received mechanical ventilation compared with 19.3% of patients in the placebo group (P = .04); however, Actemra did not improve rates of survival, according to data published in the New England Journal of Medicine. - Preliminary results from CORIMUNO-19 showed Actemra “improves significantly clinical outcomes” of pneumonia associated with COVID-19. - The drug may also improve survival in patients with cytokine release syndrome, according to a study in CHEST. - Results from the University of Michigan published in the journal Clinical Infectious Diseases showed a 45% reduction in hazard of death for COVID-19 patients and improved status compared with patients who did not receive the drug. - In a multicenter cohort study of 4,485 adults with COVID-19 published in JAMA Internal Medicine, researchers found a lower risk of mortality in adults who received Actemra within 2 days of admission to the ICU compared with patients who did not receive Actemra as part of their care. Evidence showing mixed results: - Researchers on behalf of the Niguarda COVID-19 Working Group released a comparative analysis in the Journal of Infection that noted Actemra is potentially effective, but recommended caution when using the drug. - A randomized, double-blind, placebo-controlled trial published in the New England Journal of Medicine by researchers at Massachusetts General Hospital found Actemra was not effective in reducing need for intubation, disease progression, or death but left open the opportunity that the drug did carry some benefit due to wide confidence intervals in comparisons of efficacy. - CORIMUNO-19: There were a lower number of patients hospitalized with COVID-19 and moderate-to-severe pneumonia taking Actemra who required noninvasive ventilation, intubation, or died at 14 days compared with placebo, but Actemra did not meet the primary outcome of reducing clinical progression scores by 5 days after starting treatment. Evidence showing no benefit: - In the COVID-BioB Study, patients who received Actemra instead of standard of care had improved clinical outcomes (69% vs. 61%; P = .61) and reduced mortality (15% vs. 33%; P = .15), but neither result was statistically significant. - Results posted in medRxiv by researchers at the University of North Carolina, Chapel Hill, showed that of 11 patients with severe COVID-19 requiring ventilation, Actemra reduced C-reactive protein levels but did not result in significant improvement in temperature and oxygen requirements. - An Italian study sponsored by the Italian Medicine Agency (AIFA) was stopped after Actemra failed to perform better than standard of care in reducing respiratory symptoms, intensive care visits and mortality. - Roche also provided an update for COVACTA indicating the drug did not meet its primary or secondary endpoints of improved clinical status and reduced mortality.  Status: COVACTA has been completed; EMPACTA and CORIMUNO-19 are active, but not recruiting."


We provide a visualization function as a redesign “plot”.

   region = "Global",
   continuous_scale = FALSE,
   palette = "Reds",
   date = NULL,
   from = NULL,
   to = NULL,
   title = "COVID-19",
   type = "cases",

Here, type could be one of “cases”,“deaths”,“recovered”,“active”,“todayCases”,“todayDeaths”,“todayRecovered”,“population” and “tests”. By default, color palette is “Reds”, more color palettes can be found here: palette

To get the overview for the latest status, the mini code required is as below:

X <- res$latest