Skip to contents

Reads in the latest dataset of easyvote municipality information provided to us not earlier than 90 days before and up until 20 days after the ballot_date.

Usage

read_easyvote_municipalities(
  ballot_date = pal::pkg_config_val("ballot_date"),
  canton = cantons(ballot_date),
  use_cache = TRUE,
  auth_token = pal::pkg_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.

Details

If both columns min_age and max_age are NA in the data returned, it means that

  • the municipality did not provide easyvote with specific information on the target age range, and

  • the municipality has subscribed to parcel mailing (instead of direct delivery to households) and delivers the brochures itself – very likely to young adults between 18–25 years.

Examples

# GitLab PAT with access to the private FOKUS repository is required for this function to work
try(
  fokus::read_easyvote_municipalities(ballot_date = "2020-09-27",
                                      canton = "aargau") |>
    colnames()
)
#> [1] "municipality"    "municipality_id" "min_age"         "max_age"