Apportionment
Calculator and Comparison
Free to the public for academic, civil, business, or private use.
Apportionment is the mathematical art of fairly sharing indivisible resources among recipients when the numbers don't divide perfectly.
With no perfect solution, there are different methods available which have different biases and therefore different outcomes.
Apportionment per method | ||||||
---|---|---|---|---|---|---|
State Name | Population | Hamilton | Jefferson | Adams | Webster | Huntington-Hill |
24 | 25 | 23 | 24 | 24 | ||
11 | 11 | 10 | 10 | 10 | ||
5 | 4 | 5 | 5 | 5 | ||
3 | 3 | 4 | 4 | 4 | ||
1 | 1 | 2 | 1 | 1 | ||
Total (should always be 44): | 44 | 44 | 44 | 44 | 44 |
Originally created to demonstrate functionality of my Apportionment Library publicly available on NPM.
Installation
npm install apportionment --save
Usage (changes to table above will be reflected in code below)
import { hamilton, jefferson, adams, webster, huntingtonHill } from "apportionment";
const population = [21878, 9713, 4167, 3252, 1065];
const seats = 44;
console.log(hamiltonResult(population, seats)); // => [24, 11, 5, 3, 1]
console.log(jeffersonResult(population, seats)); // => [25, 11, 4, 3, 1]
console.log(adamsResult(population, seats)); // => [23, 10, 5, 4, 2]
console.log(websterResult(population, seats)); // => [24, 10, 5, 4, 1]
console.log(huntingtonHillResult(population, seats)); // => [24, 10, 5, 4, 1]
Methods
Favour | Paradox Safety | Enforces Quota Rule | Summary | Used By | |||
Alabama | Population | New State | |||||
Hamilton Vinton's MethodHare–Niemeyer MethodLargest-Remainder Method | Smaller states if Hare quota, larger states if Droop quota method is used | no | no | no | yes | Everyone's quota gets rounded down, surplus gets distributed to highest remainders first | US H. of Reps. 1852-1900 Legislative elections in some countries |
Jefferson | Larger states | yes | yes | yes | no | Everyone's quota gets rounded down. If there are surplus seats, decrease the divisor and try again. | US H. of Reps. 1792-1832 US H. of Cong. 1791-1842 |
Adams | yes | yes | yes | no | Everyone's quota gets rounded up. If there are too few seats, increase the divisor and try again. | ||
Webster Sainte-Laguë MethodMajor Fractions Method | yes | yes | yes | no | Everyone's quota gets rounded to the nearest whole number. If surplus or too few seats, decrease or increase divisor and try again. | US H. of Reps. 1901, '11, '31 UK selection of MEPs 2003-13 | |
Huntington-Hill | yes | yes | yes | no | Everyone's quota gets rounded to the geometric mean of its adjacent whole numbers. If surplus or too few seats, decrease or increase divisor and try again. | US H. of Reps. since 1941 |