View source: R/download_owid_data.R
download_owid_data | R Documentation |
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.
download_owid_data(silent = FALSE, cached = FALSE)
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. Defaults to |
A data frame containing the data.
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.