| Title: | Apportion Seats |
|---|---|
| Description: | 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>. These methods are also sometimes used for allocating seats by votes in proportional representation systems. |
| Authors: | Christopher T. Kenny [aut, cre] (ORCID: <https://orcid.org/0000-0002-9386-6860>), Cory McCartan [aut] (ORCID: <https://orcid.org/0000-0002-6251-669X>) |
| Maintainer: | Christopher T. Kenny <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-29 19:28:27 UTC |
| Source: | https://github.com/christopherkenny/apportion |
A divisor method that uses ceiling (round-up) rounding, proposed by John Quincy Adams. It was never adopted for US Congressional apportionment.
app_adams(size, pop)app_adams(size, pop)
size |
An integer number of seats to apportion across units, or a vector of numbers
of seats, one for each column of |
pop |
A vector or matrix of population sizes or proportions for each unit. If a matrix is provided, the apportionment algorithm is applied columnwise: each row is a unit and each column is a replicate. For example, with congressional apportionment, the matrix would have 50 rows and as many columns as hypothetical census population scenarios. |
The Adams method finds a common divisor such that ceiling-rounded
quotients sum to the desired house size:
where is the population of unit and is the total
number of seats (size). The divisor is adjusted iteratively until
this condition is met.
Because every non-zero fractional remainder is always rounded up, the Adams method is the most generous to small units among the classical divisor methods. Any unit with a positive population receives at least one seat, which can over-represent small states or parties relative to their population share.
An integer vector or matrix of the same dimensions as pop, containing the
number of seats apportioned to each unit.
app_adams(size = 435, pop = state_2020$pop)app_adams(size = 435, pop = state_2020$pop)
A quota method that satisfies the quota property and avoids the Alabama paradox, proposed by Michel Balinski and H. Peyton Young.
app_balinski_young(size, pop, init = NULL)app_balinski_young(size, pop, init = NULL)
size |
An integer number of seats to apportion across units, or a vector of numbers
of seats, one for each column of |
pop |
A vector or matrix of population sizes or proportions for each unit. If a matrix is provided, the apportionment algorithm is applied columnwise: each row is a unit and each column is a replicate. For example, with congressional apportionment, the matrix would have 50 rows and as many columns as hypothetical census population scenarios. |
init |
A vector or matrix of the same size as |
Let the exact quota for unit be:
where is the population of unit , is the total
number of seats (size), and is the total population.
The method guarantees the quota property: each unit receives either
or seats, so no unit is
over- or under-represented by more than one seat relative to its exact quota.
Seats are awarded sequentially using the D'Hondt priority
, but with an upper quota cap: once a unit has
received seats it is excluded from further
consideration. This cap prevents the runaway over-representation that the
unconstrained Jefferson/D'Hondt method can produce, while preserving freedom
from the "Alabama paradox," in which increasing
the total house size can paradoxically cause a unit to lose a seat.
Balinski and Young proved that no apportionment method can simultaneously satisfy the quota property and avoid all paradoxes; this method is a practical compromise that prioritizes the quota property.
An integer vector or matrix of the same dimensions as pop, containing the
number of seats apportioned to each unit.
Balinski, M. L., & Young, H. P. (2001). Fair Representation: Meeting the Ideal of One Man, One Vote (2nd ed.). Brookings Institution Press.
app_balinski_young(size = 435, pop = state_2020$pop)app_balinski_young(size = 435, pop = state_2020$pop)
A divisor method that rounds at the harmonic mean of consecutive integers.
app_dean(size, pop)app_dean(size, pop)
size |
An integer number of seats to apportion across units, or a vector of numbers
of seats, one for each column of |
pop |
A vector or matrix of population sizes or proportions for each unit. If a matrix is provided, the apportionment algorithm is applied columnwise: each row is a unit and each column is a replicate. For example, with congressional apportionment, the matrix would have 50 rows and as many columns as hypothetical census population scenarios. |
The Dean method finds a common divisor and rounds each quotient at
the harmonic mean of the two surrounding integers. A quotient
that falls between integers and is
rounded up to if it exceeds the harmonic mean:
and rounded down to otherwise. The divisor is adjusted iteratively
until the total allocation equals size.
Among the classical divisor methods, the Dean method minimizes the absolute
difference in average district population (i.e., , where
is the number of seats awarded to unit ) between any two
units. It falls between the Webster and Huntington-Hill methods in its
treatment of small versus large units, giving slightly more seats to small
units than Webster but fewer than Huntington-Hill.
An integer vector or matrix of the same dimensions as pop, containing the
number of seats apportioned to each unit.
app_dean(size = 435, pop = state_2020$pop)app_dean(size = 435, pop = state_2020$pop)
A sequential priority method widely used for proportional representation elections, including in Belgium, Spain, Portugal, the Netherlands, Austria, and many other countries. Mathematically equivalent to the Jefferson method, a procedure described by Thomas Jefferson, and also known as the greatest divisors method. Compared with the Webster/Sainte-Laguë method, D'Hondt/Jefferson tends to give a slight advantage to larger units.
app_dhondt(size, pop, init = NULL) app_jefferson(size, pop, init = NULL)app_dhondt(size, pop, init = NULL) app_jefferson(size, pop, init = NULL)
size |
An integer number of seats to apportion across units, or a vector of numbers
of seats, one for each column of |
pop |
A vector or matrix of population sizes or proportions for each unit. If a matrix is provided, the apportionment algorithm is applied columnwise: each row is a unit and each column is a replicate. For example, with congressional apportionment, the matrix would have 50 rows and as many columns as hypothetical census population scenarios. |
init |
A vector or matrix of the same size as |
The D'Hondt method allocates seats sequentially. At each step, the next seat is awarded to the unit (party or state) with the highest quotient:
where is the population or vote total of unit and
is the number of seats it currently holds. This process repeats
until all size seats have been awarded.
The Jefferson method finds a common divisor such that floor-rounded
quotients sum to the desired house size:
where is the population of unit and is the total
number of seats (size). The divisor is decreased iteratively until
this condition is met.
The Jefferson method is mathematically equivalent to the D'Hondt method: both
produce the same allocation. The Jefferson divisor formulation and the
sequential D'Hondt priority are two perspectives on
the same apportionment rule.
An integer vector or matrix of the same dimensions as pop, containing the
number of seats apportioned to each unit.
app_dhondt(size = 435, pop = state_2020$pop)app_dhondt(size = 435, pop = state_2020$pop)
A largest-remainder quota method used for US Congressional apportionment from 1850 to 1900. Also known as the Hamilton method or the Vinton method. Equivalent to the largest remainder method using the Hare quota.
app_hamilton_vinton(size, pop)app_hamilton_vinton(size, pop)
size |
An integer number of seats to apportion across units, or a vector of numbers
of seats, one for each column of |
pop |
A vector or matrix of population sizes or proportions for each unit. If a matrix is provided, the apportionment algorithm is applied columnwise: each row is a unit and each column is a replicate. For example, with congressional apportionment, the matrix would have 50 rows and as many columns as hypothetical census population scenarios. |
The Hamilton-Vinton method first computes the exact quota for each unit:
where is the population of unit , is the total
number of seats (size), and is the total population.
Each unit initially receives seats. Any remaining
seats are awarded one at a time to the units with the largest fractional
remainders .
The method satisfies the quota property: no unit ever receives fewer than
or more than seats.
However, it is susceptible to the "Alabama paradox," in which increasing
the total house size can paradoxically cause a unit to lose a seat.
An integer vector or matrix of the same dimensions as pop, containing the
number of seats apportioned to each unit.
app_hamilton_vinton(size = 435, pop = state_2020$pop)app_hamilton_vinton(size = 435, pop = state_2020$pop)
The current method used for US Congressional apportionment, in continuous use since the Apportionment Act of 1941. Also known as the method of equal proportions.
app_huntington_hill(size, pop, init = NULL, thresh = 0)app_huntington_hill(size, pop, init = NULL, thresh = 0)
size |
An integer number of seats to apportion across units, or a vector of numbers
of seats, one for each column of |
pop |
A vector or matrix of population sizes or proportions for each unit. If a matrix is provided, the apportionment algorithm is applied columnwise: each row is a unit and each column is a replicate. For example, with congressional apportionment, the matrix would have 50 rows and as many columns as hypothetical census population scenarios. |
init |
A vector or matrix of the same size as |
thresh |
A population threshold for assigning seats. Units with
population below this threshold receive zero seats, by default. Only affects
the default value of |
The Huntington-Hill method is a sequential priority method. Starting with one seat allocated to each unit (a constitutional minimum for Congressional apportionment), it repeatedly awards the next seat to the unit with the highest priority value:
where is the population of unit and is the number
of seats currently held by unit .
This is equivalent to a divisor method that rounds each quotient at the
geometric mean of the two surrounding integers: is rounded
up to if it exceeds , and down to
otherwise. Among the divisor methods, Huntington-Hill minimizes the maximum
relative difference in representation between any two units.
An integer vector or matrix of the same dimensions as pop, containing the
number of seats apportioned to each unit.
Huntington, E. V. (1928). The apportionment of representatives in Congress. Transactions of the American Mathematical Society, 30(1), 85–110. doi:10.2307/1989268
app_huntington_hill(size = 435, pop = state_2020$pop)app_huntington_hill(size = 435, pop = state_2020$pop)
A divisor method that uses standard arithmetic-mean rounding, used for US Congressional apportionment in 1842 and from 1911 to 1931. Also used in Norway and Sweden for parliamentary seat allocation (where it is known as the Sainte-Laguë method).
app_webster(size, pop, init = NULL)app_webster(size, pop, init = NULL)
size |
An integer number of seats to apportion across units, or a vector of numbers
of seats, one for each column of |
pop |
A vector or matrix of population sizes or proportions for each unit. If a matrix is provided, the apportionment algorithm is applied columnwise: each row is a unit and each column is a replicate. For example, with congressional apportionment, the matrix would have 50 rows and as many columns as hypothetical census population scenarios. |
init |
A vector or matrix of the same size as |
The Webster method finds a common divisor such that
standard-rounded quotients sum to the desired house size:
where is the population of unit and is the total
number of seats (size). Quotients are rounded at the arithmetic mean
of consecutive integers and .
Among the classical divisor methods, Webster is considered the most statistically unbiased: it does not systematically favor either large or small units. It minimizes the expected absolute deviation from exact quotas when populations are drawn from a wide range of sizes.
An integer vector or matrix of the same dimensions as pop, containing the
number of seats apportioned to each unit.
app_webster(size = 435, pop = state_2020$pop)app_webster(size = 435, pop = state_2020$pop)
tibble with columns:
GEOID: Federal Information Processing Standards code
name: State name
pop: 2020 census population
abb: Two-letter postal abbreviation
head(state_2020)head(state_2020)