Read in raw data files of a specific Swiss canton
Usage
read_raw_data(
canton = c("Bern", "Geneva", "Neuchatel"),
ballot_date,
specific_datasets = NULL,
use_cache = TRUE,
max_cache_age = "7 days"
)
Arguments
- canton
The canton of which to read in raw data files.
- ballot_date
The ballot date of which to read in raw data files.
- specific_datasets
If not
NULL
, only the specified filenames will be processed. A list with ballot dates as keys and character vectors of specific filenames (without the filetype extension) as values. Settingspecific_datasets
is only sensible in case ofcanton = "Geneva"
and thus ignored otherwise.- use_cache
Whether or not to return cached results if possible. If
FALSE
, results are always newly fetched regardless ofmax_cache_age
.- max_cache_age
Duration after which cached results are refreshed (i.e. newly fetched). A valid lubridate duration. Use
Inf
to disable cache expiry. Only relevant ifuse_cache = TRUE
.