Proportional Apportionment
Apply quorum to votes vector or matrix
Biproportional apportionment
Rounding with predefined thresholds
Find which party has the most votes in a district
Calculate raw seat matrix
Divisor methods
Find divisor to assign seats
Find divisors for a matrix with alternate scaling
Get district and party divisors from biproporz result
Highest averages method
Largest remainder method
Lower apportionment
Pivot long data.frame to wide matrix and vice versa
List of method names and their implementation
Proportional apportionment
Biproportional apportionment with data frames
Create quorum functions for biproportional apportionment
Check if parties reached a quorum in at least one district
Check if parties reached the quorum for all votes
Apply a list of quorum functions to a votes matrix
Use biproportional apportionment interactively in a shiny app
Upper apportionment
Create weighted votes matrix
Calculate seat apportionment for legislative bodies with various methods. The algorithms include divisor or highest averages methods (e.g. Jefferson, Webster or Adams), largest remainder methods and biproportional apportionment. Gaffke, N. & Pukelsheim, F. (2008) <doi:10.1016/j.mathsocsci.2008.01.004> Oelbermann, K. F. (2016) <doi:10.1016/j.mathsocsci.2016.02.003>.
Useful links