TSE / IBGE / PYTHON
Methodology
Plain-language explanations of the numbers, with the calculations and limitations available when you want them.
Comparable places
A comparison needs a reported result for the same municipality identifier and state in both elections.
How is this calculated?
Boa Esperança do Norte has a 2026 result but no 2022 baseline. Its comparison is null. Name-only changes are accepted under the approved identifier/state rule. The map does not harmonize historical boundaries.
Flávio Bolsonaro vs Jair Bolsonaro
Flávio Bolsonaro's 2026 share is compared with Jair Bolsonaro's 2022 share in the first round.
How is this calculated?
They are different candidates. This is the approved leading-right-candidate comparison of places and is neither a political-bloc estimate nor evidence of individual voter switching.
Formula: 100 * (target_share - benchmark_share)
Local margin
The local gap is the difference between the two largest candidate shares.
How is this calculated?
This compares the top two in that place. It is distinct from the signed Lula-minus-Flávio national margin.
Formula: largest_share - second_largest_share
Lula since 2022
This compares Lula's first-round share in 2026 with his first-round share in 2022.
How is this calculated?
Change is measured in percentage points on comparable units. The national comparison uses comparable places including overseas and excludes new municipalities without a baseline.
Formula: 100 * (target_share - benchmark_share)
Municipality contribution
This shows how the national Lula–Flávio valid-vote margin changes when a place's votes are removed.
How is this calculated?
Positive values raise Lula's margin relative to Flávio and negative values lower it. This is descriptive rather than causal. Values are not additive. National counts include overseas; all valid candidate votes enter the denominator.
Formula: (A-B)/V - ((A-a)-(B-b))/(V-v)
Overseas voting
Overseas votes are included in the national result but have no Brazilian municipal polygon.
How is this calculated?
A separate combined ZZ record permits reconciliation of domestic municipal totals with the complete national result. It is not a municipality.
From sections to municipalities
Municipal results combine the electoral sections assigned to that municipality.
How is this calculated?
Candidate counts are summed separately from section totals so denominators are counted once per section. Overseas voting stays in national totals.
Source data
Official TSE presidential first-round results supply the electoral counts.
How is this calculated?
Section archives and geographic aggregates are pinned by SHA-256. IBGE provides map boundaries and identifiers.
Technical null votes
Technical null votes remain part of the official null-vote total.
How is this calculated?
Original nominal counts are preserved separately. Technical null votes are never added twice or counted as valid candidate votes.
Turnout
Turnout measures attendance relative to the registered electorate.
How is this calculated?
Attendance is a count of people. The rate is attendance divided by electorate; it is not the fraction of valid ballots. Source status residuals are preserved rather than corrected.
Formula: turnout / electorate
What these data cannot tell us
- Place-level patterns do not show how individual people changed their votes.
- The map's dated boundaries are for drawing and navigation, not historical area comparisons.
- A first-round leader has not necessarily won the election.