Doublemap - My project that uses OHM

Doublemap is a map I created that uses OHM tiles to map historical events gathered from the Wikipedia ‘on this day’ API. The events gathered from Wikipedia are formatted and sent off to ChatGPT to approximate latitude and longitude and once returned are stored in a database for future reference.

Because of the support I received from @Minh_Nguyen (thanks again) and a promise I made to share my project with this community I wanted to add it here to see what you OHM fanatics thought! It was my first ever dive into map development and there are many things I still want to clean up with this app to make it more user friendly but it is what it is for now!

To get to the features you’d be more interested in click on the colorful book at the top right of the screen to check it out!

If interested a breakdown can be seen on my website under ‘Projects’, find ‘Doublemap’ and click on overview. The code is also there if you click on ‘Source’.

3 Likes

This is pretty slick – thanks for sharing! I’ve added Doublemap to the list of examples for developers to take inspiration from.

I took it for a brief spin and appreciated seeing the anniversaries being visualized in this manner. At first, I kept accidentally exiting out of history mode, because there didn’t seem to be an obvious way to get back to the events list from an individual selected event. Hopefully this would be straightforward to address so that users can peruse all the events from a given day in more detail.

I’m curious how ChatGPT is geolocating the events. Maybe there’s an opportunity to make it faster and more predictable by following the links from Wikipedia articles to Wikidata items to OHM chronology relations to boundary relations. I’ve found Hub handy for avoiding the need to chain multiple API calls together for that kind of crosswalk.

Hope this feedback helps. Overall though, I’m excited that you were able to get past the technical hurdles to make this map a reality. Let me know if you’re interested in getting some more attention on it via social media.

1 Like

Very neat! But I also was confused with the exit button for the events.

Thanks for taking a look at it!

To be honest, getting a grasp of what it’s like to develop a map really took it out of me! It took me months of research because I was weighing up all the different routes I could have went and understanding all the possibilities.

Towards the end of this project I was truly exhausted from all the work I put into it and there are definitely a few UI changes that need to be made to make the app easier to use. This may come at a later date as I am focusing on other things at the moment.

I’m curious how ChatGPT is geolocating the events.

Basically, I retrieve the events from Wikipedia, format them as a string to only include the event name and year and send them off in batches and stream the response to my PHP backend. All successfully returned coords are formatted and added to the table in the DB for that specific day.

ChatGPT’s API is notoriously slow unless you look at an older model which isn’t as accurate and mixes events up quite a lot.

While streaming the response I could definitely start populating the frontend to keep the user engaged but this opens a different can of worms giving the user the ability to do other things while I’m receiving the response from ChatGPT, potentially interrupting the original request, wasting the money I’ve spent on that request, all this in a hobby project.

The other option which I considered was manually doing each day myself and adding the coords into the DB which would mean I never have to use the API. I preferred the API because it made things a bit more hard which is fun and I could learn more.

Maybe there’s an opportunity to make it faster and more predictable by following the links from Wikipedia articles to Wikidata items to OHM chronology relations to boundary relations. I’ve found Hub handy for avoiding the need to chain multiple API calls together for that kind of crosswalk.

I’m not sure if I follow what you mean by that, although it does sound good?

Very neat! But I also was confused with the exit button for the events.

:rofl: I just can’t escape this exit button. I should have known before when my girlfriend had issues with that damn exit button!

Edit: here is the function that includes the prompt and the batches being sent off to ChatGPT.

1 Like

To be sure, I have very little personal experience coding with or calling into LLMs, so my suggestion may not make much sense for your architecture. I wasn’t sure if you were only using the LLM to determine where an event took place, or also to associate that place name with a coordinate or OHM boundary. Traditionally, you’d use a geocoder for the first step, but an LLM would be much more reliable, especially one already trained on Wikipedia like ChatGPT has been. Hub (or the individual APIs it encapsulates) would only be useful for the second step. But I was just spitballing in case you wanted to explore any optimizations.

1 Like