Skip to content

vote/enip-backend

Repository files navigation

Election Night Integrity Project Backend

This is the backend for the Election Night Integrity Project, built by Data for Progress and VoteAmerica.

The job of the backend is to:

  • Ingest data from the AP Elections API, historical data sources, and live commentary spreadsheets and write it to a Postgres database
  • Export data from the Postgres database to populate static JSON files in S3 that are consumed by the frontend.

Dev environment

  1. To spin up a Postgres database for development, run docker-compose up.
  2. Then, migrate your database with scripts/migrate-db.sh. You can connect with scripts/psql.sh.
  3. Copy .env.example to .env and fill in your AP API key.

Ingest

The ingester is responsible for importing all of our data sources into Postgres.

You can run the ingester with: pipenv run python -m enip_backend.ingest.run.

Export

The exporter is responsible for updates all the exports in S3 based on the latest data in Postgres.

You can run the exporter with: pipenv run python -m enip_backend.export.run

About

Election Night Integrity Project Backend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •