coronavirus | R Documentation |
Daily summary of the Coronavirus (COVID-19) cases by state/province.
coronavirus
A data frame with 7 variables.
Date in YYYY-MM-DD format.
Name of province/state, for countries where data is provided split across multiple provinces/states.
Name of country/region.
Latitude of center of geographic region, defined as either country or, if available, province.
Longitude of center of geographic region, defined as either country or, if available, province.
An indicator for the type of cases (confirmed, death, recovered).
Number of cases on given date.
Country code
Officially assigned country code identifiers with two-letter
Officially assigned country code identifiers with three-letter
UN country code
Country and province (if applicable)
Country or province population
Continent name
Continent code
The dataset contains the daily summary of Coronavirus cases (confirmed, death, and recovered), by state/province.
Johns Hopkins University Center for Systems Science and Engineering (JHU CCSE) Coronavirus website.
data(coronavirus)
require(dplyr)
# Get top confirmed cases by state
coronavirus %>%
filter(type == "confirmed") %>%
group_by(country) %>%
summarise(total = sum(cases)) %>%
arrange(-total) %>%
head(20)
# Get the number of recovered cases in China by province
coronavirus %>%
filter(type == "recovered", country == "China") %>%
group_by(province) %>%
summarise(total = sum(cases)) %>%
arrange(-total)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.