Skip to content

Only count individuals in "Individual Contributions by State" - #5

Merged
asg017 merged 3 commits into
mainfrom
fix-state-contributions-individuals
Oct 1, 2026
Merged

asg017 merged 3 commits into
mainfrom
fix-state-contributions-individuals

Conversation

@asg017

@asg017 asg017 commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

The "Individual Contributions by State" table on committee pages was overcounting. It correctly filtered for schedule A itemizations for a specific committee in a fundraising cycle, but didn't filter down to just "individual" contributions not including PACs/organizations, ie just SA111AI and SA12 (from JFC I think?) rows.

Before After fec.gov baseline
image image image

Now this is closer to what fec.gov reports in their "Individual contributions grouped by state" graphic on their committee pages, but there's still small descrepencies.

🤖 Claude-generated PR description

Problem

The "Individual Contributions by State" widget summed every non-memo Schedule A row, not just individuals. For Valadao For Congress (C00499392, 2026 cycle) it showed a $4,830,501.91 total that is exactly 11AI + 11B + 11C + 12 + 15. The top states (VA, DC, GA) were really the locations of JFCs and PACs:

  • Grow the Majority (JFC, VA): $814k via line 12
  • Defend Our Majority (JFC, DC): $356k
  • Emmer Majority Builders (JFC, GA): $303k
  • ~$1.9M of PAC money on 11C, largely DC

The individual donors behind JFC transfers are reported as line 12 memo rows, so the memo_code != 'X' filter dropped them entirely.

Fix

  • New INDIVIDUAL_CONTRIBUTIONS_WHERE predicate in stateContributorsFetcher.ts:
    • SA11AI non-memo (includes WinRed earmarks, which are itemized under the donor; the conduit-details rows are memo and stay excluded)
    • SA12 memo rows with entity_type IN ('IND', 'ORG') (JFC attributions; ORG here is tribes, which FEC counts as it does on 11(a)(i))
  • Partnership/LLC contributions are counted once, through the non-memo 11(a)(i) row. The memo attributions to partners are skipped. In this data no split crosses a state line, so the per-state totals don't change.
  • State links use the same predicate via _where, so the linked table rows sum to the displayed amount.
  • Removed the formTypeFilter prop. It only affected the link, never the query. Committee scope is always F3/F3X, and both use lines 11AI/12.
  • Footer text now describes what's actually counted.
  • F3X relabel. The same line-11(a)(i) + line-12 rule applies to F3X, but on F3X line 11(a)(i) also carries contributions from corporations, LLCs and other non-committee "persons". At super PACs that money dominates (Fairshake, 2024: ~$316M org vs ~$7.6M individual), and FEC.gov counts it the same way. For F3X filers the widget is now titled "Contributions from Individuals & Other Persons by State", with a note that it includes corporations and LLCs. F3 labels are unchanged.

Verification

Against a libfec export CA22 --election 2026 DB, compared with FEC.gov's by-state view (01/01/2025–06/30/2026):

State Before After FEC.gov
CA $1,049,163 $1,037,276.63 $1,059,276.63
FL $147,439 $446,325.27 $439,325.27
TX $178,946 $436,911.23 $436,911.23
NY $72,500 $152,943.95 $152,943.95
VA $1,236,143 $131,505.92 $131,505.92
LA — $100,332.29 $100,332.29

TX, NY, VA and LA match to the cent. I reconciled every remaining state against FEC's itemized rows (/schedules/schedule_a/?is_individual=true) by (file_number, transaction_id). Each remaining gap comes from FEC's is_individual() coding, not from this query:

State Δ (ours − FEC) Cause
CA −$22,000.00 FEC counts 17 LLC contributions twice. It codes both the LLC parent row and its partner memo splits as 15 (individual). For the other 21 LLCs it drops the parent.
FL +$7,000.00 Paul Singer's two $3,500 Anedot earmarks have a null receipt_type, so FEC never counts them. They're also missing from the indiv26 bulk file.
MI −$1,000.00 FEC codes a JFC memo from "Dow Inc PAC" (entity PAC) as 15J individual.
OH +$1,000.00 FEC excludes an American Electric Power ORG row filed on 11(a)(i). It's probably a mis-lined corporate PAC receipt, but it is on the line.
AL −$30.67 A $30.67 affiliated transfer (18G, line 12) gets through FEC's amount < 200 "inferred individual" heuristic.

The overall total is $3,121,763.04 here vs $3,137,364.54 on FEC.gov (including OR, fixed by the second commit).

Checked in a browser: Valadao (F3) shows the original title, and Fairshake (F3X) shows the new title and note. For Fairshake 2024, CA is exactly $25M under FEC.gov. That matches two $12.5M memo attributions of an AH Capital Management contribution, which looks like the same LLC double count, though it isn't reconciled row by row.

npm run check reports 0 errors. The 5 warnings are pre-existing and outside the touched files. The _where link was checked against a running datasette instance.

🤖 Generated with Claude Code

asg017 and others added 3 commits September 30, 2026 15:27
The by-state query summed every non-memo Schedule A row, so PAC
contributions (11C), party contributions (11B), other receipts (15) and
joint fundraising transfers (12) were attributed to the sending
committee's state. Restrict to line 11(a)(i) plus the line 12 memo
entries for individuals behind JFC transfers, matching FEC.gov's
by-state breakdown. State links use the same predicate via _where.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Line 12 memo attributions can be to tribes (entity ORG), which FEC
counts alongside individuals, as it does for tribes on line 11(a)(i).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
On F3X, line 11(a)(i) also carries contributions from corporations,
LLCs and other non-committee persons, which dominate at super PACs
(e.g. Fairshake: ~$316M org vs ~$7.6M individual). Title the widget
"Contributions from Individuals & Other Persons by State" there and
note that it includes corporations and LLCs. F3 is unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@asg017
asg017 marked this pull request as ready for review October 1, 2026 00:31
@asg017
asg017 merged commit afefee1 into main Oct 1, 2026
10 checks passed
@asg017
asg017 deleted the fix-state-contributions-individuals branch October 1, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant