count_rfrnds | R Documentation |
Counts the number of referendums per level
in the Referendum Database (RDB).
count_rfrnds(
is_draft = FALSE,
country_code = NULL,
subnational_entity_name = NULL,
municipality = NULL,
level = NULL,
type = NULL,
date_min = NULL,
date_max = NULL,
date_time_created_min = NULL,
date_time_created_max = NULL,
date_time_last_edited_min = NULL,
date_time_last_edited_max = NULL,
query_filter = NULL,
use_testing_server = pal::pkg_config_val(key = "use_testing_server", pkg = this_pkg)
)
is_draft |
|
country_code |
The |
subnational_entity_name |
The |
municipality |
The |
level |
The |
type |
The |
date_min |
The minimum |
date_max |
The maximum |
date_time_created_min |
The minimum |
date_time_created_max |
The maximum |
date_time_last_edited_min |
The minimum |
date_time_last_edited_max |
The maximum |
query_filter |
A valid MongoDB JSON query filter document which allows for
maximum control over what data is included. This takes precedence over all of the above listed parameters, i.e. if |
use_testing_server |
Whether or not to use the testing servers instead of the production servers for RDB Services API calls etc. |
A named list with level
as names and referendum counts as values.
Other referendum data functions:
add_rfrnds()
,
assert_vars()
,
delete_rfrnds()
,
download_file_attachment()
,
edit_rfrnds()
,
rfrnd()
,
rfrnd_exists()
,
rfrnds()
,
rfrnds_bkp()
,
validate_rfrnds()
# the whole database (excl. drafts)
rdb::count_rfrnds()
# only Swiss and Austrian referendums
rdb::count_rfrnds(country_code = c("CH", "AT"))
# only Swiss referendums created between 2020 and 2021
rdb::count_rfrnds(country_code = "CH",
date_time_created_min = "2020-01-01",
date_time_created_max = "2021-01-01")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.