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.
- 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.
For a detailed explanation on how things work, check out the guide and docs for vue-loader.
These steps only need to be performed once.
This project is confirmed to work with a minimum of node 6.11.3
and npm@3.10.10
. 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
npm
on the same machine. Once you have followed the installation instructions, run:...to automatically set the appropriate versions for this project.nvm install
- Docker is a more complex alternative that will not be covered here, but feel free to use it or any other method you want.
Install npm
dependencies:
npm install
In src/config.js, uncomment the applicable option (and comment the other two) for API_LOCATION
:
Option | Scenario |
---|---|
http://localhost:5000 |
Front AND back end development (be sure to start the Python server first) |
https://cerp-code-foco.herokuapp.com |
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.
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:
- Unit:
npm run unit
- e2e:
npm run e2e
- All:
npm test
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.
Not sure where to start? Look for open issues on GitHub, or message the team on our Slack site. If you aren't on our Slack, click here for an invite.
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.
We encourage you to open up an issue if you have any feedback, suggestions or bugs.
MIT, see LICENSE for full license.