sudd_rfrnds: Get referendum data from sudd.ch

sudd_rfrndsR Documentation

Get referendum data from sudd.ch

Description

Downloads referendum data from sudd.ch.

Usage

sudd_rfrnds(
  ids_sudd,
  use_cache = TRUE,
  max_cache_age = "1 week",
  quiet = FALSE
)

Arguments

ids_sudd

The referendum identifiers assigned by sudd.ch. Either as a character vector or a data frame containing a column id_sudd. NAs are ignored.

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.

quiet

Whether or not to suppress printing status output from internal processing.

Value

A tibble. The column names are aligned with those of rfrnds() as closely as possible.

About sudd.ch

sudd stands for Suchmaschine für direkte Demokratie (German) and is operated by Beat Müller. Its database content is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0).

See Also

Other sudd.ch scraping functions: list_sudd_rfrnds(), list_sudd_territories(), list_sudd_titles()

Examples

rdb::rfrnd(id = "5bbc045192a21351232e596f")$id_sudd |> rdb::sudd_rfrnds()

rdb::rfrnds(quiet = TRUE) |>
  dplyr::filter(country_code == "AT") |>
  rdb::sudd_rfrnds()

zdaarau/c2d documentation built on Dec. 18, 2024, 1:24 p.m.