Skip to content

Calculates the allocation of seats in the House of Representatives based on the Jefferson, Hamilton, Webster, and Huntington-Hill methods of apportionment.

Notifications You must be signed in to change notification settings

swag/apportionment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Apportionment Calculator

Calculates the allocation of seats in the House of Representatives based on the Jefferson, Hamilton, Webster, and Huntington-Hill methods of apportionment. You can read more about apportionment here.

The file apportionment.js contains the program in its entirety. It is currently configured to calculate seat assignments prior to the 1876 US election. Run it by typing "node apportionment.js" and the output will data in CSV format.

Edit the "totalSeats" and "data" variables in order to calculate apportionment for other years.

This program was used to do the research for this visualization of future electoral vote distribution and this article I wrote on how an apportionment error changed the outcome of the 1876 US presidential election.

About

Calculates the allocation of seats in the House of Representatives based on the Jefferson, Hamilton, Webster, and Huntington-Hill methods of apportionment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published