Description Usage Arguments Details Value References See Also Examples
View source: R/get_first_case.R
Uses the covidregionaldata
package to find the date of the first case of COVID-19 and the
date of the first death from COVID-19. The source is either the European Centre for Disease
Control (ECDC) or the World Health Organization (WHO).
1 | get_first_case(source = c("WHO", "ECDC"))
|
source |
the source of the case data that is used to determine the date of first case and first death: one of "ECDC" or "WHO" (default is "WHO") |
This function can be run on its own to get the first case and death information if that is of interest. However, it is primarily meant to be run inside of hit_pull to add this information to the HIT-COVID database.
A dataframe with three columns:
country
the country code to link with the HIT-COVID database
first_case
the date of the first case of COVID-19 in that country according to
the source specified.
first_death
the date of the first death in that country from COVID-19 according
to the source specified.
Sam Abbott, Katharine Sherratt, Jonnie Bevan, Hamish Gibbs, Joel Hellewell, James Munday, Paul Campbell and Sebastian Funk (2020). covidregionaldata: Subnational Data for the Covid-19 Outbreak. R package version 0.6.0. https://CRAN.R-project.org/package=covidregionaldata
ECDC national data: https://opendata.ecdc.europa.eu/covid19
WHO national data: https://covid19.who.int
hit_filter, get_national_data
1 2 3 4 5 | #Pulling from ECDC
firsts <- get_first_case(source = "ECDC")
#Pulling from WHO
firsts <- get_first_case(source = "WHO")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.