rfrnd: Get a single referendum's data

rfrndR Documentation

Get a single referendum's data

Description

Downloads a single referendum's data from the Referendum Database (RDB). See the codebook for a detailed description of all variables.

Usage

rfrnd(
  id,
  incl_archive = FALSE,
  tidy = TRUE,
  use_testing_server = pal::pkg_config_val(key = "use_testing_server", pkg = this_pkg)
)

Arguments

id

Referendum's unique identifier.

incl_archive

Whether or not to include an archive column containing data from an earlier, obsolete state of the Referendum Database (RDB).

tidy

Whether or not to tidy the referendum data, i.e. apply various data cleansing tasks and add additional variables. If FALSE, the raw MongoDB referendum data will only be modified just enough to be able to return it as a tibble. Note that untidy data doesn't conform to the codebook (i.a. different variable names).

use_testing_server

Whether or not to use the testing servers instead of the production servers for RDB Services API calls etc.

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(), rfrnds_bkp(), validate_rfrnds()

Examples

rdb::rfrnd(id = "5bbbe26a92a21351232dd73f")

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