Back to projects
shippedlive demo

Buenos Aires Real Estate

How the city prices a square meter.

Built from every for-sale apartment listing in the city — scraped, deduplicated, and cleaned into one dataset, then mapped to median price per m² across 41 barrios. A fault-tolerant scraper, layered neighborhood normalization, and a median-based analysis surface where price concentrates, and why one barrio doesn't play by the same rules.

Clean Listings1,901
Barrios41
Price Gap3.6×
PythonhttpxBeautifulSoupPostgreSQLSQL
how.it.works

How it works

Scrape1,901listings · httpx + BS4
Dedupeby IDstored in PostgreSQL
Clean76 → 41barrio labels normalized
Audit3 colsempty fields, not faked
AnalyzemedianUSD / m² per barrio
Publishreport + CSVfindings & dataset
3.6×

The price gap from the cheapest barrio to Puerto Madero — a tier no other neighborhood comes near.

1,901clean listingsacross the city
41barriosfrom 76 raw labels
$5,788Puerto Maderomedian USD / m²
01

The price map

Every barrio with 10+ listings, by median price per m². The northern and residential barrios lead; the older central ones trail. Puerto Madero is left stretching the axis — being an outlier is the point, not a problem to hide.

Median price per m² — barrios with 10+ listingsUSD / m²
$2k$3k$4k$5k$6kPUERTO MADERO$5,788THE REST OF THE CITY$1,620 – $3,157 / m²≈ 1.8× the next barrio
30 barrios
Puerto Madero
$5,788/m²
Villa Devoto
$3,157/m²
Palermo
$3,129/m²
Saavedra
$3,069/m²
Núñez
$3,014/m²
Villa Urquiza
$2,921/m²
Belgrano
$2,889/m²
Colegiales
$2,875/m²
Villa Pueyrredón
$2,710/m²
Chacarita
$2,690/m²
Villa del Parque
$2,650/m²
Mataderos
$2,620/m²
Recoleta
$2,560/m²
Retiro
$2,430/m²
Caballito
$2,360/m²
Monte Castro
$2,350/m²
Villa Luro
$2,340/m²
Almagro
$2,330/m²
Villa Crespo
$2,310/m²
Liniers
$2,280/m²
Parque Chacabuco
$2,210/m²
Boedo
$2,080/m²
Flores
$1,990/m²
San Cristóbal
$1,910/m²
Barracas
$1,900/m²
Monserrat
$1,760/m²
San Nicolás
$1,690/m²
San Telmo
$1,660/m²
Balvanera
$1,640/m²
Floresta
$1,620/m²
02

Location, not size

In many cities, small units carry a price-per-m² premium. If that held here, this cloud would slope down to the right. It doesn’t. Price per m² scatters freely at every size, and Puerto Madero sits top-right — the largest apartments and the most expensive per m², the exact opposite of the premium.

Price per m² vs unit sizeone dot = one barrio
$2k$3k$4k$5k$6k406080100120Median unit size →Median USD / m² →Puerto Madero

Knowing a barrio’s typical size tells you almost nothing about its price per m².

03

Two kinds of expensive

Plot total price against price per m² and most barrios drift up together. Recoleta doesn’t: high total price, only mid-pack per m². It’s expensive because the apartments are big and old, not because each square meter commands a premium. Belgrano echoes it more gently.

Total price vs price per m²Puerto Madero omitted (off the scale)
$2k$2.5k$3k$100k$150k$200kMedian total price →Median USD / m² →BelgranoRecoleta
04

The query behind the map

No need to open the repo. This is the heart of the analysis: one snapshot per listing, filtered to a clean USD scope, aggregated to a true median per barrio.

analysis/queries.ipynb — median price per m²
WITH latest AS (
  SELECT DISTINCT ON (listing_id) listing_id, price, currency
  FROM listing_snapshots
  ORDER BY listing_id, captured_at DESC     -- newest snapshot per listing
)
SELECT
  l.neighborhood,
  COUNT(*) AS n,
  ROUND(percentile_cont(0.5) WITHIN GROUP (
    ORDER BY s.price / l.covered_m2)) AS median_usd_m2
FROM latest s
JOIN listings l ON l.id = s.listing_id
WHERE s.currency = 'USD'
  AND l.covered_m2 > 0
  AND l.neighborhood IS NOT NULL
GROUP BY l.neighborhood
HAVING COUNT(*) >= 10
ORDER BY median_usd_m2 DESC;
05

My contribution

01Scraperfault-tolerant httpx + BeautifulSoup
02Barrio normalization76 raw labels → 41 official
03Data-quality auditempty columns handled, not faked
04SQL analysismedian price per m² per barrio
05Findings + datasetreport + a clean, documented CSV
06

Three takeaways

GeographyLocation sets the pricePrice per m² is set by the barrio, not the unit's size — the size premium most cities show simply isn't here.
OutlierPuerto Madero is its own marketA 3.6× gap from the cheapest barrio, with a price distribution that clears every other neighborhood — no overlap.
MethodMedian, not meanRight-skewed prices demand the median; the whole thing is built end-to-end from a raw scrape, not a borrowed dataset.