Skip to contents

Get federal ballot dates

Usage

ballot_dates_federal(
  source = c("Neuchatel", "Zurich"),
  exclude_counterproposals = TRUE,
  use_cache = TRUE,
  max_cache_age = "1 day"
)

Arguments

source

Federal ballot dates can either be retrieved from the official website of the canton of Neuchatel (default) or Zurich. Note that only referendum dates will be returned from source = "Zurich", election dates can only be scraped from source = "Neuchatel". On the other hand, source = "Zurich" will return referendum dates back to the 19th century, while source = "Neuchatel" only goes back to the turn of the millennium.

exclude_counterproposals

Exclude indirect counterproposals and tie-breaker questions. A logical scalar.

use_cache

Whether or not to return cached results if possible. If FALSE, results are always newly fetched regardless of max_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 if use_cache = TRUE.

Value

pkgsnippets::return_label("data")