Apportion Seats

Convert populations into integer number of seats for legislative bodies. Implements apportionment methods used historically and currently in the United States for reapportionment after the Census, as described in < https://www.census.gov/history/www/reference/apportionment/methods_of_apportionment.html>.


apportion

R-CMD-check

apportion provides different apportionment methods for allocating seats across states. These methods are also sometimes used for allocating seats by votes in proportional representation systems.

Installation

You can install the development version of apportion like so:

remotes::install_github('christopherkenny/apportion')

Example

apportion has several apportionment methods, each of which take two required arguments: - size: the number of seats to apportion across units - pop: a vector of population sizes for each unit

library(apportion)
## basic example code
data('state_2020')

app_adams(size = 435, pop = state_2020$pop)
#>  [1]  7  1  9  4 50  8  5  2 27 14  2  3 16  9  4  4  6  6  2  8  9 13  8  4  8
#> [26]  2  3  4  2 12  3 26 14  1 15  5  6 17  2  7  2  9 37  5  1 11 10  3  8  1

Implemented methods include:

  • the Adams Method (app_adams())
  • the Balinski Young Method (app_balinski_young())
  • the Dean Method (app_dean())
  • the D’Hondt Method (app_dhondt())
  • the Hamilton-Vinton Method (app_hamilton_vinton())
  • the Huntington-Hill Method (app_huntington_hill())
  • the Jefferson Method (app_jefferson())
  • the Webster Method (app_webster())

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("apportion")

0.0.2 by Christopher T. Kenny, a year ago


https://github.com/christopherkenny/apportion, http://christophertkenny.com/apportion/


Report a bug at https://github.com/christopherkenny/apportion/issues


Browse source code at https://github.com/cran/apportion


Authors: Christopher T. Kenny [aut, cre] (ORCID:


Documentation:   PDF Manual  


MIT + file LICENSE license


Suggests testthat


See at CRAN