This repo is no longer maintained. If you’re interested in making campaign finance more accessible for Californians, join us at CA Civic Lab.
This is the front-end AngularJS application for viewing ballot measure funding data. This front-end application works from an API defined by the back-end Django application
Don't forget to run the tests.
$ npm test
The data comes from the disclosure API. The API is incomplete, but the repo has useful information about what the models are shaping up like, even for incomplete APIs. Ballot models are separate from finance data, since that's how the data is ingested, but eventually should be combined for the frontend views.
Url | Description |
---|---|
[disclosure-backend][disclosure-backend] | Disclosure API repo. |
[Disclosure API][disclosure-api] | Documentation for the disclosure API. |
[Disclosure Admin][disclosure-admin] | Admin interface for entering ballot data. |
If you want to test against a development backend, you can set these environment variables
$ DISCLOSURE_STATIC_BACKEND='http://localhost:4567' DISCLOSURE_SWAGGER_SPEC='http://localhost:8000/docs/api-docs/' npm start
And the tests
$ DISCLOSURE_STATIC_BACKEND='http://localhost:4567' DISCLOSURE_SWAGGER_SPEC='http://localhost:8000/docs/api-docs/' npm start
To point this front-end to another (e.g. local test) back-end:
python manage.py runserver
from your back-end repo; this should start your back-end server on port 8000.app/app-init.js
, set $rootScope.swaggerSpec = 'http://127.0.0.1:8000/docs/api-docs/';
.npm install
from inside the repository directory, to install all project dependencies.npm start
This project is open source so collaboration is welcome.
A brief guide:
npm test
before submitting a pull request.Travis will deploy the master
branch to Github Pages. You shouldn't need to manually deploy
but, here are the instructions.
To deploy, just set a personal access token via GITHUB_TOKEN in your environment and run the deploy script. The script will build your working directory as is, and push it to Github pages.
$ GITHUB_TOKEN=<your personal token> ./deploy.sh