Home › How To › How To Analyze Election Results Like a Data Journalist: The Beginner's Guide
✅ Beginners Guide

How To Analyze Election Results Like a Data Journalist: The Beginner's Guide

Turn raw vote counts into clear insights with free tools, real‑time data, and proven techniques.

OMGHive StaffOctober 26, 2026Beginners GuideBeginner⏱ 30 minutes
How To Analyze Election Results Like a Data Journalist: The Beginner's Guide

Election outcomes shape policy and public opinion—so knowing how to read the numbers is essential. With Lula da Silva’s narrow win in São Paulo, the stakes are higher than ever. This guide shows you how to transform raw data into actionable stories in just a few simple steps.

5 STEPS
1

Step 1: Gather Official Vote Data

Start on Brazil’s Tribunal Superior Eleitoral (TSE) portal, where you can download the finalized vote totals in CSV format. Use Google Sheets or Excel to import the file; the download button is located under the “Resultados” tab. Double‑check the header fields for any typos before proceeding, as a single mis‑named column can throw off your analysis.

2

Step 2: Clean and Visualize the Data

Open the CSV in Python’s Pandas library or use the free Datawrapper editor. Remove any rows that contain only aggregate totals and convert all numeric strings to integers. Create a bar chart of vote shares—Pandas’ `plot.bar()` or Datawrapper’s “Bar Chart” template will instantly reveal Lula’s 51.7% win in São Paulo. The visual step helps you spot outliers before you dig deeper.

3

Step 3: Map Results to Demographics

Merge the vote data with census shapefiles from the Brazilian Institute of Geography and Statistics (IBGE). Using QGIS or the free ArcGIS Online viewer, overlay the vote percentages onto municipal boundaries. Highlight areas where Lula’s margin was less than 5%; these are the swing regions that could shift future elections.

4

Step 4: Identify Key Swing Regions

Run a simple logistic regression in R or Python to see which demographic variables—income, education, age—correlate with the narrow margins. Export the model’s coefficients to a concise table. The regression output tells you exactly which groups are most likely to flip in the next campaign, giving you a data‑driven narrative.

5

Step 5: Communicate Findings to the Public

Publish your charts and insights on a platform like Medium or a personal blog, tagging relevant hashtags such as #BrazilElections2026. Embed interactive maps with StoryMapJS so readers can explore the data themselves. Finish with a short summary that explains why Lula’s 51.7% win matters for policy and future elections—the summary is the hook that keeps readers engaged.

💡 PRO TIP

Always cross‑check data from TSE with a secondary source like the Instituto Datafolha to catch any discrepancies before publishing.

Now you can turn raw vote counts into compelling stories that inform voters, analysts, and policymakers. By following these five steps, you’ve built a repeatable workflow for any election. Keep practicing, and soon you’ll be the go‑to analyst for Brazil’s political shifts.

❓ FREQUENTLY ASKED QUESTIONS
Where can I find official election data in Brazil?
The Tribunal Superior Eleitoral (TSE) website offers downloadable CSV files under the “Resultados” section. For older elections, the TSE also hosts an archive in PDF format.
How do I handle incomplete or missing data in election datasets?
Use Pandas’ `dropna()` to remove incomplete rows or `fillna(0)` to replace missing values with zeros, depending on context. Always document any assumptions you make so readers can assess the reliability of your analysis.
🔗 Based on: Lula da Silva Wins Fourth Term, Defeating Flavio Bolsonaro i
MORE HOW-TO GUIDES
HOW TO

How To Implement AI Farm Monitoring: The 5 Tips

HOW TO

How To Follow Lula's Fourth Term in Brazil: 10 Steps

HOW TO

How To Verify Voter Roll Accuracy Without the EC's SIR Software