Name: openness-project-nmid
Owner: datamade
Description: The Openness Project - New Mexico In Depth Campaign Finance Explorer
Created: 2016-07-05 18:32:09.0
Updated: 2018-05-18 19:46:01.0
Pushed: 2018-05-18 19:45:59.0
Size: 493415
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This site brings greater transparency to New Mexico politics by providing an overview of campaign contributions, expenditures, and the people, businesses, and organizations involved.
Install app requirements
We recommend using virtualenv and virtualenvwrapper for working in a virtualized development environment. Read how to set up virtualenv.
Once you have virtualenvwrapper set up, do this:
rtualenv openness-project-nmid -p /path/to/your/python3
clone https://github.com/datamade/openness-project-nmid.git
penness-project-nmid
install -r requirements.txt
Next, change your application settings. Start by copying the example settings_local_example.py
mid/settings_local_example.py nmid/settings_local.py
Then set your database name, user and password.
Next, create a postgres database and run the Django migrations to setup the proper tables.
tedb nmid
on manage.py migrate
To import the New Mexico campaign finance data into your database, run the import_data
command:
on manage.py import_data
The version of the data sent to us by the Secretary of State in April 2018
contains a number of errors - primarily candidates that are assigned to the
wrong race. To fix these errors, run the edit_data
command:
on manage.py edit_data
Next, group campaigns into races with the make_races
command.
on manage.py make_races
Finally, run the make_search_index
command to generate the search index.
on manage.py make_search_index
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:
on manage.py flush_camp_fin
Run the server with the following:
on openness-project-nmid
on manage.py runserver
Then, navigate to: http://localhost:8000/
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