Ask the Planet
A month of live earthquakes on a 3D globe, explored by asking questions in plain English. The AI writes the filter. Every dot and every number comes from the USGS feed.
Public data, hard to ask.
USGS publishes every earthquake of magnitude 2.5 and up, worldwide, updated every minute: close to 1,900 a month. Narrowing them down on their map means sliders and dropdowns, so you need the vocabulary before you can ask anything.
I wanted to type the question I actually had, like "deep quakes under Fiji," and trust the answer. That's the catch: an AI that answers questions about data will, sooner or later, make up a number.
A light globe, and an answer you can read.
Before building, I mocked up the same answer, "Near Japan," in every direction I wanted to try: four color directions, four layouts and about twenty palettes. Holding the content still meant only the design changed between them.
- Light, not outer space.Nearly every globe demo is a glowing planet on black, and my first wireframe was too. I tried it against sky, paper and matcha. On a light page it reads as a tool you work in, not a screensaver, and the data colors carry the screen instead of the glow.
- The answer as a sentence.A card floating over the map hid the globe, a console turned the answer into tiles, and a ledger was a spreadsheet. The editorial layout led with one big count and a sentence saying what was counted. That pairing became the heart of every answer.
- Every color gets one job.The early palettes used one hot accent for everything: the dots, the count, the chips, the button. The final one splits the work. Blue is the globe, a four-step ramp is depth, violet is place and rose is time. The sentence, the ring on the globe and the timeline share those colors, so they read as one answer.
Every answer says exactly what it counted.
With the count and sentence settled, the rest of the panel had to stay readable at 5 quakes and at 1,900.
- Color means depth, size means magnitude.Four depth bands, named in plain words, keep one color everywhere: globe, timeline, list and legend.
- The timeline changes shape with the answer.Under 150 quakes, one bar per quake. Above that it counts per day, and each day is clickable.
- Dense places stay readable.Fiji was one solid blob. Dots now shrink when other quakes sit within about 160 km, so a cluster still reads as many quakes.
Always the last 30 days, minutes old.
The server fetches USGS's live feed, keeps the seven fields the app uses, and caches it for five minutes, so a thousand visitors make one request to USGS. The header says how fresh it is: "Live · USGS · 3m ago."
- All the filtering happens in the browser.The month loads once, about 250 KB. After that every answer, chip and day pick is instant.
- Every answer is a link."Copy link" shares exactly what's on screen, and the back button steps through earlier answers.
The AI writes the query, never the answer.
The model's only job is to turn a question into a structured query: magnitude, depth, a place with a radius, a time window, a sort order. The schema has no field for a count or a fact, so it can't return one. The app runs the query on the real data and writes the sentence from the results.
- You can see what it wrote.If an answer looks wrong, the query shows whether the AI misread you or the data really says so.
- It never leaves you empty-handed.A question that names a place always shows that place's quakes, with a one-line note if the rest is off-topic. Only questions with no place and nothing to filter, like "write me a poem," get a plain no, and the guide opens to show what works.
- It's cheap to run.The examples are pre-written queries, free and instant. Typed questions are capped at 200 characters, cached, and limited per visitor.
The hardest part was teaching it which questions are about earthquakes. Every prompt fix broke something else: catching "weather in Paris" turned "what happened in Japan?" into a refusal, and letting bare place names through broke "strong quakes." What held was taking the decision out of the prompt. The AI labels each question first (answerable, not in this data, or off-topic), and the server enforces the label, so a stray refusal can't block a real answer. A set of 23 test questions has passed every run so far.
A globe, because the planet is round.
Earthquakes follow plate edges that wrap around the Pacific. A flat map cuts that ring in half; on a globe it reads as one line.
- The camera goes to the answer.It flies to the place and rings the radius, or turns to the side that shows the most of the answer.
- Dots arrive in a ripple.Matching quakes grow outward from where the camera is heading, showing what changed without a word. With reduced motion, they simply appear.
- Light, and optional.A still globe stops drawing, the map is drawn off the main thread, and without WebGL everything but the globe still works.
Audited until the fixes ran out.
Rounds of scripted browser tests and accessibility audits (keyboard only, 200% text, high-contrast mode, WebGL off), each fixing what the last one found. A few of the fixes:
- The timeline couldn't be used by keyboard.Each day is now a button: arrow keys move between days, Enter shows one.
- One crash took the whole page down.Without WebGL the page went blank. Now only the globe is replaced, with an explanation.
- A new answer froze the page.Sizing clusters compared every quake with every other. Grouping nearby quakes first took it from 16 ms to 5 ms, with a test proving the same result.
What I'd do next.
It does the one thing I wanted: you ask the question you actually have, and the answer is only ever the data.
- Run the question tests on every change.The 23 questions run by hand today. In the build, a prompt edit couldn't ship without passing them.
- Compare periods."Is this month busier than last?" needs more than 30 days and two answers side by side.
- Explain magnitude.An M 6 releases about 32 times the energy of an M 5. A line by the size key would help people read the dots.