Wisky

I used to live near a train station. It was like a 3min walk and the train would get you to the next stop, Balham, which was a few km away in exactly 4mins. Balham had a much wider range of resturant choices than where I lived and I noticed the all the food discovery apps would never recommend food from there because they all worked by drawing some radius around my location to present me with options. But I could catch the train and get to Balham quicker than I could get to a lot of the places inside the radius. Then I thought it would be neat if you could accurately search for restarants by time instead of some arbitrary radius. The truth is, we're more worried about how long it takes to get somewhere than how far it is physically. As I learnt, you can get a lot further in London in a shorter time than you probably think.

So back in 2014 I built Wisky (Dont ask. Terrible name, I know). The first step was building a graph of London. That meant collecting all bus, tube and train routes throughout London, including geolocation information and changeover time. It took a while but I managed to get all of this from TFL and compile it.

Next I needed similar restaurant information. Reliable ratings, geolocation, cuisine type and the rest. Foursquare was great for that sort of information and they even had an API.. so I scraped it.. frequently. I had to find a way to do it without hitting rate limits. Post for another time maybe ?

After adding all this data to a single graph correctly (hopefully), the algorithm to bring it all together Dijkstra for shortest paths. Solving the exact problem I had. Now I could pretty accurately tell how far I could get in a certain about of time in all directions from a location. You initiate the search by adding the users location to the graph, doing a spatial search for the stations/stops and restuarants immediately around and adding temporary edges to those nodes. From there its all dijkstra.

There were a few interesting problems I came across while building Wisky. Like, what results do you serve at night time when Londons public transport is a different graph almost entirely (I didn't solve this one).. or what you do with users spelling mistakes because 0 results due of a typo is not really good enough. .. or how much of the that time a user searches by are they willing to walk. The list goes on.

I decided to sunset the app, for now at least, due to the amount of maintenance it required versus the amount of usage it got. Ultimately I feel like I achieved what wanted to. Learnt a lot about graphs, London and found some places I otherwise probably wouldn't have. The code is still there, maybe one day I'll put back together.