A practical guide to uncovering foreign funding and interference in local and national elections using open data and analytical tools.

Ever wondered if your local election was tainted by foreign money? In 2022, Trump blamed Iran for GOP losses, highlighting a growing concern about foreign influence. This guide will teach you how to analyze election data, spot anomalies, and protect your campaign from unseen funding.
Start by downloading official precinct results from state election websites or the U.S. Election Assistance Commission. Use the OpenElections API to pull data into a CSV file. Store the file in a Google Sheet for easy sharing. Make sure to note the filing dates and any reported campaign contributions.
Use Python's Pandas library to drop duplicate rows and fill missing values. Standardize precinct names to match across datasets; a simple regex can handle variations. Apply the normalize function to ensure consistent formatting. Save the cleaned dataset as a new CSV for analysis.
Merge the cleaned election results with the Federal Election Commission (FEC) contribution data via candidate ID. Use the join operation in Pandas to align rows. Highlight any candidates receiving more than 5% of their total contributions from foreign-registered entities. Record these anomalies in a separate sheet.
Calculate the average donation size per state using groupby. Flag any outliers that exceed the mean by more than 3 standard deviations. Employ the outlier detection technique to spot unusually large or clustered contributions. Cross‑reference these with known foreign donor lists from the OpenSecrets database.
Create interactive charts with Tableau Public or Google Data Studio. Plot contributions per candidate over time to spot sudden spikes. Use the filter function to isolate foreign‑linked donors. Export the visualizations as PDFs for reporting to stakeholders.
Leverage the Election Integrity Project’s API to check for flagged accounts. Compare your findings against the foreign influence alerts they publish. If discrepancies arise, dig deeper with a manual review of donor registration records. Document any confirmed foreign ties.
Compile a concise report using Google Docs or Microsoft Word. Include tables, charts, and a risk assessment. Suggest compliance measures such as stricter contribution limits or mandatory disclosure. Share the report with campaign staff and legal counsel to mitigate future risks.
Remember that foreign influence can also manifest through coordinated messaging on social media, not just financial contributions—integrate media monitoring tools like TweetDeck or Brandwatch for a comprehensive view.
By following these seven steps, you'll be able to detect foreign influence in election data, protect your campaign, and contribute to a healthier democratic process. You now have a repeatable workflow for data analysis and reporting. Next, apply this guide to your own local election to stay one step ahead.