Hybrid Commute

Inspiration

All too often, the fastest, most convenient, or cheapest option to get somewhere is not returned by typical consumer mapping software such as Google Maps. Such platforms offer trips using one of several modes of transportation, such as driving and public transit. However, often, the best compromise between cheap, fast, and convenient is offered not by one of those options, but by a combination. Many urban residents take rideshare to their nearest subway line when in a rush, and many suburban commuters drive a few minutes to their nearest commuter rail station and take the train to avoid the hassle of driving. We seek to bridge that gap and provide a solution to these commuters for their typical travel needs.

What it does

Hybrid Commute finds nearby rail stations to the starting and ending point of a commuter's route and routes the commuter from their starting location to their ending location by means of a public transit route between the stations. Commuters on their way to work can choose to drive the first leg and walk the last leg, and vice versa for their way home.

How we built it

We used Python and the Google Maps API to find rail stations close to the starting and ending point and find directions for each leg. We compute several routes and find the shortest by time. In the future, we would also like to be able to incorporate other elements of the Google Maps API to optimize for other considerations, like fewest transfers or shortest walking time.

Challenges we ran into

From the start, the learning curve for the Google Maps API was fairly steep -- we spent a lot of time trying to learn the syntax and figure out from where we specifically needed to extract certain data. For a long time, we also had a problem with the place-type encoding in Google Maps; different cities classify their rail system stops differently. Once we had the three legs of the route, it was also a challenge to figure out how to string them all together. In the end, we also faced obstacles finding a way to clearly display the route on a map.

Accomplishments that we're proud of

We're proud that we have a finished product that works cleanly and with little hassle to users, providing a simple, yet effective, solution to the problem we set out to address.

What we learned

We learned a lot about the Google Maps API, about how data is organized in Google Maps, and how to reconcile accuracy with the ability to obtain search results efficiently.

Built With

Share this project:

Updates