A Matplotlib representation of CGP Grey's Electoral College spreadsheet. This animates the number of representatives, people to representative ratio, and priority number calculations.
See Running for instructions on how to get started
usage: python source/bar_chart.py [-h] -f FILE [-d]
Show an animation of the Huntington–Hill apportionment method
optional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE Path to CSV state population data
-d, --debug Show the plot instead of writing to file
- Create
conda
env fromenvironment.yml
(see Install Conda) - From the root of the folder,
python ./source/bar_chart.py -f ./data/state-populations.csv
- The resulting video is put into ./recordings
- If there are any errors, they are most likely backend related.
From this video.
Update/Change the state population data by putting your own data into state-populations.csv or pass the new name of the file from the command line.
The CSV file should not have a header.