get_first_case: Get date of first case and first death

Description Usage Arguments Details Value References See Also Examples

View source: R/get_first_case.R

Description

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).

Usage

1
get_first_case(source = c("WHO", "ECDC"))

Arguments

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")

Details

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.

Value

A dataframe with three columns:

  1. country the country code to link with the HIT-COVID database

  2. first_case the date of the first case of COVID-19 in that country according to the source specified.

  3. first_death the date of the first death in that country from COVID-19 according to the source specified.

References

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

See Also

hit_filter, get_national_data

Examples

1
2
3
4
5
#Pulling from ECDC
firsts <- get_first_case(source = "ECDC")

#Pulling from WHO
firsts <- get_first_case(source = "WHO")

HopkinsIDD/hitRcovid documentation built on April 26, 2021, 4:48 a.m.