Reads in the raw extra voting register data provided by the statistical office, performs various integrity checks and returns it in tidy shape.
Usage
read_voting_register_data_extra(
ballot_date = funky::config_val("ballot_date"),
canton = cantons(ballot_date),
use_cache = TRUE,
auth_token = funky::config_val("token_repo_private")
)Arguments
- ballot_date
FOKUS-covered ballot date. One of
"2018-09-23""2018-11-25""2019-10-20""2020-09-27""2020-10-18""2021-11-28""2023-06-18""2024-10-20"
- canton
FOKUS-covered canton name. One of
"aargau"
- use_cache
Whether or not to return cached results if possible. Caching is done based on file content hashing, so the file is only newly fetched if it actually changed since the last download. If
FALSE, the file is always newly fetched.- auth_token
Personal access token of a gitlab.com account with access to the private FOKUS repository.
Value
A tibble.
See also
Other data import functions:
read_easyvote_municipalities(),
read_online_participation_codes(),
read_private_file(),
read_survey_data(),
read_voting_register_ids(),
tidy_cols()
Examples
# GitLab PAT with access to the private FOKUS repository is required for this function to work
try(
fokus::read_voting_register_data_extra(ballot_date = "2019-10-20",
canton = "aargau") |>
colnames()
)
#> [1] "id" "sex_official" "year_of_birth_official" "marital_status_official"
#> [5] "household_size_official" "n_adults_in_household_official" "n_kids_in_household_official"