Skip to content

Homebrew API for Montana's Campaign Electronic Reporting System.

Notifications You must be signed in to change notification settings

eidietrich/cers-interface

Repository files navigation

CERS interface

A home-brewed API for Montana's Campaign Electronic Reporting System, or CERS. CERS is operated by Montana's Commissioner of Political Practices as the primary public access point for campaign finance reports submitted by candidates for state office. This project, developed for internal use at Montana Free Press, is designed to allow for easier exports of CERS data to Excel-compatable CSVs and JSON summary files.

Contact [email protected] with questions or bug reports.

Data

Aggregate contribution and expenditure data for each race or category of race (e.g. legislative seats) we've collected so far is available in this repository at cleaned/{year}/{race}. These are .csv files that can be downloaded individually and opened with Microsoft Excel. The committeees race represents reported fundraising and spending by political action committees.

This data should in principle match what is publicly available in CERS, but may be affected by data pipeline bugs we haven't yet caught or resolved. Additionally, the public data includes a number of wrinkles, such as refunds, candidate loans, in-kind donations and occasional data entry errors that need to be considered as it is interpreted.

Data models

CERS tracks two primary entities: candidates, individuals who are seeking public office, and committees, third-party organizations who required to report political spending under state law. See https://politicalpractices.mt.gov/Home/Forms for a list of forms.

This interface system uses the following data models:

For candidates:

  • CandidateList - List of candidates, intended to facilitate data gathering for specific lists of candidates (e.g. statewide candidates who ran in 2022)
  • Candidate - Individual candidates
  • Report - Individual financial reports filed by candidates. Supported types:
    • C-5 reports - periodic campaign finance reporting, comprehensive coverage for their reporting period
    • C-7 reports - notice of last-minute contributions immediately before an election
    • C-7E reports - notice of last-minute spending immediately before an election

For committees:

  • CommitteeList - List of particular types of committees
  • Committee - Individual committees
  • Report - Individual financial reports. Supported types:
    • C-6 reports - periodic campaign finance reports for political committees
    • C-7 reports - notice of last-minute contributions immediately before an election
    • C-7E reports - notice of last-minute spending immediately before an election

Usage scripts

These require you to have a way of running Python 3 with some third-party libraries installed. Run with a command in the form of python3 script-name.py

Update data for 2024 races

  • python3 update-2024.py

Archival 2022 scripts are in archive directory; may need some refactoring.

Script logs 'raw' outputs to non-version-controlled raw/2024 folder, as well as the following outputs to cleaned/2024:

  • contributions.csv — itemized list of contributions available from CERS
  • expenditures.csv - itemized list of expenditures
  • summary.json - totals and other summary information for specific entities and reports

About

Homebrew API for Montana's Campaign Electronic Reporting System.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published