Inspiration

Bus and rail service to my hometown are both nonexistent, because it’s in the transit dead zone between Detroit and Ann Arbor. It’s a highly populated town, but everybody has to drive everywhere. Efforts to extend Ann Arbor’s transit system to us have been poorly planned and didn’t last long. Additionally, rail service in Michigan is quite lacking--surely one should be able to take the train from Detroit to Lansing without having to go through Chicago?

I'd like to see public transit in Michigan expanded significantly, and I’d like to have more data than just my own use case as a basis for routes I’d like to see. Why not build an app for that?

What it does

Transit Trailblazer surveys users about where they live and work. It uses that data to calculate possible routes for mass transit that serve enough people to potentially be viable.

How I built it

I built this app in Python, using StreamLit as the overall framework to handle the frontend. I used MongoDB as a database, and Matplotlib to draw a graph that acts as a 2D map.

Challenges I ran into

The hardest part by far was coming up with an algorithm to generate possible transit routes based on places. Pacing around and remembering things from my algorithms course eventually yielded a solution that generates paths. It’s not the greatest algorithm, and I could probably spend way more than 24 hours designing and implementing better algorithms. It could even be a task for AI.

Accomplishments that I’m proud of

I’m proud of learning two completely new sets of tools for this: StreamLit and MongoDB. I hadn’t heard of StreamLit until the presenters in a workshop early on the first day of this hackathon recommended it, so I’m thrilled that I was able to use it to build something I’m proud of in the span of just a few hours. As for MongoDB, I had heard of it before many times, but this was my first time actually using it, and I was surprised by how easy that was.

This is also only my second hackathon after SpartaHack 8, and after a rather dismal performance last year, I am happy to say that I built an app that actually does something!

What I learned

I learned how to use StreamLit and MongoDB--more skills for my repertoire. More importantly, I learned how to think about building a full-stack app all by myself: start as easy as possible and iterate quickly to get a proof of concept running, and then refine it over time.

I also learned how to come up with hackathon ideas. It doesn’t have to be anything super revolutionary, just something I think would be interesting to build and that’s reasonable.

What's next for Transit Trailblazer

I’d like to upgrade the algorithm to account for way more parameters. For now, it calculates purely based on where people are. It should instead be considering where people want to go and also where they might go outside of work. It could also take into account existing infrastructure and operating/maintenance costs.

I’d also like to secure the form so that it reduces the likelihood of duplicate entries, which could skew the data. It’s convenient for entering a sample data set in its current state, but not good for actual data collection.

Built With

Share this project:

Updates