~/todd-fleeman/case-study — session log entry

~/Equirectangular Map

started 2026-10-19 · last touched 2026-10-19
why this exists

The world, drawn flat. This is my first map in D3 v7. I rebuilt it from an old version I'd written years ago, to relearn how geographic data becomes SVG. It's the simplest projection there is, which made it the right place to start before moving on to globes and anything fancier.

built on / learned
D3JS
Data Visualizations
  • Projections are the whole trick. One function turns latitude and longitude into x and y. Everything else (water, land, grid lines, borders) is drawn with whichever projection you hand it. Change the projection and the whole map changes with it.
  • The Sphere is the ocean. The water isn't a rectangle behind the map. It's the outline of the earth, drawn as a shape. On a flat map you can't tell the difference. On a globe, it turns into a circle on its own.
  • TopoJSON over GeoJSON. The world file stores shared borders once instead of twice, so it's much smaller. One call pulls out the land, and another pulls out just the borders between countries, so they're drawn once instead of doubled up.
  • Loading inside React. The map data loads asynchronously inside an effect, with a guard so a component that's already gone doesn't try to draw.
where this might go

Swap the land color for data, and it's a choropleth: election results, store locations, shipping coverage, where your users are, color-coded by country. Add points, and it's a live tracker for flights, deliveries, or a team's away games. Add time, and you can watch something spread across the world. A flat map is the clearest way to show "where." What goes on it is up to whoever needs to see it.