Description Usage Arguments Details Value Examples
View source: R/get_nationalvotes.R
get_nationalvotes
is one of the two main functions of swissvote package. It allows to retrieve the results and the counting status for national ballots.
1 2 3 4 5 6 7 | get_nationalvotes(
geolevel = "municipality",
votedates = NULL,
from_date = NULL,
to_date = NULL,
language = "DE"
)
|
geolevel |
geographical level for which the results should be loaded. Options: "national", "canton", "district", "municipality" or "zh_counting_districts".#' @param votedates dates of the ballots to be selected. Default: most recent ballot available. Format: "YYYY-MM-DD". |
votedates |
dates of the ballots to be selected. Default: most recent ballot available. Format: "YYYY-MM-DD". |
from_date |
starting point in time from which vote results should be retrieved. Format: "YYYY-MM-DD". |
to_date |
end point in time to which vote results should be retrieved. Format: "YYYY-MM-DD". |
language |
defines the language of the vote title. Options: "DE" for German, "FR" for French, "IT" for Italian or "RM" for Romansh. |
get_nationalvotes - retrieve vote results for national ballots at district- or municipality level for selected dates or a given date range.
a tibble containing the results
1 2 3 4 5 6 7 8 9 10 11 12 | # Selection by range
results <- get_nationalvotes(
geolevel = "district",
from_date = "2018-01-01",
to_date = "2018-12-31"
)
# Selection by end date only
get_nationalvotes(to_date = "1983-12-04")
# Selection of a specific vote date
get_nationalvotes(votedates = "2014-02-09")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.