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)

Arguments

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

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

use_daily

On December 14th, 2020 the ECDC switched from daily to weekly reporting. If TRUE (the default), the code will use daily data up to 2020-12-14 and then switch to the weekly data that currently is being reported by the ECDC.

Value

A data frame containing the data.

Examples

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