Public dataset · Government, society and transport
Federal Election Commission (FEC) Campaign Finance in BigQuery
US federal campaign finance records: committees, candidates, individual contributions, committee-to-candidate contributions and operating expenditures for election cycles 1980 to 2020. 146 tables, 78.5 GiB; individual contributions for 2020 alone (indiv20) are 33.8 GiB and 195 million rows.
The FEC publishes bulk data on every committee and candidate registered for federal office and their money flows. The dataset description lists the main file types: committees (cm), candidates (cn), candidate-committee linkages (ccl), itemized transactions between committees (oth), contributions from committees to candidates (pas2), individual contributions (indiv) and operating expenditures (oppexp).
Tables are named by file type and the last two digits of the two-year cycle: indiv80 to indiv20, cm00, cn20, pas220 and so on. Friendly-named tables with similar content exist for 2016 to 2020 (candidate_2020, committee_2020, committee_contributions_2020, opex_2020, other_committee_tx_2020, individuals_2016). The latest cycle in the dataset is 2020.
Join keys are the FEC identifiers: cmte_id for committees and cand_id for candidates. Amounts are in transaction_amt and dates in transaction_dt.
Tables and sizes
The dataset has 146 tables; the main ones are listed.
| Table | Rows | Size | Full scan | Layout |
|---|---|---|---|---|
indiv20 | 195,482,945 | 33.8 GiB | $0.21 | None |
individuals_ingest_2020 | 103,486,005 | 18.0 GiB | $0.11 | None |
indiv18 | 21,628,973 | 3.8 GiB | $0.02 | None |
indiv16_cm16 | 12,575,590 | 3.5 GiB | $0.02 | None |
indiv16 | 20,454,642 | 3.5 GiB | $0.02 | None |
oth20 | 7,455,026 | 1.3 GiB | under $0.01 | None |
oppexp20 | 2,315,382 | 392 MiB | under $0.01 | None |
pas220 | 889,165 | 142 MiB | under $0.01 | None |
indiv80 | 308,696 | 33.3 MiB | under $0.01 | None |
cm20 | 18,288 | 2.3 MiB | under $0.01 | None |
cn20 | 7,771 | 844 KiB | under $0.01 | None |
ccl20 | 7,061 | 359 KiB | under $0.01 | None |
Example queries
Preview rows with SELECT * LIMIT 100 (expensive)
LIMIT does not reduce bytes scanned. This 100-row preview reads all 33.77 GiB of indiv20. Use the table preview in the console instead, which is free.
SELECT *
FROM `bigquery-public-data.fec.indiv20`
LIMIT 100;Individual contributions by state, 2020 cycle
Two columns of indiv20: 2.18 GiB.
SELECT
state,
ROUND(SUM(transaction_amt)) AS total_usd,
COUNT(*) AS contributions
FROM `bigquery-public-data.fec.indiv20`
GROUP BY state
ORDER BY total_usd DESC
LIMIT 10;Committees receiving the most individual money, 2016 cycle
Joins contributions to committee names. The 2016 table is a tenth the size of 2020, so this is a cheap way to develop the query before running it on indiv20.
SELECT
cm.cmte_nm,
ROUND(SUM(i.transaction_amt)) AS total_usd
FROM `bigquery-public-data.fec.indiv16` AS i
JOIN `bigquery-public-data.fec.cm16` AS cm USING (cmte_id)
GROUP BY cm.cmte_nm
ORDER BY total_usd DESC
LIMIT 10;Presidential candidates in the 2020 cycle
cn20 is under 1 MiB.
SELECT
cand_name,
cand_pty_affiliation,
cand_office_st
FROM `bigquery-public-data.fec.cn20`
WHERE cand_office = 'P'
AND cand_election_yr = 2020
ORDER BY cand_name;Candidates receiving the most committee contributions, 2020
pas220 holds contributions and independent expenditures from PACs, party and other committees to candidates: 16.3 MiB.
SELECT
cn.cand_name,
ROUND(SUM(p.transaction_amt)) AS pac_usd
FROM `bigquery-public-data.fec.pas220` AS p
JOIN `bigquery-public-data.fec.cn20` AS cn USING (cand_id)
GROUP BY cn.cand_name
ORDER BY pac_usd DESC
LIMIT 10;Querying it cheaply
- Most of the 78.5 GiB is individual contributions:
indiv20(33.8 GiB),individuals_ingest_2020(18.0 GiB),indiv18(3.8 GiB),indiv16(3.5 GiB). Everything else is small. - No table is partitioned or clustered. Filtering
indiv20bystateortransaction_dtdoes not cut bytes; choosing columns does.name,employerandoccupationare the heavy text columns. SELECT * ... LIMIT 100onindiv20bills the whole 33.77 GiB. Preview the table in the console or select two or three columns.- Develop joins on an older cycle (for example
indiv16, 3.5 GiB) and switch toindiv20only for the final run. - If you need several cycles at once, use a wildcard such as
indiv*with_TABLE_SUFFIX IN ('16', '18', '20'); note thatindiv*also matchesindiv16_cm16.
FAQ
How much does it cost to query FEC data in BigQuery?
Queries on committees and candidates bill the 10 MB minimum. Queries on individual contributions range from a few hundred MiB for 1980s cycles to 33.77 GiB for SELECT * on 2020. A full indiv20 scan is about 3% of the monthly free TiB.
Is the FEC dataset free?
Google pays for storing public datasets, so you never pay storage for them. You pay only for the bytes your queries scan, billed to your own project at the on-demand rate, and the first 1 TiB scanned each month is free. See BigQuery pricing.
Does the BigQuery FEC dataset include 2022 or 2024?
No. The newest tables are for the 2020 cycle (indiv20, cn20, cm20, pas220). For later cycles download bulk data from fec.gov.
What does the number in table names mean?
It is the last two digits of the election cycle: indiv20 is 2019 to 2020, indiv98 is 1997 to 1998. pas2 tables add the cycle after the 2, so pas220 is the 2020 cycle.
Related datasets
All public datasets · BigQuery cost queries · Pricing calculator
