Home / Blog

Blog

Notes from building this map.

August 18, 2026#data-model#openstreetmap#wine-domain

One pin, four hundred growers

Cooperatives are single dots on the map that represent hundreds of farmers and thousands of scattered plots — here's how we mark them

August 11, 2026#schema#appellations#borders

Tokaj is Hungarian. And Slovak.

One wine region, two countries, one schema — and how the border between Hungary and Slovakia forced a foreign key to grow up

August 4, 2026#schema#burgundy#appellations

Romanée-Conti isn't a winery

Burgundy has four hierarchical levels of appellation. We store two. Here's why the grand crus don't get rows

July 28, 2026#search#naming#postgres

Sorting past Château

Every winery in Médoc starts with the same word. So does half of Burgundy. Alphabetical sort is a lie until you strip the honorific

July 21, 2026#geo#appellations#polygons

Chablis is in Burgundy but 100 km from it

Non-contiguous wine regions break the convex-hull trick, and Chablis is the canonical offender — closer to Champagne than to Beaune

July 14, 2026#disambiguation#search#schema

Two Georgias: qvevri on one, muscadine on the other

The country that invented wine 8,000 years ago and the US state that grows muscadine share a name — and every autocomplete, slug, and ISO code has to know the difference

July 7, 2026#grapes#search#domain

Zinfandel is Primitivo is Tribidrag

Grape synonyms are a wine-domain landmine — and without a grapes table, ours live in a 90-line TypeScript constant

June 30, 2026#slugs#unicode#i18n

Why slugify() has a special case for ß

Württemberg, Châteauneuf-du-Pape, and Rías Baixas all walk into a slug function. Two come out fine and one comes out as 'w-rttemberg'

June 23, 2026#postgis#geo#import

The centroid of Mosel is in a forest

Why the obvious PostGIS function picks the wrong point for snake-shaped wine regions — and the one-line fix that put the map back on the river

June 16, 2026#openstreetmap#import#data-quality

Four OSM tags, one winery

craft=winery, shop=wine, industrial=winery, tourism=attraction — figuring out which OSM nodes are actually places you can buy wine from the producer

June 2, 2026#import#geo#validation

Wine grows between 30 and 50 degrees. Mostly.

A latitude sanity check on the OSM import caught a brewery in Iceland, fifteen real wineries in Sussex, and one Thai vineyard at 18°N

May 19, 2026#map#geo#ux

The zoom level for Burgundy is 8. For Volnay it's 13.

When you click a region the map flies somewhere — but to what zoom? A short tour of bbox-to-zoom heuristics and the cases that broke them

May 12, 2026#openstreetmap#parsing#data-quality

Parsing 'Mo-Sa 10:00-18:00; PH off' is a small compiler problem

OSM's opening_hours tag is a real DSL with a real grammar, and roughly a third of wineries fill it in wrong

May 11, 2026#seo#sitemap#egress

Why 14,000 winery URLs aren't in the sitemap

A short story about Googlebot, Vercel egress, and the difference between discoverable and announced.

May 11, 2026#wikipedia#images#import

Saratoga isn't where you think it is

Fetching region photos from Wikipedia is mostly title-juggling and rejecting the wrong famous thing.

May 11, 2026#seed#history#process

Thirteen scripts, eleven weeks, one database

How seed-w21 through seed-w31 became an honest commit log of which wine regions we cared about each week.

May 11, 2026#nextjs#leaflet#ssr

Why Map.tsx is fourteen lines

The whole map component, the entire SSR boundary, and the single line that makes Leaflet work in Next.js.

May 11, 2026#osm#import#data

The two seams in the OSM import

How the import respects rows you've hand-edited — and how it adopts wineries that don't sit inside any region polygon.

May 11, 2026#data-model#grapes#supabase

Grapes don't have a table

The /grapes pages look like rows from a database. They're not — they're aggregated from a string array on every region.

May 11, 2026#enrichment#osm#wikipedia

Two sources for a winery description, in order

OSM tags are cheap and immediate. Wikipedia is slow and often empty. The enrichment script tries the cheap one first.

May 11, 2026#data-model#dedup

When a district graduates to a region

Brouilly used to be a district under Bourgogne. Now it's a region in its own right — and a dedup script cleans up the leftover.

May 11, 2026#data#normalization#supabase

Côtes-du-Rhône, Côtes du Rhône, and the deduper that calls them equal

How the dedup script collapses near-duplicate districts — and the one-line normalizer doing the heavy lifting.

May 8, 2026#italy#naming#tuscany

Toscana or Tuscany? A note on names

Why the database now says Tuscany — and what to do with the slug it used to live at.

May 8, 2026#explainer#appellations

Region vs District vs Appellation: what's actually on the map

Three layers, one country: how Bordeaux contains Médoc which contains Pauillac which contains Château Lafite.

May 8, 2026#openstreetmap#geo#import

When OSM doesn't have a polygon, draw one yourself

How the boundary import falls back to landuse=vineyard hulls — and why Hunter Valley got 1070 vineyards stitched into a polygon.