list_sudd_rfrnds | R Documentation |
Lists the referendum data from sudd.ch in various ways its list.php
endpoint allows. The output of this
function can be directly fed to sudd_rfrnds()
.
list_sudd_rfrnds(
mode = c("by_date", "by_mod_date", "filter", "random"),
order = c("ascending", "descending"),
filter = list(territory_name_de = NULL, title_de = NULL, year_min = NULL, year_max =
NULL),
use_cache = TRUE,
max_cache_age = "1 week",
quiet = FALSE
)
mode |
The listing mode. One of
|
order |
The sorting order of the results. Only relevant if |
filter |
A list with valid filtering arguments. Only relevant if
|
use_cache |
Whether or not to return cached results if possible. If |
max_cache_age |
Duration after which cached results are refreshed (i.e. newly fetched). A valid lubridate duration. Use |
quiet |
Whether or not to suppress printing status output from internal processing. |
A tibble containing at least an id_sudd
column.
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).
Other sudd.ch scraping functions:
list_sudd_territories()
,
list_sudd_titles()
,
sudd_rfrnds()
# list all referendums by modification date (takes a while)
## Not run:
rdb::list_sudd_rfrnds(mode = "by_mod_date")
## End(Not run)
# list all referendums whose title matches "AHV"
rdb::list_sudd_rfrnds(mode = "filter",
filter = list(title_de = "AHV"),
quiet = TRUE)
# get sudd.ch referendum data from all referendums from 2020 onwards
rdb::list_sudd_rfrnds(mode = "filter",
filter = list(year_min = 2020),
quiet = TRUE) |>
rdb::sudd_rfrnds(quiet = TRUE)
# get sudd.ch referendum data from five randomly picked referendums
rdb::list_sudd_rfrnds(mode = "random",
quiet = TRUE) |>
rdb::sudd_rfrnds(quiet = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.