Description Usage Arguments Value Examples
View source: R/swiss_json_to_dfr.R
swiss_json_to_dfr
transforms the json containing the results of a selected federal votedate into a tibble.
1 2 3 4 5 6 7 8 | swiss_json_to_dfr(
votedate = NULL,
geolevel = "municipality",
dataurl = NULL,
index = NULL,
language = "DE",
call_res
)
|
votedate |
date of the ballot. Default: most recent ballot available. To select multiple ballots use the 'get_swissvotes'-function. Format = YYYYMMDD |
geolevel |
geographical level for which the results should be loaded. Options: "national", "canton", "district" or "municipality". |
dataurl |
url of the dataset on opendata.swiss |
index |
selection by index of the resource (last published = 1). |
language |
defines the language of the vote title. Options: "DE" for German, "FR" for French, "IT" for Italian or "RM" for Romansh. |
call_res |
result of a previous call to the base API. Optional argument. |
a tibble containing the results
1 2 3 4 5 | # Transform the json of the most recent vote
results <- swiss_json_to_dfr()
# Transform the json of a selected votedate
swiss_json_to_dfr(votedate = "2019-02-10")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.