Skip to content

Alex-Yarkosky/apportionmentapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apportionment App

About

Part of an undergraduate senior project on United States apportionment methods; used to do analysis for Satisfactory Justification of the United States’ Apportionment undergraduate senior thesis paper. The application can calculate apportionments for any appropriate house size and any Census from 1900 to 2010 with the following methods:

  • Hamilton
  • Jefferson
  • Lowndes
  • Adams
  • Webster
  • Dean
  • Huntington-Hill

Apportionment can be done individually with results displayed in the terminal or they can be done en masse with results outputted in a CSV file. En masse apportionment can either be for a range of house sizes or be done for each Census from 1900 to 2010. En masse apportionment outputs the method name, census year, house size, and the average constituency size for the full apportionment on each line of the CSV file.

Installation

Clone the repository by downloading the ZIP, using GitHub Desktop, or using the follow command in the terminal: git clone https://github.com/Alex-Yarkosky/apportionmentapp.git.

Requirements

In order to run the test suite, the following commands need to be run on the terminal line beforehand:

  • pip install pytest

Running

From a terminal based in the src folder, run the command python apportionments.py to run the program. Enter 0 anytime it prompts you to select a multiple choice option to exit the program.

Running Test Suite

From a terminal based in the test folder, run the command pytest to run all of the tests in the test_apportionment.py file.

About

Undergraduate senior project on US apportionment methods

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published