Skip to contents

Proportional Apportionment

Proportional apportionment distributes seats for a vector of votes. With proporz(), all divisor or largest remainder methods can be accessed.

proporz()
Proportional apportionment

Divisor Methods

Largest Remainder Method

largest_remainder_method()
Largest remainder method

Biproportional Apportionment

Biproportional apportionment distributes seats for a matrix of votes among parties and districts.

biproporz()
Biproportional apportionment
pukelsheim()
Biproportional apportionment with data frames

Algorithm implementations

upper_apportionment()
Upper apportionment
lower_apportionment()
Lower apportionment

Quorum calculations

quorum_all() quorum_any()
Create quorum functions for biproportional apportionment
reached_quorum_any_district()
Check if lists/parties have reached a quorum in at least one district
reached_quorum_total()
Check if lists/parties have reached the quorum for all votes

Shiny App

run_app()
Use biproportional apportionment interactively in a shiny app

Example Datasets

zug2018
Election Data for the Cantonal Council of Zug (2018)
uri2020
Election Data for the Cantonal Council of Uri (2020)
finland2019
Finnish Parliamentary Elections Data (2019)

Helpers

get_divisors()
Get district and party divisors from biproporz result
district_winner_matrix()
Find which party has the most votes in a district
pivot_to_matrix() pivot_to_df()
Pivot long data.frame to wide matrix and vice versa
ceil_at()
Rounding with predefined thresholds
weight_list_votes()
Create weighted votes matrix