Menu

I built a world history map where every ruler links to a source
📰

I built a world history map where every ruler links to a source

DEV Community: opensource·Nitin Sijwali·15 days ago
#HBwj0222
#devtoopensource#devto#dev#borders#claim
Reading 0:00
15s threshold

Most history maps show the borders. I wanted one that also says who was in charge, and where that claim came from.

You drag a year slider from 1000 BC to today, the borders move, and you can click any state to see who ruled it and what government sat below them.

Every ruler, office and event links to its source. This is enforced in code, not by trust. The fact schema rejects any entry without a source URL and a quote, so a claim that can't be backed up doesn't get in.

A few things that might help if you build something similar:

It's fully static. There's no server. The map geometry and facts are built ahead of time, and the browser fetches one TopoJSON file per year, so moving back and forth costs little.

The map is one Canvas 2D element using d3-geo, inside a single React island. The rest of the site is plain Astro pages.

Each state has its own page for search, like "who ruled France in 1960". The geometry and facts come from open datasets, and the licences are on the About page.

It isn't finished.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.