https://github.com/datamade/openness-project-nmid
Money Trail NM - New Mexico In Depth's Campaign Finance Explorer
https://github.com/datamade/openness-project-nmid
campaign-finance new-mexico
Last synced: about 2 months ago
JSON representation
Money Trail NM - New Mexico In Depth's Campaign Finance Explorer
- Host: GitHub
- URL: https://github.com/datamade/openness-project-nmid
- Owner: datamade
- Created: 2016-07-05T18:32:09.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2024-05-28T23:12:14.000Z (about 1 year ago)
- Last Synced: 2024-05-29T06:57:28.952Z (about 1 year ago)
- Topics: campaign-finance, new-mexico
- Language: Python
- Homepage: https://moneytrailnm.com
- Size: 973 MB
- Stars: 3
- Watchers: 5
- Forks: 1
- Open Issues: 33
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Money Trail NM - New Mexico Campaign Finance Site
This site brings greater transparency to New Mexico politics by providing an overview of campaign contributions, expenditures, and the people, businesses, and organizations involved.
## Development
Development requires a local installation of [Docker](https://docs.docker.com/install/)
and [Docker Compose](https://docs.docker.com/compose/install/).To run the application, first build the app image:
```bash
docker-compose build
```Next, load in data and build your search index:
```bash
docker-compose run --rm app python make nightly
docker-compose run --rm app python manage.py make_search_index
```To enable candidate merging for local development, create an admin user (`python manage.py createsuperuser`) and turn on database caching by adding `DJANGO_CACHE_BACKEND: "db.DatabaseCache"` to the environment block in `docker-compose.yml`. (django-select2 requires a persistent cache.) _This step is not necessary if you do not need to test merge functionality._
Finally, run the app:
```bash
docker-compose up
```The app will be available at http://localhost:8000. The database will be exposed
on port 32001.## Resetting the database
The data import scripts for this app will automatically recognize if you have data imported, and add or update new data accordingly. However, if you'd like to start over from scratch but don't want to delete your user and page data, you can start by running the `flush_camp_fin` command to flush campaign finance data from the database:
```bash
docker-compose run --rm app python manage.py flush_camp_fin
```## ETL
The nightly and quarterly ETL scripts are run in a separate repo, through github actions: https://github.com/datamade/nmid-scrapers## Errors / Bugs
If something is not behaving intuitively, it is a bug, and should be reported.
Report it here: https://github.com/datamade/openness-project-nmid/issues