For doing proportional allocation and representation Implements both highest averages (d'Hondt, Sainte-Lague, Huntington-Hill) and largest-remainder methods.
- PropAlloc.py -- in Python. File contains instructions on how to use it.
- GeneralAlloc.py -- reads in a file and runs some proportional-allocation algorithms on it.
- USHouseAlloc.py -- for the US House of Representatives.
- Proportional Allocation.nb -- in Mathematica.
Data for USHouseAlloc.py -- from US Census data and estimates
- US States 1790.txt -- seats: 105
- US States 2010.txt -- seats: 435
- US States 2019 Est.txt -- estimate
- US States 2019 DC Est.txt -- estimate with Washington DC added
- US States 2019 DC PR Est.txt -- estimate with DC and Puerto Rico added
- US States 2020.txt -- census results
- US States 2020 DC.txt -- census results with Washington DC added
- US States 2020 DC PR.txt -- census results with DC and Puerto Rico added
Data for GeneralAlloc.py
- Votes - Absurd Parties.txt
- Votes - Colors.txt
- Votes - Ice Cream Flavors.txt