Downloads the referendum data from the Referendum Database (RDB). See the codebook
for a detailed description of all variables.
Usage
rfrnds(
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_exists()
,
rfrnds_old()
,
rfrnd()
,
search_rfrnds()
,
validate_rfrnds()
Examples
# get all referendums (excl. drafts)
rdb::rfrnds()
#> # A tibble: 17,766 × 69
#> 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 65096e84481d… NA pl0120… PL Poland NA NA nati… 2023-10-15 NA Privati… Privati… NA
#> 2 65096dc1481d… NA pl0220… PL Poland NA NA nati… 2023-10-15 NA raising… Anhebun… NA
#> 3 65096535481d… NA pl0320… PL Poland NA NA nati… 2023-10-15 NA Removal… Abbau d… NA
#> 4 6509625d481d… NA pl0420… PL Poland NA NA nati… 2023-10-15 NA Europea… Beschlu… NA
#> 5 650034e4481d… NA au0120… AU Australia NA NA nati… 2023-10-14 NA Establi… Stimme … NA
#> 6 64e46f7a481d… NA ec0920… EC Ecuador NA NA nati… 2023-08-20 NA No crud… Keine R… NA
#> 7 64e46c8f481d… NA fm0820… FM Micronesia NA NA nati… 2023-07-04 NA Indepen… Unabhän… NA
#> 8 64c8b3ca0b8b… NA fm0720… FM Micronesia NA NA nati… 2023-07-04 NA Providi… NA NA
#> 9 64c8b19c0b8b… NA fm0620… FM Micronesia NA NA nati… 2023-07-04 NA Creatin… Angleic… NA
#> 10 64c8a28d0b8b… NA fm0520… FM Micronesia NA NA nati… 2023-07-04 NA Alterin… Verände… NA
#> # ℹ 17,756 more rows
#> # ℹ abbreviated name: ¹subnational_entity_name
#> # ℹ 56 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>, url_sudd <chr>,
#> # url_swissvotes <chr>, sources <chr>, is_draft <lgl>, date_time_created <dttm>, date_time_last_edited <dttm>, type <fct>, inst_legal_basis_type <ord>, …