The webview for the CERP project. See CERP-backend for the backened.
Community Elections Resources and Polling Tool
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.
These steps only need to be performed once.
Verify Required Applications
This project is confirmed to work with a minimum of
node 6.11.3 and
email@example.com. If you do not wish to install the minimum version of Node system-wide, you have a couple of options:
- nvm (Node Version Manager) (recommended) allows you to use multiple versions of Node and
npmon the same machine. Once you have followed the installation instructions, run:...to automatically set the appropriate versions for this project.
- Docker is a more complex alternative that will not be covered here, but feel free to use it or any other method you want.
Set the API Source
In src/config.js, uncomment the applicable option (and comment the other two) for
||Front AND back end development (be sure to start the Python server first)|
||Front end development|
||Building for production. DON'T FORGET TO CHANGE CONFIG TO THIS IF BUILDING FOR PRODUCTION.|
Once you have completed the initial setup steps above, follow these instructions to start developing.
Start the Server
To start a local web server with hot reload (browser will refresh automatically when files are changed) at localhost:8080:
npm run dev
Several commands exist for periodically running various tests on the code:
npm run unit
npm run e2e
Building and Testing
Building the project is a step for individuals responsible for updating the production environment. Before running these steps, please be sure you have cloned CERP-backend as the build expects the directory.
To periodically build the project for production with minification:
npm run build
Or, to build for production and view the bundle analyzer report:
npm run build --report
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.