Inspiration

The idea of this project is to suggest an emotionally pleasant alternative route to the users of mapping services. By emotionally pleasant, I mean routes that are more scenic, quieter or have some kind of interesting attractions for users like restaurants, tourist places, etc. The current mapping services do not provide this feature. It can be very useful when planning tours.

What it does

The project suggests alternative pleasant routes in New York City that would be only reasonably longer than the most optimal routes. For this, we use the opinions/emotions left behind by people about the different places on social networking platforms like Foursquare. When visiting a place, people have a tendency to share their experience or leave behind a review about the place on Foursquare. As this social networking site allows geo-tagging, we can use this data to know the general sentiment of the people about the place. This sentiment score can then be used in identifying pleasant routes to a destination.

How I built it

My approach to this problem can be summarized into three main steps:

  1. Create a graph with nodes as the places on the map. Geographically neighboring places are connected by an edge in the graph. The edges represent the geographical distance between the places. For this project I considered New York City.

  2. Then extract posts from Twitter and Foursquare with places tagged in them. Using Sentiment Analysis, we get the opinion of people about the place. Then update the graph we created in step 1 with the sentiment score. We do this for all the places/nodes in our graph. Finally we have a graph with each node having a corresponding sentiment score.

  3. Now, when a user enters his destination, we find the route to the destination using the graph that we created. For this, we use the path finding algorithms. We find the different routes, each having two scores assigned to themĀ­-Distance and Sentiment. We then find the best possible route, one that is not too long than the shortest one, but has more positive sentiment to it, signifying more emotional pleasantness.

Challenges I ran into

Dividing the city of New York in blocks of 1km square are geographically required use of latitudes and longitudes. Understanding the Foursquare API was tough at start. Also, path finding algorithms like Yen's K shortest paths algorithm and Dijkstra's algorithm was a challenge to implement, especially because the graph size was huge.

Accomplishments that I'm proud of

Successfully leveraged the vast potential of the data on social networking sites to improve the mapping features. Sentiment Analysis of this data provides valuable insights about different places in a city, which I have used to find an emotionally pleasant route. This feature in a mapping service is bound to make our trips a lot more exciting!

What I learned

Using Foursquare API. Also, several Graph Algorithms like Yen's Algorithm.

What's next for Route to Happiness

  1. Adding this feature to the mapping services like Google Maps, Apple Maps
  2. Using the data from other social networking sites like Twitter, Flicker etc.

Built With

Share this project:
×

Updates