It all started down at the pub, during a casual, work-adjacent gathering. Someone asked, "Wouldn't it be great if we could easily find all the burger places near here?"
A classic question. The kind Google Maps can answer. However, "here" is relative. For the purposes of this, "here" means a Young's pub.
The question then becomes, "What if we wanted to find all burger places near Young's pubs?"1.
The idea is to pick a burger place or a Young's pub based on how close they are to each other (and of course how close we are to either). I searched around but couldn't find anything that did exactly this - no tool that simply plots Thing A and Thing B on map at the same time. No directions, no filters - just a clean view of both, on the same map.
In the spirit of 2010s mashups I started doing this in python as a one-off. Static HTML, get the data using python, put it on a map, point-in-time accurate.
Looking at the Overpass API, there was no authentication required. I could issue direct queries using just a bit of JS and get current data, not just point-in-time.
It seemed fairly straightforward, until I realised that some Young's pubs were mysteriously missing. Not ideal 2.
I headed to the Young's pubs website to get a list of pubs in London. That meant trading off accuracy, as it'll now be postcode wide, but gain completeness.
After scraping the data, I now needed to geocode the postcodes, i.e. convert them to latitude and longitude coordinates, so I could send them to Overpass.
The data woes don't stop here. Young's lists a pub, the Nine Elms Tavern at SW8 5BP. This postcode doesn't exist. Therefore using the Nominatim API returned null, which Overpass didn't appreciate. The actual postcode is SW11 8AY.
After that final bit, we now have our map.
Young's pubs and burger places
and here's a map to plot any Thing A and Thing B within London3 You need to press Plot
.
Young's pubs do burgers. However, the groups' intent was to move away from the pub and to a different establishment
I believe the reason has to do with the branding that the pubs have. For example The Fellow at King's Cross does not have any Young's Pub relevant branding, but it is part of the chain. There was a delta between what OpenStreetMap thought was a pub operated by Young's and what Young's have on their website
You can change the bounding box to anything else fairly trivially