Skip to main content

OpenFEC API client for researching the political spending of executives

Project description

ckey

OpenFEC API client for researching the political ideology of executives

Copyright (c) 2024 Justin G. Davis.

Overview

Ckey is a data collection and analysis tool that uses executive information from ExecuComp to capture political contribution data from openFEC, the Federal Election Commission (FEC) API. It allows researchers to construct measures of executive political ideology based on the executives' political contributions.

Disclaimer - Ckey is not affiliated with, endorsed by, or vetted by ExecuComp.

Features

  • User-Friendly - Designed for researchers with minimal Python experience
  • Data Processing - Automated cleaning and formatting of ExecuComp data
  • API Integration - Efficient data collection from openFEC API with built-in rate limiting
  • Compliance - Integrated adherence to openFEC API usage policies
  • Political Analysis - Construction of all commonly used political ideology measures
  • Accurate Matching - Robust executive-to-contribution matching using name, employer, and occupation verification

Installation

pip install ckey

Prerequisites & Dependencies

Prerequisites

  • Python 3.6 or higher
  • Access to ExecuComp data
  • FEC API key (obtain from FEC.gov)

Python Dependencies

  • pandas >= 2.0.0
  • requests >= 2.31.0
  • ThreadPoolExecutorPlus >= 0.2.2

Note: Python dependencies are automatically installed during the pip installation

Usage Guide

Basic Usage

import ckey

ckey.run(
    data_path='your ExecuComp data.csv',
    id_column='exec id column in the data',
    name_column='name column in the data',
    company_column='company column in the data',
    year_column='year column in the data',
    key='YOUR_API_KEY'
)

For detailed usage instructions and methodology, please see:

[Citation information to be added]

Citation

If you use this tool in your research, please cite:

[Citation information to be added]

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Thank you to:

  • The FEC for providing and maintaining the openFEC API.
  • The openFEC support staff for their assistance throughout the development process.

Author

Justin G. Davis

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

ckey-1.0.0a1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ckey-1.0.0a1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file ckey-1.0.0a1.tar.gz.

File metadata

  • Download URL: ckey-1.0.0a1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.0

File hashes

Hashes for ckey-1.0.0a1.tar.gz
Algorithm Hash digest
SHA256 304329d65f3fbbceac60f4618e54ac6becff17ce7d5365966a0f5195aa5f3750
MD5 829085616b6c4bccb307fa337c7c0ae1
BLAKE2b-256 5b3f701a1efcc02fe8f4c39a17d6c5c254bc2d65f0184f22f51c6485ca971fd4

See more details on using hashes here.

File details

Details for the file ckey-1.0.0a1-py3-none-any.whl.

File metadata

  • Download URL: ckey-1.0.0a1-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.0

File hashes

Hashes for ckey-1.0.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 aa28c5d87a95424a5d2efd541bcbaa8df05054081e390ab62cca680bdad8628d
MD5 09491e684873d07e36530c739f97d560
BLAKE2b-256 c800afdbba5347edc7da19a416a4c414b7e36a83881c68d33f4982bb1394cfa2

See more details on using hashes here.

Supported by

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