Chris Almaguer

Case study - 04 / Exploratory

Prompting is not designing

An interactive study of global gas prices, built in R with Leaflet. I wrote it with AI assistance, which got me to a working map fast, and then cost me a long evening working out how to say exactly what "looks right" means.

Dumbbell chart Symbol map Live R

01 - Context

Fuel prices at two levels of detail at once

Fuel prices get reported either as a national average or as a local pump price, and the two are rarely shown together. This piece carries both: city estimates worldwide for the wider comparison, and four years of weekly U.S. prices from the EIA, by state and region, underneath them.

It runs in the page. The price data is baked into the document as 1,712 vector shapes, and the basemap is drawn from Natural Earth outlines that ship with it, so there is no API key and no query at view time.

Global gas prices - interactive Open full screen (opens in a new tab)

Loading prices…

Laid out for a 1440 × 900 frame, so it renders at full size and scales to fit instead of reflowing. Everything it draws ships with the page, so nothing is fetched from a third party.

02 - Process

The first working version was the default R map

Built in R with Leaflet, AI-assisted. A version that ran arrived quickly and looked like every default R map: rainbow bins, a legend in the wrong corner, and state boundaries competing with the data for attention.

Getting past that meant writing down decisions I normally make by eye. Every prompt that produced something worth keeping was one where the design decision had already been made before I typed it.

03 - Design

Four decisions, written down before they were prompted

The change leads, not the map. Each area gets a dumbbell, this week's price beside its price four years ago, ranked by how far it moved, and the map shrinks to an inset that shows where those areas are.

Color answers one question. On the price map, blue is cheaper than the U.S. average, red is pricier and gray sits at the average, because a scale with a real midpoint says more than a ramp the reader has to decode.

Boundaries drop back to a hairline and the dots lose their outlines, so the data reads before the geography, and numbers appear on hover instead of as labels competing for space.

The data and the basemap are baked into the document instead of queried, which removes the failure mode where the map is a blank basemap because an API is down or a key has expired.

04 - Impact

What this one is actually for

The map works. The finding is the process.

I got to something that ran in an afternoon and spent the evening on four decisions that took one line each to state. Change first, a color scale with a real midpoint, hairline boundaries, no runtime dependency. None of those are hard. They are just not defaults, and nothing was going to supply them for me.

The distance between an idea and something that runs is now short. The distance between something that runs and something correct has not moved. Color Accessibility Checker hit the same wall from the other side, where the thing that ran was confidently wrong and I could not tell by looking. That is the argument I make now for having a designer on this work rather than a prompt: the specification is the job.