download_owid_data: Download Our World in Data data

View source: R/download_owid_data.R

download_owid_dataR Documentation

Download Our World in Data data

Description

Downloads data on testing, hospital occupation and vaccinations as collected by the Our World in Data team from official reports. You can find the source information for every country at (https://github.com/owid/covid-19-data/tree/master/public/data). The data accumulates tests over time. The definition of what constitutes a test and the frequency of data collection vary across countries. The vaccination data is currently only available based on ad hoc disclosures by a small set of countries.

Usage

download_owid_data(silent = FALSE, cached = FALSE)

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

Value

A data frame containing the data.

Examples

df <- download_owid_data(silent = TRUE, cached = TRUE)
df %>%
  dplyr::group_by(iso3c) %>%
  tidyr::fill(total_tests) %>%
  dplyr::group_by(date) %>%
  dplyr::summarise(tests = sum(total_tests, na.rm = TRUE)) %>%
  ggplot2::ggplot(ggplot2::aes(x = date, y = tests)) +
  ggplot2::geom_line()


joachim-gassen/tidycovid19 documentation built on March 21, 2024, 6:57 a.m.