Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Thomas Lo Russo ad92276c71
Add publiccode.yml
Add config-file to allow indexing of the Repo in the Open Source Catalog for the Swiss public administration

https://www.opensource.admin.ch/de/?type=cantons
2026-08-20 16:47:59 +02:00
.github/workflows additional branch for tic 2024-11-27 14:44:16 +00:00
data finalised switching to base 2024-11-26 19:39:47 +00:00
data-raw finalised switching to base 2024-11-26 19:39:47 +00:00
docs update Readme 2024-12-19 13:55:45 +00:00
man Minor corrections 2025-11-03 11:36:25 +00:00
R Minor corrections 2025-11-03 11:36:25 +00:00
tests Add new rmse_cutoff() function 2025-10-20 15:52:45 +00:00
vignettes modify paragraph title in vignette 2024-12-18 21:04:30 +00:00
.gitignore finalised vignettes 2024-11-27 15:02:27 +00:00
.Rbuildignore add hex sticker / add buildignore entry 2024-12-19 13:27:15 +00:00
_pkgdown.yml Bootstrap theme changed 2024-12-12 07:02:09 +00:00
DESCRIPTION Increment version number to 0.3.0 2025-11-03 11:44:56 +00:00
LICENSE finalised prediction functions 2024-11-01 16:05:41 +00:00
LICENSE.md finalised prediction functions 2024-11-01 16:05:41 +00:00
NAMESPACE Add new rmse_cutoff() function 2025-10-20 15:52:45 +00:00
NEWS.md Update news 2025-11-03 11:46:41 +00:00
plausi.Rproj Minor corrections 2025-11-03 11:36:25 +00:00
plausi_hex.png add hex sticker / add buildignore entry 2024-12-19 13:27:15 +00:00
publiccode.yml Add publiccode.yml 2026-08-20 16:47:59 +02:00
README.md update organisation name 2026-07-07 16:53:16 +02:00
README.Rmd update Readme 2024-12-19 13:55:45 +00:00
tic.R initialise github actions 2024-10-25 13:53:51 +00:00

🗳 Plausi Package

Predict votes and detect anomalies using R.

tic License:
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 with:

# install.packages("devtools")
devtools::install_github("machinelearningZH/plausi")

Usage

Attach the package and you are good to go.

library(plausi)

All you need now is data. The easiest way to access data on popular votes in Switzerland is via the swissdd package, with which you can easily get a wide range of vote results, for example the results of the national votes from 2024-11-24:

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 and Team Data of the Office for Statistics and Data 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 or share your ideas by opening an issue or a pull requests.