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
Johns Hopkins University Center for Systems Science and Engineering (JHU CCSE) Coronavirus website.
The dataset contains the daily summary of Coronavirus cases (confirmed, death, and recovered), by state/province.
data(coronavirus)
require(dplyr)
#> Loading required package: dplyr
#>
#> Attaching package: ‘dplyr’
#> The following objects are masked from ‘package:stats’:
#>
#> filter, lag
#> The following objects are masked from ‘package:base’:
#>
#> intersect, setdiff, setequal, union
# Get top confirmed cases by state
coronavirus %>%
filter(type == "confirmed") %>%
group_by(country) %>%
summarise(total = sum(cases)) %>%
arrange(-total) %>%
head(20)
#> # A tibble: 20 × 2
#> country total
#> <chr> <dbl>
#> 1 US 103802702
#> 2 India 44690738
#> 3 France 39866718
#> 4 Germany 38249060
#> 5 Brazil 37076053
#> 6 Japan 33320438
#> 7 Korea, South 30615522
#> 8 Italy 25603510
#> 9 United Kingdom 24658705
#> 10 Russia 22075858
#> 11 Turkey 17042722
#> 12 Spain 13770429
#> 13 Vietnam 11526994
#> 14 Australia 11399460
#> 15 Argentina 10044957
#> 16 Taiwan* 9970937
#> 17 Netherlands 8712835
#> 18 Iran 7572311
#> 19 Mexico 7483444
#> 20 Indonesia 6738225
# 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)
#> # A tibble: 0 × 2
#> # … with 2 variables: province <chr>, total <dbl>