
Get COVID-19 Statistics for All Continents
Source:R/get_covid_stats_by_continent.R
get_covid_stats_by_continent.Rd
Retrieves real-time COVID-19 totals for all continents from the 'disease.sh' API.
Usage
get_covid_stats_by_continent(
yesterday = FALSE,
twoDaysAgo = FALSE,
sort = NULL,
allowNull = FALSE
)
Arguments
- yesterday
Logical. If
TRUE
, retrieves data reported from the previous day. Default isFALSE
.- twoDaysAgo
Logical. If
TRUE
, retrieves data reported two days ago. Default isFALSE
.- sort
Character. Field to sort results by. Options include:
"cases"
,"todayCases"
,"deaths"
,"recovered"
,"active"
, etc.- allowNull
Logical. If
TRUE
, missing values are returned asNA
instead of0
. Default isFALSE
.
Value
A data frame containing:
continent
: Continent name.updated
: Last updated timestamp (as POSIXct in UTC).cases
: Total confirmed cases.todayCases
: New confirmed cases today.deaths
: Total deaths.todayDeaths
: New deaths today.population
: Continent population estimate.