Package 'fec16'

Title: Data Package for the 2016 United States Federal Elections
Description: Easily analyze relational data from the United States 2016 federal election cycle as reported by the Federal Election Commission. This package contains data about candidates, committees, and a variety of different financial expenditures. Data is from <https://www.fec.gov/data/browse-data/?tab=bulk-data>.
Authors: Marium Tapal [aut, cre] , Rana Gahwagy [aut], Irene Ryan [aut], Benjamin S. Baumer [aut]
Maintainer: Marium Tapal <[email protected]>
License: CC0
Version: 0.1.4
Built: 2024-11-12 04:56:38 UTC
Source: https://github.com/baumer-lab/fec16

Help Index


House/Senate Current Campaigns

Description

Summary financial information for each campaign.

Usage

campaigns

Format

A data frame with 1898 rows and 25 columns, providing financial information for each House/Senate campaign:

cand_id

A code assigned to a candidate by the FEC

cand_name

Candidate name

cand_ici

Incumbent challenger status with designation: C = Challenger, I = Incumbent, O = Open Seat

pty_cd

Party code

cand_pty_affiliation

The political party affiliation reported by the candidate

ttl_receipts

Total receipts

trans_from_auth

Transfers from authorized committees

ttl_disb

Total disbursements

trans_to_auth

Transfers to authorized committees

coh_bop

Beginning cash

coh_cop

Ending cash

cand_contrib

Contributions from candidate

cand_loans

Loans from candidate

other_loans

Other loans

cand_loan_repay

Candidate loan repayments

other_loan_repay

Other loan repayments

debts_owed_by

Debts owed by

ttl_indiv_contrib

Total individual contribution

cand_office_st

Candidate's state

cand_office_district

Candidate's district

other_pol_cmte_contrib

Contributions from other political committees

pol_pty_contrib

Contributions from party committees

cvg_end_dt

Coverage end date (YYYY-MM-DD)

indiv_refunds

Refunds to individuals

cmte_refunds

Refunds to committees

Source

https://transition.fec.gov/general/FederalElections2016.shtml, updated 2020-03-02


Candidates Master metadata

Description

Basic information for each candidate.

Usage

candidates

Format

A data frame with 4648 rows and 15 columns, providing information for each candidate:

cand_id

A 9-character alpha-numeric code assigned to a candidate by the FEC, which remains the same across election cycles if running for the same office

cand_name

Candidate name

cand_pty_affiliation

The political party affiliation reported by the candidate

cand_election_yr

Candidate's Election Year

cand_office_st

Candidate's state

cand_office

Candidate office with designation: H = House, P = President, S = Senate

cand_office_district

Congressional district number: Congressional at-large 00, Senate 00, Presidential 00

cand_ici

Incumbent challenger status with designation: C = Challenger, I = Incumbent, O = Open Seat

cand_status

Candidate status with designation: C = Statutory candidate, F = Statutory candidate for future election, N = Not yet a statutory candidate, P = Statutory candidate in prior cycle

cand_pcc

ID of the candidate's principal campaign committee assigned by FEC

cand_st1

Candidate's Mailing address - street 1

cand_st2

Candidate's Mailing address - street 2

cand_city

Candidate's Mailing address - city

cand_st

Candidate's Mailing address - state

cand_zip

Candidate's Mailing address - ZIP code

Source

https://www.fec.gov/campaign-finance-data/candidate-master-file-description/, updated 2020-03-02


Committees metadata

Description

Provides data pertaining to each committee registered with the Federal Election Commission.

Usage

committees

Format

A data frame with 17654 rows and 15 columns with information about FEC committees.

cmte_id

A 9-character alpha-numeric code assigned to a committee by the Federal Election Commission

cmte_nm

Name of the committee

tres_nm

The officially registered treasurer for the committee

cmte_st1

Street 1

cmte_st2

Street 2

cmte_city

City

cmte_st

State

cmte_zip

ZIP Code

cmte_dsgn

A = Authorized by a candidate

B = Lobbyist/Registrant PAC

D = Leadership PAC

J = Joint fundraiser

P = Principal campaign committee of a candidate

U = Unauthorized

cmte_tp

Committee Type, listed here: https://www.fec.gov/campaign-finance-data/committee-type-code-descriptions/

cmte_pty_affiliation

Committee Party, listed here: https://www.fec.gov/campaign-finance-data/party-code-descriptions/

cmte_filing_freq

Filing frequency: A = Administratively terminated,

D = Debt

M = Monthly filer

Q = Quarterly filer

T = Terminated

W = Waived

org_tp

Interest group category:

C = Corporation

L = Labor organization

M = Membership organization

T = Trade association

V = Cooperative

W = Corporation without capital stock

connected_org_nm

Connected organization's name

cand_id

Candidate identification:When a committee has a committee type designation of H, S, or P, the candidate's identification number will be entered in this field.

Source

https://www.fec.gov/campaign-finance-data/committee-master-file-description/, updated 2020-03-02


Committee contributions metadata

Description

Provides data pertaining to each candidate and their contributions from committees during the 2016 general election.

Usage

contributions

Format

A data frame with 1000 rows and 15 columns with information about candidate committee contributions.

cmte_id

A 9-character alpha-numeric code assigned to a committee by the Federal Election Commission

amndt_ind

Amendment indicator: Indicates if the report being filed is new (N), an amendment (A) to a previous report or a termination (T) report

rpt_tp

Indicates the type of report filed, listed here: https://www.fec.gov/campaign-finance-data/report-type-code-descriptions/

transaction_pgi

This code indicates the election for which the contribution was made. EYYYY (election Primary, General, Other plus election year)

transaction_tp

Transaction types, listed here: https://www.fec.gov/campaign-finance-data/transaction-type-code-descriptions/

entity_tp

Entity Type:

CAN = Candidate

CCM = Candidate Committee

COM = Committee

IND = Individual (a person)

ORG = Organization (not a committee and not a person)

PAC = Political Action Committee

PTY = Party Organization

name

Contributor/lender/transfer Name

city

City

state

State

zip_code

ZIP Code

transaction_dt

Transaction date (YYYY-MM-DD)

transaction_amt

Transaction Amount

other_id

For contributions from individuals this column is null. For contributions from candidates or other committees this column will contain that contributor's FEC ID

cand_id

A 9-character alpha-numeric code assigned to a candidate by the FEC, which remains the same across election cycles if running for the same office

tran_id

Only for Electronic Filings. A unique identifier associated with each itemization or transaction appearing in an FEC electronic file. A transaction ID is unique for a specific committee for a specific report.

Source

https://www.fec.gov/campaign-finance-data/contributions-committees-candidates-file-description/, Updated 2020-03-02


Operating Expenditures

Description

Operating expenditure information for a simple random sample of 1000 entries out of 1744187

Usage

expenditures

Format

A data frame with 1000 rows and 20 columns:

cmte_id

A 9-character alpha-numeric code assigned to a committee by the Federal Election Commission

amndt_ind

Amendment indicator: Indicates if the report being filed is new (N), an amendment (A) to a previous report or a termination (T) report

rpt_yr

Report year

rpt_tp

Indicates the type of report filed, listed here: https://www.fec.gov/campaign-finance-data/report-type-code-descriptions/

line_num

Indicates FEC form line number

form_tp_cd

Indicates FEC form type

sched_tp_cd

Schedule type: Schedule B - Itemized disbursements

name

Contributor/lender/Transfer Name

city

City

state

State

zip_code

ZIP Code

transaction_dt

Transaction date (YYYY-MM-DD)

transaction_amt

Transaction Amount

transaction_pgi

Primary general indicator

purpose

Purpose

category

Disbursement category code: 001-012 and 101-107

category_desc

Disbursement Category Code Description, listed here: https://www.fec.gov/campaign-finance-data/disbursement-category-code-descriptions/

entity_tp

Entity Type:

CAN = Candidate

CCM = Candidate Committee

COM = Committee

IND = Individual (a person)

ORG = Organization (not a committee and not a person)

PAC = Political Action Committee

PTY = Party Organization

tran_id

Only for Electronic Filings. A unique identifier associated with each itemization or transaction appearing in an FEC electronic file. A transaction ID is unique for a specific committee for a specific report.

back_ref_tran_id

Back reference transaction ID: Used to associate one transaction with another transaction in the same report (using file number, transaction ID and back reference transaction ID). For example, a credit card payment and the sub-itemization of specific purchases. The back reference transaction ID of the specific purchases will equal the transaction ID of the payment to the credit card company.

Source

https://www.fec.gov/campaign-finance-data/operating-expenditures-file-description/, updated 2020-03-02


fec16: A Data Package for the 2016 Elections

Description

The fec16 package provides the following 9 datasets from the Federal Election Commission's 2015-2016 election cycle:

Datasets

Figure: hex\_fec16.png

The entire candidates, committees, campaigns, results_house, results_senate, results_president, and pac datasets and samples containing 1000 entries of the other datasets are available directly in the package. For the datasets containing samples, full versions can be retrieved via the following functions:

In addition, fec16 provides the states dataset giving geographical information about the 50 states.

Authors


Individual Contributions Master metadata

Description

Information for a simple random sample of transactions from individuals to candidates/committees.

Usage

individuals

Format

A data frame with 1000 rows and 16 columns providing information for each transaction:

cmte_id

A 9-character alpha-numeric code assigned to a committee by the Federal Election Commission

amndt_ind

Amendment indicator: Indicates if the report being filed is new (N), an amendment (A) to a previous report or a termination (T) report

rpt_tp

Indicates the type of report filed, listed here: https://www.fec.gov/campaign-finance-data/report-type-code-descriptions/

transaction_pgi

This code indicates the election for which the contribution was made. EYYYY (election Primary, General, Other plus election year)

transaction_tp

Transaction types, listed here: https://www.fec.gov/campaign-finance-data/transaction-type-code-descriptions/

entity_tp

Entity Type:

CAN = Candidate

CCM = Candidate Committee

COM = Committee

IND = Individual (a person)

ORG = Organization (not a committee and not a person)

PAC = Political Action Committee

PTY = Party Organization

name

Contributor/lender/Transfer Name

city

City

state

State

zip_code

ZIP Code

employer

Employer

occupation

Occupation

transaction_dt

Transaction date (YYYY-MM-DD)

transaction_amt

Transaction Amount

other_id

For contributions from individuals this column is null. For contributions from candidates or other committees this column will contain that contributor's FEC ID.

tran_id

Only for Electronic Filings. A unique identifier associated with each itemization or transaction appearing in an FEC electronic file. A transaction ID is unique for a specific committee for a specific report.

Source

https://www.fec.gov/campaign-finance-data/contributions-individuals-file-description/, updated 2020-03-02


Political Action Committee (PAC) and Party Summary Financial Information

Description

PAC and party summary financial information

Usage

pac

Format

A data frame with 12049 rows and 27 columns:

cmte_id

A 9-character alpha-numeric code assigned to a committee by the Federal Election Commission

cmte_nm

Name of the committee

cmte_tp

Committee Type, listed here: https://www.fec.gov/campaign-finance-data/committee-type-code-descriptions/

cmte_dsgn

A = Authorized by a candidate

B = Lobbyist/Registrant PAC

D = Leadership PAC

J = Joint fundraiser

P = Principal campaign committee of a candidate

U = Unauthorized

cmte_filing_freq

Filing frequency: A = Administratively terminated,

D = Debt

M = Monthly filer

Q = Quarterly filer

T = Terminated

W = Waived

ttl_receipts

Total receipts

trans_from_aff

Transfers from affiliates

indv_contrib

Contributions from individuals

other_pol_cmte_contrib

Contributions from other political committees

cand_contrib

Contributions from candidate

cand_loans

Candidate loans

ttl_loans_received

Total loans received

ttl_disb

Total disbursements

tranf_to_aff

Transfers to affiliates

indv_refunds

Refunds to individuals

other_pol_cmte_refunds

Refunds to other political committees

cand_loan_repay

Candidate loan repayments

loan_repay

Loan repayments

coh_bop

Cash beginning of period

coh_cop

Cash close of period

debts_owed_by

Debts owed by

nonfed_trans_received

Non-federal transfers received

contrib_to_other_cmte

Contributions to other committees

ind_exp

Independent expenditures

pty_coord_exp

Party coordinated expenditures

nonfed_share_exp

Non-federal share expenditures

cvg_end_dt

Coverage end date (YYYY-MM-DD)

Source

https://www.fec.gov/campaign-finance-data/pac-and-party-summary-file-description/, updated 2020-03-02


Committee contributions metadata

Description

read_all_contributions returns a dataframe about contribution data

Usage

read_all_contributions(n_max = Inf, verbose = interactive())

Arguments

n_max

Integer specifying the max amount of entries in the dataset. Defaults to the possible maximum.

verbose

A progress bar is shown if R is running interactively. Defaults to interactive().

Value

The entire dataframe. More information about variables is at ?contributions.

Examples

read_all_contributions()
read_all_contributions(n_max = 250)

Operating Expenditures

Description

read_all_expenditures returns a dataframe about operating expenditure data

Usage

read_all_expenditures(n_max = Inf, verbose = interactive())

Arguments

n_max

Integer specifying the max amount of entries in the dataset. Defaults to the possible maximum.

verbose

A progress bar is shown if R is running interactively. Defaults to interactive().

Value

The entire dataframe. More information about variables is at ?expenditures.

Examples

read_all_expenditures()
read_all_expenditures(n_max = 250)

Individual Contributions Master metadata

Description

read_all_individuals returns a dataframe about transactions from individuals to candidates/committees

Usage

read_all_individuals(n_max = Inf, verbose = interactive())

Arguments

n_max

Integer specifying the max amount of entries in the dataset. Defaults to the possible maximum.

verbose

A progress bar is shown if R is running interactively. Defaults to interactive().

Value

The entire dataframe. More information about variables is at ?individuals.

Examples

read_all_individuals()
read_all_individuals(n_max = 250)

Any Transaction From One Committee To Another

Description

read_all_transactions returns a dataframe about transaction data

Usage

read_all_transactions(n_max = Inf, verbose = interactive())

Arguments

n_max

Integer specifying the max amount of entries in the dataset. Defaults to the possible maximum.

verbose

A progress bar is shown if R is running interactively. Defaults to interactive().

Value

The entire dataframe. More information about variables is at ?transactions.

Examples

read_all_transactions()
read_all_transactions(n_max = 250)

House Election Results

Description

2016 House General Election Results

Usage

results_house

Format

A data frame with 2110 rows and 13 columns providing information the House election results:

state

The state of the votes

district_id

District ID

cand_id

A code assigned to a candidate by the FEC

incumbent

A logical variable: TRUE if incumbent, FALSE if not

party

Party of the candidate

primary_votes

Number of votes in the primary election

primary_percent

Percentage of votes in the primary election

runoff_votes

Number of runoff votes

runoff_percent

Percentage of runoff votes

general_votes

Number of votes in the general election

general_percent

Percentage of votes in the general election

won

A logical variable: TRUE if candidate won, FALSE if not

footnotes

Footnotes

Source

https://transition.fec.gov/general/FederalElections2016.shtml, updated 2020-03-02

See Also

results_senate, results_president


Presidential Election Results

Description

2016 House General Election Results

Usage

results_president

Format

A data frame with 619 rows and 6 columns providing information the House election results:

cand_id

A code assigned to a candidate by the FEC

state

The state of the votes

party

Party of the candidate

general_votes

Number of votes in the general election

general_percent

Percentage of votes in the general election

won

A logical variable: TRUE if candidate won, FALSE if not

Source

https://transition.fec.gov/general/FederalElections2016.shtml, updated 2020-03-02

See Also

results_house, results_senate


Senate Election Results

Description

2016 House General Election Results

Usage

results_senate

Format

A data frame with 377 rows and 10 columns providing information the House election results:

state

The state of the votes

cand_id

A code assigned to a candidate by the FEC

incumbent

A logical variable: TRUE if incumbent, FALSE if not

party

Party of the candidate

primary_votes

Number of votes in the primary election

primary_percent

Percentage of votes in the primary election

general_votes

Number of votes in the general election

general_percent

Percentage of votes in the general election

won

A logical variable: TRUE if candidate won, FALSE if not

footnotes

Footnotes

Source

https://transition.fec.gov/general/FederalElections2016.shtml, updated 2020-03-02

See Also

results_house, results_president


US States lookup table

Description

US States lookup table

Usage

states

Format

A data frame with 50 rows and 4 columns:

state

two-character postal abbreviation

state_name

the name of the state

state_region

coarse region of the country that the state belongs to

state_division

finer region of the country that the state belongs to

Source

state


Any Transaction From One Committee To Another

Description

Transaction information between committees

Usage

transactions

Format

A data frame with 1000 rows and 16 columns:

cmte_id

A 9-character alpha-numeric code assigned to a committee by the Federal Election Commission

amndt_ind

Amendment indicator: Indicates if the report being filed is new (N), an amendment (A) to a previous report or a termination (T) report

rpt_tp

Indicates the type of report filed, listed here: https://www.fec.gov/campaign-finance-data/report-type-code-descriptions/

transaction_pgi

Primary general indicator:This code indicates the election for which the contribution was made. EYYYY (election Primary, General, Other plus election year)

transaction_tp

Transaction type, listed here: https://www.fec.gov/campaign-finance-data/transaction-type-code-descriptions

entity_tp

Entity Type:

CAN = Candidate

CCM = Candidate Committee

COM = Committee

IND = Individual (a person)

ORG = Organization (not a committee and not a person)

PAC = Political Action Committee

PTY = Party Organization

name

Contributor/lender/Transfer Name

city

City

state

State

zip_code

ZIP Code

employer

Employer

occupation

Occupation

transaction_dt

Transaction date (YYYY-MM-DD)

transaction_amt

Transaction Amount

other_id

For contributions from individuals this column is null. For contributions from candidates or other committees this column will contain that contributor's FEC ID

tran_id

Only for Electronic Filings. A unique identifier associated with each itemization or transaction appearing in an FEC electronic file. A transaction ID is unique for a specific committee for a specific report.

Source

https://www.fec.gov/campaign-finance-data/any-transaction-one-committee-another-file-description/, updated 2020-03-02