The Openness Project - New Mexico In Depth Campaign Finance Explorer
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

The Openness Project - 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.


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:

mkvirtualenv openness-project-nmid -p /path/to/your/python3
git clone
cd openness-project-nmid
pip install -r requirements.txt

Next, change your application settings. Start by copying the example

cp nmid/ nmid/

Then set your database name, user and password.

Next, create a postgres database and run the Django migrations to setup the proper tables.

createdb nmid
python migrate

Data import

To import the New Mexico campaign finance data into your database, run the import_data command:

python 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:

python edit_data

Next, group campaigns into races with the make_races command.

python make_races

Finally, run the make_search_index command to generate the search index.

python make_search_index

Redoing an import

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:

python flush_camp_fin

Run the code

Run the server with the following:

workon openness-project-nmid
python runserver

Then, navigate to: http://localhost:8000/


  • Eric van Zanten - developer
  • Derek Eder - developer
  • Regina Compton - developer
  • Jean Cochrane - developer

Errors / Bugs

If something is not behaving intuitively, it is a bug, and should be reported. Report it here: