Community Elections Resources and Polling Tool (CERP)
The backend for the CERP project. See CERP-webview for the frontend.
Provide information on local elections, politicians, issues, and political outcomes. Visualize and share results.
Election information should be available to citizens in an easy to understand, fun to explore, and overall interesting way so that our community can better understand itself and its political past, present, and future.
Larimer County provides information about elections at a precinct level, but the information is provided as a table of statistics. We are striving to improve the explorability of the data by building a website that lets Larimer County citizens view results on a map, compare precincts, and discover ways to reach out to elected officials.
Detailed Project Requirements
- Show election information on a heat map of precincts in Larimer County.
- Display all election outcomes for a precinct on the same page.
- Allow different "views" of the data to be shared via hyperlinks.
This project has two parts:
- A front end built on Vue.js and located in its own repository. Be sure to clone that repo and follow the setup steps!
- A back end (this repo) built with Python + Flask. You can learn the purpose of each file in DEFINTION.md.
These steps only need to be performed once.
Verify Required Applications
manage application is OS-agnostic, it assumes that the current version of Python (
~3.6) and all packages for the application are installed correctly and exist in your current
To get started on a Linux or Linux-like environment (e.g. OS X), create a Python virtual environment and install the project's requirements:
python3 -m venv venv . venv/bin/activate pip install --upgrade pip pip install -r requirements.txt
You can read about
Once you have completed the initial setup steps above, follow these instructions to start developing.
Start the Server
Whenever you want to view or develop the application, activate the Python virtual environment then start the Flask server:
. venv/bin/activate python manage.py run # OR alternate shorthand/alias python manage.py r
Tests and Coverage Report (as needed)
To periodically run Python tests:
python manage.py test # OR alternate shorthand/alias python manage.py t
To generate a coverage report:
python manage.py coverage # OR alternate shorthand/alias python manage.py c
We welcome new contributors. Be sure to check out guide on contributing, which includes instructions on how to fork, clone, branch, commit, pull request and sync your fork.
TL;DR Contribution Workflow:
- Fork this repository and Clone your fork locally.
- Checkout a new branch on which to make your changes.
- Make edits. Try to match existing coding style.
- Test your changes.
- Commit your changes. Push your changes to your fork on GitHub.
- Submit a new pull request and your changes will be reviewed and merged.
Bugs / Feedback / Suggestions
We encourage you to open up an issue if you have any feedback, suggestions or bugs.
MIT, see LICENSE for full license.