download_ecdc_covid19_data.Rd
Downloads case data provided by the European Centre for Disease Prevention and Control (https://www.ecdc.europa.eu/en/publications-data/download-todays-data-geographic-distribution-covid-19-cases-worldwide). The data is updated weekly and contains the latest available public data on the number of new Covid-19 cases reported per week and per country.
download_ecdc_covid19_data(silent = FALSE, cached = FALSE, use_daily = TRUE)
silent | Whether you want the function to send some status messages to
the console. Might be informative as downloading will take some time
and thus defaults to |
---|---|
cached | Whether you want to download the cached version of the data
from the tidycovid19 Github repository instead of retrieving the
data from the authorative source. Downloading the cached version is
faster and the cache is updated daily. The cached version includes the
discontinued daily data (see below). Defaults to |
use_daily | On December 14th, 2020 the ECDC switched from daily to
weekly reporting. If |
A data frame containing the data.
df <- download_ecdc_covid19_data(silent = TRUE, cached = TRUE) df %>% dplyr::filter(iso3c == "ITA", !is.na(cases)) %>% ggplot2::ggplot(ggplot2::aes(x = date, y = cases)) + ggplot2::geom_bar(stat = "identity", fill = "lightblue")