Skip to content
Electoral intelligence · Geospatial · Client

Atlas CABA · Mayoral race

Thirty years of the Buenos Aires vote, from district down to polling station, for a 2027 mayoral campaign. The finding: PRO's collapse was about the brand, not the territory.

https://atlas-caba-ciudad.vercel.app/gemelo/1/4
Atlas CABA · Mayoral race — portada (screenshot 1 of 4)
29.9%

PRO retention 2023→2025, three methods

0.935

Validated R² of territory on vote level

−0.05

Validated R² on change: not predictable

Context

A 2027 campaign for Mayor of Buenos Aires hired Atlas Analytics to answer one question: where is the incumbent party strong and where is it weak after 2025. The city was coming off two years in which PRO lost seven in ten votes and the political landscape changed completely.

The Challenge

The easy reading said PRO had collapsed in its stronghold. The correlation between prior strength and the drop in points was −0.98, but that's mostly arithmetic: if everyone loses the same share, whoever had more loses more points. The job was to separate geography from a calculation artifact, on a database that didn't exist yet.

My Role

Project lead for Atlas Analytics: database design, all the analysis, cartography, the digital twin, the reports and the decision tools that were delivered.

Approach

Fifteen harmonised elections from 2013 to 2025 by polling station and circuit, plus eight mayoral races since 1996; the 2022 census mapped from tracts to circuits; the electoral roll split to set apart the 510,287 eligible foreign residents; schools, 3.6 million citizen complaints, informal settlements and 318,607 land parcels. Every script states what question it answers, what it assumes and what it can't claim, and every finding passes three filters before publication.

Stack — why each technology

Python · pandas · GeoPandas474 derived tables and 343 numbered scripts, reproducible from the source data
Ecological inference (King, NNLS, balance)Three routes with different assumptions to estimate how many voters PRO kept
Partial Spearman · Benjamini-HochbergRank correlations with social class controlled and correction for multiple comparisons
Digit tests17 tests on the 2015–2023 tally sheets to measure, not assume, whether they're reliable
Digital twin (MapLibre and 3D)The city parcel by parcel, to decide where campaign effort pays off
Headless Chrome · ExcelPDF reports, Excel workbooks and a vote calculator for the campaign team

Key Decisions

The denominator is the native-born roll

The 2023 and 2025 rolls include half a million foreign residents who turn out at 15–20%. Crossing any social variable against total-roll turnout yields −0.91 purely by construction. Separating native-born from foreign voters was the difference between a finding and an error.

Measure in votes, not percentage points

In points, PRO seemed to have sunk in its stronghold. In votes, it kept 29.9%, and retention ranges from 29.0% to 30.7% across all five quintiles of prior strength: there was no territorial refuge. The conclusion changed, and with it where to campaign.

Three methods for one number

The arithmetic balance gives 29.9%, the NNLS matrix 29.9% and King's model 29.8%, with an interval of 29.4% to 30.0%. Three routes with different assumptions land in the same place. What didn't survive that test — where the libertarian vote came from — was published only as a bound.

Publish the negative result too

73 census indicators and three independent sources were tested to predict retention: the validated R² was −0.05, worse than predicting the mean. Instead of forcing a model, the report said so: change isn't predicted by territory, and that also guides strategy.

Results

Territory explains almost all of the level of the vote — validated R² of 0.935 for Jorge Macri's 2023 vote — and almost none of the change. PRO's collapse was even across the city; what varies by neighbourhood is who captured that vote. The delivery included district reports, a station-by-station analysis, a survey matched to territory, Excel workbooks, a vote calculator and the digital twin. The candidates analysis and the 2027 model remain reserved for the client.

What I Learned

The costliest trap in electoral analysis isn't a bad model: it's a correct reading in the wrong unit. Moving from points to votes, and from the total roll to the native-born roll, changed the conclusions more than any sophisticated technique.

A project like this for your organization?

Tell me the problem and we'll work out how to solve it with data.

Let's talk

Next case

Atlas One ERP →

View case