Deciding your next jog through the neighborhood or exploration through a new city is always difficult. We oftentimes find ourselves taking the same dull route every evening or flocking to the most popular attractions. Why not make your routes more enjoyable and unique every time? That's why we've created Going Places, an intelligent route planning system tailored to your cravings for more interesting routes in your everyday life.
What it does
Going Places automatically generates closed-loop routes for users based on a starting location of their choice. These routes can vary based on the user’s preference of distance and travel modality. While our system considers a variety of parameters for route generation, perhaps the most effective in generating interesting routes is denoting places of interest: parks, schools, and tourist attractions. A circular route is then generated and various metrics and highlights are displayed for the user to digest regarding the route.
How we built it
The Website: To build the website, we used express and Node.js because we wanted a framework that wouldn’t require too much time to set up. We used WebSocket to communicate between the client and the server, mainly for storing the user’s saved routes.
Route selection and the Google Maps API: We first search for the previously defined places of interest within a specific radius, depending on the user’s requested route length, in an area in a random direction away from the starting location. The area searched, in the shape of a circle, is such that the starting position falls on the area’s edge. Then, we find the convex hull of all the points of interest and use those points as our route. We retrieved names, locations and photos from the Places API, passed the location data to an algorithm that constructs the convex hull, and finally used the Directions API to draw the route on our map.
Storing User Data: We decided to utilize CockroachDB to store data from the routes user generated. A majority of this data was stored using CockroachDB’s JSONB data type, which was extremely useful for storing necessary data about the routes we were generating. We also used Python to interface with CockroachDB.
Challenges we ran into
A significant challenge we ran into was interfacing between the client and server sides of our web solution. We solved this by incorporating WebSockets into our solution and handling messages being sent between the client and the server independently. Another challenge we faced was reliable route generation. We wanted to ensure that the routes were arranged properly, fitted with the proper starting and destination locations without any strange anomalies.
Accomplishments that we’re proud of
Creating routes from mapping data can take very long because of the amount of options one has, especially in a dense area. However, because we use an algorithm to determine the convex hull of a set of places of interest, we actually have a much easier time generating routes in denser areas.
What We learned
What's next for Going Places
There are a variety of different improvements we can make to improve the accuracy and usability of Going Places. One notable improvement is better route generation in sparsely populated areas; as of now, Going Places works best in suburbs and cities - places where there are a plethora of locations and road variations. Another improvement we started to implement was incorporating a user’s route preference into the route generation. We attempted to apply simple learning algorithm by ranking routes based on a user’s preference. Routes would be ranked based on parameters of the route, such as distance, places of interest, and elevation changes, as well as the sentiment of the user’s rating to suggest more optimal routes in the future. Simply put, Going Places will always be going places.