Skip to content

chihacknight/chicago-elections-archive

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chicago Elections Archive

Explore precinct-level results from recent and historical Chicago elections.

Screenshot of northeast Illinois presidential results

Setup - native

poetry install
npm install
make all

Setup - Docker

Set up local environment variables:

cp .env.sample .env

Build the containers and make the data:

docker-compose build

Run the site locally:

docker-compose up

Updating Data

To update data, modify the ELECTIONS variable in scripts/scrape_results_metadata.py with the ID from the Board of Election Commissioners website, and then regenerate input/results-metadata.json and output/results-metadata.json. Then re-run make all, or docker-compose run --rm app make all forcing execution if necessary.

Once this is done, make build-output can be run to GZIP all files in a separate directory that can be deployed to cloud storage with make deploy.

To update the displayed elections on the site, update ELECTION_ORDER in site/_data/site.js.

Data Notes

  • Missing precincts for years:
    • a few missing for 2004, 2003, 2002
    • 2000 missing a good amount
    • 1983 missing a few

About

Explore precinct-level results from historical Chicago elections

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 61.6%
  • Python 14.2%
  • CSS 9.7%
  • Makefile 7.0%
  • Nunjucks 6.9%
  • Dockerfile 0.5%
  • HTML 0.1%