A map of historical events (dots on a map). You can see the Observable notebook version here.
To run the site locally as an Observable Framework site:
Make sure you have Node installed. I'm using v22.13.1.
- Install node dependencies:
npm install -g yarn && yarn(install yarn and use yarn to install dependencies) yarn devto run the dev server at https://localhost:3000
This all happens in events.py.
To play with the code:
- Install Python
cd map-historypython3 -m venv .venv && source .venv/bin/activateto set up and activate a virtual environmentpython3 -m pip install -r requirements.txtto install dependencies fromrequirements.txt
The get_events_on_day function in events.py inspects the Wikimedia "on this day" endpoint for each day of the year and attempts to assemble a record that looks like this:
{
'year': number, # negative for years in BC
'month': string,
'day': number,
'longitude' number,
'latitude': number,
'description': string, # An HTML string
}
If the event description contains references to multiple locations, the function emits an event for each location.
Scraped events as of December 2025 are in src/data/events-by-month/.
Each file corresponds to a month.