Inspiration

We wanted to visit New York once from Montgomery, and we wanted to travel by Megabus which is usually significantly cheaper to travel in the US. However, in Megabus website, it will not show any option to go from Montgomery.

What it does

Even though Megabus does not show any options to connect Montgomery to New York, it connects them through Atlanta. We connect the dots for the user instead of trying to see which place might lead to the destination.

How we built it

We used Selenium and Beautiful Soup to scrap data of Megabus Stations. Considering each station as a node, we created an unweighted graph with connection between them as edges and ran shortest path algorithm considering minimum nodes connections as shortest path. After that, we created a weighted subgraph with price as weight, and ran shortest path again. This time we made sure there was no overlapping between buses arrival and departure time. Also, we used google places API to get the art places near the station, and recommend to our users to explore during connection times. We used Flask framework to develop the web app and deployed it to google cloud.

Challenges we ran into

  1. Web scraping: Megabus does not like web scrapers. So, we hand to use Selenium to extract data from the Megabus website.
  2. We struggled to get the shortest path, as nodes situated far from each other had a lot of paths.
  3. Flask was new to all of us. So, we spent many hours trying to figure out solution for simple issue like capturing data from form, performing operation with captured data, and passing it to a new view.

Accomplishments that we're proud of

We made a prototype for our vision to connect both megabus and greyhound and give users a chance to sort results based on factors like price, connection times, and travel duration.

What we learned

  1. Debugging is much easier when we are in a team.
  2. Flask
  3. Deploying flask app in chrome even though it does not run properly because of selenium issue.
  4. Web scraping
  5. Sending messages using twilio
  6. Sending email using SMTP

What's next for Connected By Bus And Art

  1. Connect Megabus and Greyhound stations.
  2. Give more option on how we come up with the shortest path
  3. Implement seamless payment functionality
  4. Ride sharing service info for all the arts places that can be visited within the connection time.
Share this project:

Updates