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.
Example
apportion has several apportionment methods, each of which take two required arguments:
-
size: the number of seats to apportion across units -
pop: population sizes or proportions for each unit
Several methods also support an init argument for applying apportionment on top of an initial allocation.
library(apportion)
## basic example code
data('state_2020')
app_huntington_hill(size = 435, pop = state_2020$pop)
#> [1] 7 1 9 4 52 8 5 1 28 14 2 2 17 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 1 9 38 4 1 11 10 2 8 1Implemented methods:
- the Adams method (
app_adams()) - the Balinski Young method (
app_balinski_young()) - the Dean method (
app_dean()) - the D’Hondt (Jefferson, greatest divisors) method (
app_dhondt()andapp_jefferson()) - the Hamilton-Vinton (Hare) method (
app_hamilton_vinton()) - the Huntington-Hill (Equal proportions) method (
app_huntington_hill()) - the Webster (Sainte-Laguë) method (
app_webster())
