https://github.com/machinelearningzh/plausi
Detect Anomalies in Vote-Results - powered by Statistics & Machine Learning
https://github.com/machinelearningzh/plausi
Last synced: about 1 year ago
JSON representation
Detect Anomalies in Vote-Results - powered by Statistics & Machine Learning
- Host: GitHub
- URL: https://github.com/machinelearningzh/plausi
- Owner: machinelearningZH
- License: other
- Created: 2024-10-22T08:59:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-19T16:35:53.000Z (over 1 year ago)
- Last Synced: 2025-03-30T02:31:48.886Z (about 1 year ago)
- Language: R
- Homepage: https://machinelearningzh.github.io/plausi/
- Size: 9.31 MB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---
# 🗳 Plausi Package
**Predict votes and detect anomalies using R.**
[](https://github.com/machinelearningZH/plausi/actions)
[](https://opensource.org/licenses/MIT)

The Plausi package is designed for R-supported election forensics. It provides functions that enable the identification of statistical irregularities and anomalies in vote results.
Key features include:
- Robust outlier detection for small sample sizes and skewed distributions
- Calculation of differences between all possible combinations of turnout-levels (e.g., for systematic comparison of voter turnout across all voting districts)
- Prediction of expected results using machine learning algorithms (e.g., yes-vote proportions, voter turnout, etc.)
It serves as a basis for the ___PlausiApp___, which is used for vote result quality control in different cantons (TG / SG / ZH).
For the moment, the ___PlausiApp___ is made available upon request via a private Repo (mailto:wahlen@statistik.zh.ch).
## Installation
You can install the plausi package from [GitHub](https://github.com/) with:
```{r eval=FALSE}
# install.packages("devtools")
devtools::install_github("machinelearningZH/plausi")
```
## Usage
Attach the package and you are good to go.
```{r eval=FALSE}
library(plausi)
```
All you need now is data. The easiest way to access data on popular votes in Switzerland is via the [swissdd package](https://github.com/politanch/swissdd), with which you can easily get a wide range of vote results, for example the results of the national votes from 2024-11-24:
```{r eval=FALSE}
devtools::install_github("politanch/swissdd")
vote_data <- swissdd::get_nationalvotes(geolevel = "municipality", votedates = "2024-11-24")
```
## Licensing
The package is licensed under the MIT license.
## Project team
This is a joint project of the [Vote & Election-Team](https://www.zh.ch/de/direktion-der-justiz-und-des-innern/statistisches-amt/wahlen-und-abstimmungen.html) and [Team Data](https://www.zh.ch/de/direktion-der-justiz-und-des-innern/statistisches-amt/data.html) of the Statistical Office of the Canton of Zurich. Responsible: Simon Graf, Thomas Lo Russo and Thomas Knecht.
## Feedback and contributing
We would love to hear from you. Please share your feedback and let us know how you use the code. You can [write an email](mailto:wahlen@statistik.zh.ch) or share your ideas by opening an issue or a pull requests.