Building Sunny Coffee: finding sunny Paris terraces in real time — Paul Baron
Building Sunny Coffee: finding sunny Paris terraces in real time
2026-05-26
I realize that publishing this today in the middle of a very hot weather episode in Europe will disappoint people who'd rather be offered a map of air-conditioned Paris cafés, but this idea has been on the back burner for 12 years since this tweet from Snips, an AI startup in Paris that drew my attention in 2014.
Come build cool location-based technology with @snips! Predicting where you will find sun at a café! pic.twitter.com/EtTNN23rJK @snips #himmsu<br>— Snips (@snips) April 10, 2014
At the time, I offered help to design it, and eventually joined the company in 2017, but by then they had pivoted from context-aware mobile devices into private-by-design on-device voice recognition.
Recently, I set out on what I thought would be "a weekend hack" with Claude Code. Hours turned to a few days and eventually into a small data pipeline, two shadow-calculating algorithms, and a 600,000-building cache.
I present you Sunny Coffee, a map of 220 of the most popular cafés in Paris that have a sunny terrace. Have a great coffee in the sun and if you're curious about how I built it with Claude Code, read on.
PS: There are obviously thousands of café terraces in Paris, but this was only ever intended as a fun tech proof of concept and not a full directory.
1. The idea
Parisians have a sixth sense for sun. The minute it appears in March, every café terrace fills up, but who likes to sit & sip coffee in the shade?
The question I wanted to answer was simple:
> Where in Paris is there a café terrace in the sun right now?
Getting there required a few things to come together:
- A reliable list of terraces with permits and rough geometry. (Paris Open Data)<br>- Accurate 3D building data for the whole city, because shadows are cast by buildings, not by coordinates. (OpenStreetMap, then IGN BD TOPO)<br>- A shadow engine to calculate and display the shadows cast by buildings on the sidewalks. (ShadeMap)<br>- A weather forecast with hour-by-hour prediction of sun and cloud cover percentage. (Open-Meteo)<br>- A way to bring it all together and compute for every selected café terrace, _when during the day_ it sees the sun. (built with Claude Code)
2. Data foundations
Terraces from Paris Open Data
The City of Paris publishes the full terrace permits dataset: every café that has filed for a sidewalk terrace, with its address, licensed length and width, and a GPS point.
This dataset was the only realistic starting point; the permit registry is authoritative and updated by the city.
Two early decisions about this dataset shaped everything downstream:
1. Freeze a curated subset. Starting from ~5,000 licensed terraces in the Paris Open Data feed, I matched each one against the Google Places API and kept only operational cafés with rating ≥ 4.9 and ≥ 50 reviews — about 221 places. It's arbitrary, but I didn't want to have too many spots on the map since this is a proof of concept.
2. The GPS pins might be wrong. The coordinates in the permit data didn't seem surveyed: they're either the cadastral parcel centroid, or maybe whatever the applicant typed into the form. I built a `pin-corrections.json` overlay for the worst offenders and re-geocoded through the French BAN (Base Adresse Nationale).
!Sunny Coffee overview map of Paris with a detail panel showing a single terrace
Buildings: the journey from OSM to IGN BD TOPO
Shadows need building footprints and heights . The first version queried OpenStreetMap via the Overpass API at click time. OSM has excellent footprint coverage of Paris, but only ~30% of buildings carry an explicit `height=` or `building:levels=` tag . The other 70% fall back to whatever default you pick.
The first default was 3 floors × 3.1 m = 9.3 m. Both numbers are wrong for Paris: the Haussmann standard is 5–6 floors, and floor-to-floor is closer to 3.5 m than 3.1 m. So a 35 m boulevard block was being rendered as a 9 m bungalow, casting a shadow less than a third of its real length. The risk: terraces marked _sunny_ on the overview map could turn out to be deep in shade when you actually went there.
I bumped the default to 5 × 3.5 m = 17.5 m, which matched Paris's measured mean of 19.2 m , but defaults are still defaults. The real fix was switching to IGN BD TOPO , France's official 3D building database, derived from aerial photogrammetry by the national mapping agency.
For Paris alone, BD TOPO has:
- 603,382 buildings vs OSM's ~225,000. BD TOPO captures outbuildings, garages, and garden structures that OSM misses.<br>- 87% with a measured `hauteur` field , with ±1 to ±2.5 m precision depending on whether the height was derived from stereo imagery or interpolation.<br>- A documented schema, quarterly updates, and a free public WFS API.
I use it in two ways:
- Server-side (precompute): download the GeoPackage once, convert with `ogr2ogr`, store as a 100+ MB...