Skip to content

Main issue update. (Fixing pipelines) #7

@OpenSourcePatents

Description

@OpenSourcePatents

Here are all the issues currently found.
Issue 1 — EDGAR Name Normalization Layer
[Feature] SEC EDGAR: Add name normalization to fetch_edgar_trades()
Problem: Current implementation queries EDGAR with literal “First Last” string, returning 0 trades for most members. Members file under legal name variations that don’t match Congress.gov profiles.
Fix: Add normalize_name_for_edgar() function generating multiple variations — “Last, First”, “F. Last”, middle initial combos. Loop through until first hit.
Acceptance criteria:
∙ Robert E. Latta returns non-zero trade count via middle initial variation
∙ Dan Crenshaw returns non-zero trade count
∙ No regression on FEC or GovTrack data

Issue 2 — CIK Lookup Table
[Feature] SEC EDGAR: Build CIK mapping table for members with legal name mismatches
Problem: Name normalization covers ~70% of members but fails for members who file under completely different legal names. Example: Mike Rounds files as Marion Michael Rounds (CIK: 0001625409).
Fix: Build a cik_map.json lookup table mapping bioguide IDs to SEC CIK numbers. Query by CIK instead of name for mapped members.
Acceptance criteria:
∙ Mike Rounds returns non-zero trade count via CIK lookup
∙ Top 50 known traders have CIK entries
∙ Falls back to name normalization for unmapped members

Issue 3 — PAC Contributions Returning Zero
[Bug] FEC: pac_contributions field returning 0 for all members
Problem: All members show pac_contributions: 0 which is almost certainly wrong. Either wrong field name from FEC API or early 2026 cycle with no PAC filings yet.
Fix: Verify correct FEC field name for PAC money. May need to fall back to 2024 cycle for this specific field or hit a separate FEC endpoint.
Acceptance criteria:
∙ At least one member with known PAC history returns non-zero value
∙ Field confirmed against FEC API documentation

Issue 4 — Top Donors Empty
[Bug] FEC: top_donors returning empty for all members
Problem: two_year_transaction_period: 2026 likely too early in cycle, no Schedule A filings yet.
Fix: Try falling back to 2024 for donor data specifically while keeping totals on 2026.
Acceptance criteria:
∙ Mike Rounds or Dan Crenshaw return at least 3 top donors
∙ Donor employer field populating correctly

Issue 5 — Menefee FEC Name Match
[Bug] FEC: Members with middle initials in Congress.gov name not matching FEC
Problem: “Christian D. Menefee” flips to “Menefee, Christian D.” which FEC doesn’t match. Middle initials in the name break the lookup.
Fix: Strip middle initials before FEC name flip. Try “Menefee, Christian” as fallback.
Acceptance criteria:
∙ Christian D. Menefee returns valid FEC candidate ID
∙ Other members with middle initials in Congress.gov name populate correctly

Issue 6 — Net Worth Data
[Feature] Replace fake net worth estimates with real disclosure data
Problem: Est. net worth and salary gap charts are generated from anomaly score, not real data.
Fix: Pull from House/Senate eFD financial disclosures. House disclosures are PDFs requiring scraper and parser. Senate format is different.
Note: This is a large scope item. Open source projects exist that have partially solved this.
Acceptance criteria:
∙ At least one chamber pulling real net worth ranges from official disclosures
∙ Chart labeled as real data, disclaimer updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions