View source: R/get_latest_data.R
get_latest_data | R Documentation |
This function was originally designed to download the latest version of CSSS data dynamically. Due to the cessation of data updates from the COVID Symptom Study Sweden, this function now checks if locally stored data is up-to-date and notifies the user accordingly. The function will not fetch new data from online sources.
get_latest_data(data_level = c("national", "county", "postcode"))
data_level |
A character string specifying which data set from CSSS you want to "download". Can be "national" (default), "county", or "postcode". |
Note: As the COVID Symptom Study Sweden is no longer updating their data sets, this function serves as a demonstration of how data updates could be managed without needing frequent package updates. It returns the data that was last available before updates were discontinued.
This function returns a data.frame
containing the data for the specified level. Data returned is the last available snapshot stored within the package.
Hugo Fitipaldi
# The following example demonstrates how to retrieve data at the county level.
df <- get_latest_data(data_level = "county")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.