View source: R/get_covid_stats_by_continent.R
get_covid_stats_by_continent | R Documentation |
Retrieves real-time COVID-19 totals for all continents from the 'disease.sh' API.
get_covid_stats_by_continent(
yesterday = FALSE,
twoDaysAgo = FALSE,
sort = NULL,
allowNull = FALSE
)
yesterday |
Logical. If |
twoDaysAgo |
Logical. If |
sort |
Character. Field to sort results by. Options include: |
allowNull |
Logical. If |
This function retrieves COVID-19 summary data for each continent. You may specify whether to get data from today, yesterday, or two days ago.
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.
Requires internet access.
API Docs: https://disease.sh/docs/#/COVID-19
# Get current COVID-19 stats for all continents
get_covid_stats_by_continent()
# Get yesterday's data sorted by number of cases
get_covid_stats_by_continent(yesterday = TRUE, sort = "cases")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.