Swissdd can be installed from github (on going updates) devtools::install_github("politanch/swissdd")
.
swissdd
builds upon real time data service for federal and cantonal votes provided by the Federal Statistical Office via opendata.swiss. It brings the results of popular votes, aggregated at the geographical level of choice, straight into R. Available levels are
- national
- cantons
- districts
- municipalities
The package wraps the real time data on vote Sundays. As soon as the ballots close (from 12:00 on), the datastream is continuosly updated, until the data for all municipalities is complete and the final results are available. Additionally, it allows to access the archive and to retrieve the harmonized results of national votes since 1981. Thanks to a major contribution of David Zumbach the latest version contains new functions to retrieve geodata of administrative boundaries and plot vote results maps.
It also allows to retrieve data from the swissvotes-database, the most comprehensive database on swiss popular votes.
The documentation is available here: https://politanch.github.io/swissdd/
The webservice of the FSO is documented on opendata.swiss (language settings can be found at the bottom of the page):
https://opendata.swiss/de/dataset/echtzeitdaten-am-abstimmungstag-zu-kantonalen-abstimmungsvorlagen