The coronavirus package provides a tidy format dataset of the 2019 Novel Coronavirus COVID-19 (2019-nCoV) epidemic. The raw data pulled from the Johns Hopkins University Center for Systems Science and Engineering (JHU CCSE) Coronavirus repository.
More details available
here, and a csv
format
of the package dataset available
here
Source: Centers for Disease Control and Prevention’s Public Health Image Library
Install the CRAN version:
install.packages("coronavirus")
Install the Github version (refreshed on a daily bases):
# install.packages("devtools")
devtools::install_github("RamiKrispin/coronavirus")
The package contains a single dataset - coronavirus
:
library(coronavirus)
data("coronavirus")
This coronavirus
dataset has the following fields:
head(coronavirus)
#> Province.State Country.Region Lat Long date cases type
#> 1 Japan 35.67620 139.6503 2020-01-22 2 confirmed
#> 2 South Korea 37.56650 126.9780 2020-01-22 1 confirmed
#> 3 Thailand 13.75630 100.5018 2020-01-22 2 confirmed
#> 4 Anhui Mainland China 31.82571 117.2264 2020-01-22 1 confirmed
#> 5 Beijing Mainland China 40.18238 116.4142 2020-01-22 14 confirmed
#> 6 Chongqing Mainland China 30.05718 107.8740 2020-01-22 6 confirmed
tail(coronavirus)
#> Province.State Country.Region Lat Long date cases type
#> 1954 Shanxi Mainland China 37.57769 112.29220 2020-02-23 7 recovered
#> 1955 Sichuan Mainland China 30.61714 102.71030 2020-02-23 11 recovered
#> 1956 Tianjin Mainland China 39.29362 117.33300 2020-02-23 16 recovered
#> 1957 Xinjiang Mainland China 41.11981 85.17822 2020-02-23 3 recovered
#> 1958 Yunnan Mainland China 24.97411 101.48680 2020-02-23 8 recovered
#> 1959 Zhejiang Mainland China 29.18251 120.09850 2020-02-23 41 recovered
Here is an example of a summary total cases by region and type (top 20):
library(dplyr)
summary_df <- coronavirus %>% group_by(Country.Region, type) %>%
summarise(total_cases = sum(cases)) %>%
arrange(-total_cases)
summary_df %>% head(20)
#> # A tibble: 20 x 3
#> # Groups: Country.Region [14]
#> Country.Region type total_cases
#> <chr> <chr> <int>
#> 1 Mainland China confirmed 76938
#> 2 Mainland China recovered 23170
#> 3 Mainland China death 2443
#> 4 Others confirmed 691
#> 5 South Korea confirmed 602
#> 6 Italy confirmed 155
#> 7 Japan confirmed 147
#> 8 Singapore confirmed 89
#> 9 Hong Kong confirmed 74
#> 10 Singapore recovered 51
#> 11 Iran confirmed 43
#> 12 Thailand confirmed 35
#> 13 US confirmed 35
#> 14 Taiwan confirmed 28
#> 15 Australia confirmed 22
#> 16 Japan recovered 22
#> 17 Malaysia confirmed 22
#> 18 Thailand recovered 21
#> 19 South Korea recovered 18
#> 20 Germany confirmed 16
The raw data pulled and arranged by the Johns Hopkins University Center for Systems Science and Engineering (JHU CCSE) from the following resources:
- World Health Organization (WHO): https://www.who.int/
- DXY.cn. Pneumonia. 2020. http://3g.dxy.cn/newh5/view/pneumonia.
- BNO News:
https://bnonews.com/index.php/2020/02/the-latest-coronavirus-cases/
- National Health Commission of the People’s Republic of China (NHC): http:://www.nhc.gov.cn/xcs/yqtb/list_gzbd.shtml
- China CDC (CCDC):
http:://weekly.chinacdc.cn/news/TrackingtheEpidemic.htm
- Hong Kong Department of Health:
https://www.chp.gov.hk/en/features/102465.html
- Macau Government: https://www.ssm.gov.mo/portal/
- Taiwan CDC:
https://sites.google.com/cdc.gov.tw/2019ncov/taiwan?authuser=0
- US CDC: https://www.cdc.gov/coronavirus/2019-ncov/index.html
- Government of Canada:
https://www.canada.ca/en/public-health/services/diseases/coronavirus.html
- Australia Government Department of Health:
https://www.health.gov.au/news/coronavirus-update-at-a-glance
- European Centre for Disease Prevention and Control (ECDC):
https://www.ecdc.europa.eu/en/geographical-distribution-2019-ncov-cases