Skip to main content

Unofficial Python micro-library providing programmatic access to Colorado Transparency in Contribution and Expenditure Reporting (TRACER) campaign finance data.

Project description

Although Colorado enjoys excellent campaign finanance reporting regulation, the state publishes that data through single file archives containing CSV reports. The Colorado Secretary of State Elections Divison posts reports (contribution, expenditure, and loan data) through the Colorado Transparency in Contribution and Expenditure Reporting system. This micro-library provides programmatic access to that data source through automated URL generation, file download, archive extraction, and data interpretation.

This is an un-official library for retrieving campaign finance data and is not supported or endorsed by the State of Colorado.

IT IS NO LONGER SUPPORTED AND IS NOT RECOMMENDED FOR FUTURE USE. NOT PYTHON 3 COMPAT.

>>> import pycotracer
>>>
>>> # Report types: REPORT_LOAN_DATA, REPORT_CONTRIB_DATA, REPORT_EXPEND_DATA
>>> all_2013_reports = pycotracer.get_report(2013)
>>> loan_data_2012 = pycotracer.get_report(2012, pycotracer.REPORT_LOAN_DATA)
>>>
>>>
>>> all_2013_reports.keys()
['ExpenditureData', 'LoanData', 'ContributionData']
>>> len(all_2013_reports['ExpenditureData'])
8513
>>> all_2013_reports['ExpenditureData'][0].keys()
['City', 'FirstName', 'LastName', 'ExpenditureAmount', 'Electioneering', ...]
>>>
>>>
>>> len(loan_data_2012)
470
>>> loan_data_2012[0].keys()
['City', 'Zip', 'CommitteeType', 'State', 'Type', 'Amended', ...]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycotracer-0.4.3.tar.gz (10.4 kB view details)

Uploaded Source

File details

Details for the file pycotracer-0.4.3.tar.gz.

File metadata

  • Download URL: pycotracer-0.4.3.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for pycotracer-0.4.3.tar.gz
Algorithm Hash digest
SHA256 9b0b8d8532d9a42fa876aab6027da7ef5da3e04166c2f53e00b84e86753978a2
MD5 7f236ba692ee2de206c5462f1ba311b5
BLAKE2b-256 3dd091a36a8495808b8f34c8c7db33ec7f7efbfb174dd2f669737555f5691795

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page