Chris Almaguer Data visualization design

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.

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 map carries both: country-level figures for the wider comparison, and US state figures from AAA estimates in dollars per gallon underneath them.

It runs in the page. The price data is baked into the document as 1,712 vector shapes, with no API key and no query at view time. Only the basemap is fetched.

Global gas prices - interactive Open full screen

Loading map…

Built for a 1440 × 900 viewport with no responsive breakpoints, so it renders at full size and scales to fit instead of reflowing. Basemap tiles come from CartoDB, so this panel needs a connection.

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

Bin breaks follow the distribution instead of equal intervals, so the classes carry roughly comparable numbers of places instead of splitting an empty range.

The ramp is sequential instead of categorical, because price is a quantity and a categorical set implies unordered groups.

Boundaries drop back to a hairline so the fill reads before the outline, and labels appear only where they do not collide.

The data is 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. Bin breaks, sequential ramp, 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 Safety Lens 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.


02

Color Safety Lens

Shipped an accessibility auditor, then found my own color math was wrong.

Next