Downloads the referendum data from the Referendum Database (RDB) backup in the zdaarau/rpkgs/rdb
repository. See the codebook
for a detailed
description of all variables.
Usage
rfrnds_bkp(
is_draft = FALSE,
incl_archive = FALSE,
use_cache = TRUE,
max_cache_age = "1 week",
quiet = FALSE
)
Arguments
- is_draft
TRUE
means to include only referendum entries with draft status,FALSE
to include only normal entries. Set toNULL
in order to include both draft and normal entries.- incl_archive
Whether or not to include an
archive
column containing data from an earlier, obsolete state of the Referendum Database (RDB).- use_cache
Whether or not to return cached results if possible. If
FALSE
, results are always newly fetched regardless ofmax_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 ifuse_cache = TRUE
.- quiet
Whether or not to suppress printing status output from internal processing.
Value
A tibble.
See also
Other referendum data functions:
add_rfrnds()
,
assert_vars()
,
count_rfrnds()
,
delete_rfrnds()
,
download_file_attachment()
,
edit_rfrnds()
,
rfrnd()
,
rfrnd_exists()
,
rfrnds()
,
validate_rfrnds()
Examples
# get all referendums (excl. drafts)
rdb::rfrnds_bkp()
#> ℹ Fetching latest RDB backup…
#> ✔ Fetching latest RDB backup… done [1.5s]
#>
#> # A tibble: 17,889 × 67
#> id id_official id_sudd country_code country_name subnational_entity_n…¹ municipality level date is_former_country title_en title_de title_fr
#> <chr> <chr> <chr> <fct> <fct> <chr> <chr> <ord> <date> <lgl> <chr> <chr> <chr>
#> 1 670cd145c3cd… NA NA CH Switzerland Zug NA subn… 2024-06-09 NA Cycling… Velonet… NA
#> 2 66fff490c3cd… NA NA LI Liechtenste… NA NA nati… 2024-09-22 NA Referen… Referen… NA
#> 3 66ffdfe3c3cd… NA NA CH Switzerland Jura NA subn… 2024-09-22 NA Act con… NA Acte re…
#> 4 66f686cfc3cd… NA NA CH Switzerland Bern NA subn… 2024-09-22 NA Concord… Konkord… NA
#> 5 66f68317c3cd… NA NA CH Switzerland Bern NA subn… 2024-09-22 NA Amendme… Änderun… NA
#> 6 66d6da9cc3cd… NA NA CH Switzerland Basel Landschaft NA subn… 2024-09-22 NA Partial… Teilrev… NA
#> 7 66cde603c3cd… NA NA CH Switzerland Graubünden NA subn… 2024-09-22 NA New civ… Neubau … NA
#> 8 66c46f86c3cd… NA NA CH Switzerland Schwyz NA subn… 2024-09-22 NA Approva… Ausgabe… NA
#> 9 66c46cf6c3cd… NA NA CH Switzerland Solothurn NA subn… 2024-09-22 NA Appoint… Anstell… NA
#> 10 66c46c3ac3cd… NA NA CH Switzerland Solothurn NA subn… 2024-09-22 NA Amendme… Änderun… NA
#> # ℹ 17,879 more rows
#> # ℹ abbreviated name: ¹subnational_entity_name
#> # ℹ 54 more variables: question <chr>, question_en <chr>, committee_name <chr>, result <fct>, subterritories_yes <dbl>, subterritories_no <dbl>,
#> # electorate_total <int>, electorate_abroad <int>, votes_yes <int>, votes_no <int>, votes_empty <int>, votes_invalid <int>, votes_per_subterritory <list>,
#> # lower_house_yes <int>, lower_house_no <int>, lower_house_abstentions <int>, upper_house_yes <int>, upper_house_no <int>, upper_house_abstentions <int>,
#> # position_government <fct>, topics_tier_1 <list>, topics_tier_2 <list>, topics_tier_3 <list>, remarks <chr>, files <list>, sources <chr>, is_draft <lgl>,
#> # date_time_created <dttm>, date_time_last_edited <dttm>, type <fct>, inst_legal_basis_type <ord>, inst_has_urgent_legal_basis <lgl>, …