Transight 🚌

💡 Inspiration

Every Torontonian knows the feeling. You're at the bus stop, checking your app. It says "5 minutes away." Ten minutes later, you're still waiting, the creeping anxiety of being late setting in. We've all been there. It's a shared, frustrating experience in our city.

During a brainstorm, we hit on a question that became our obsession for this entire hackathon:

What if we could see the future of our commute? What if we could replace that anxiety with foresight?

We weren't content with apps that only tell you a bus is already late. We wanted to build a proactive tool, a crystal ball for the TTC. That's why we poured all our energy into creating Transight.


🎯 What it does

Transight is not just another transit app; it's an intelligent window into the rhythm of Toronto's entire bus network. It provides a stunning, data-driven experience that allows you to see, understand, and predict the city's flow.

Transight empowers you to outsmart delays with a beautiful, interactive, and predictive view of the TTC.

It offers two powerful lenses to view the city's transit:

  • 🌍 The Macro View (The Bird's-Eye Perspective): Our main interface is a breathtaking Mapbox visualization of Toronto. With a fluid time-slider, you can glide through an entire year and watch as delay hotspots emerge, fade, and shift across the city. It’s like watching the city breathe, with routes glowing red in moments of congestion and calming to green during periods of smooth travel.

  • 🔬 The Micro View (Your Personal Commute Co-pilot): When you click on your route, a minimalist dashboard slides into view. This isn't just historical data. It leverages our custom-trained ML model to give you a live prediction of delays for the next three hours. It’s actionable intelligence, right when you need it.


🏗️ How we built it

We built Transight on a robust, modern stack, meticulously architected for speed, accuracy, and a premium user experience.

The Data & ML Engine (The Brain 🧠)

Our predictive core was forged in Python, using a pipeline designed for massive datasets.

  • Data Pipeline: We wrangled years of raw TTC data with Pandas. Our biggest breakthrough was bypassing slow geocoding APIs. We engineered a high-speed local lookup by cross-referencing TTC locations with Toronto's traffic signal data, transforming a 10-hour nightmare into a 15-second triumph.
  • Machine Learning: We chose a LightGBM (Gradient Boosting) model for its raw speed and accuracy. After extensive feature engineering—creating signals from time, location, and incident types—we trained a model that acts as the predictive heart of Transight.

The Application Layer (The Experience ✨)

The user experience is powered by a modern, decoupled architecture.

  • Backend API: A blazing-fast FastAPI server acts as the central nervous system. It serves pre-aggregated data to the map and exposes a live /predict endpoint that uses our ML model to deliver real-time insights.
  • Frontend & Visualization: A fluid React single-page application brings the data to life. We obsessed over the details, using Tailwind CSS to achieve a minimalist aesthetic inspired by the design philosophies of Stripe and Apple. The map is powered by Mapbox GL JS, with charts beautifully rendered using Recharts.

Our Tech Stack:

  • 🎨 Frontend & Visualization

    • React: For building a dynamic and modern single-page application.
    • Mapbox GL JS: For rendering stunning, high-performance, and interactive map visualizations.
    • Tailwind CSS: To rapidly create a clean, premium, and responsive utility-first design.
    • Recharts: For simple, elegant, and composable charts in our dashboard.
  • 🚀 Backend API

    • FastAPI (Python): Chosen for its incredible performance, modern features, and automatic API documentation, allowing us to build a robust backend at hackathon speed.
  • 🧠 Data Science & Machine Learning

    • Python: The core language for our entire data pipeline.
    • Pandas: The workhorse for all data manipulation, cleaning, and our high-speed local geocoding engine.
    • LightGBM & Scikit-learn: A winning combination for training a fast, accurate, and highly efficient gradient boosting model to predict delays.

🧗 Challenges we ran into

Every great story needs a villain, and ours was data. We faced the monumental task of geocoding hundreds of thousands of messy text locations. We fell into the API trap at first, watching our script crawl at a snail's pace.

This was our 'aha!' moment. We pivoted. The decision to build our own local geocoder was a risk, but it paid off spectacularly. It not only saved our project's timeline but taught us a crucial lesson: sometimes the best solution is the one you build yourself.


🏆 Accomplishments that we're proud of

We didn't just build an app; we built a new perspective. We're incredibly proud of:

  • End-to-End Execution: From raw, messy Excel files to a live, predictive, and beautiful web application in under 48 hours.
  • The Breakthrough Geocoder: Our novel solution to the geocoding problem is a massive point of pride. It’s the secret sauce that made this project possible.
  • A Truly 'Insightful' UI: We created a visualization that is not only functional but tells a compelling story. The time-slider feels like a time machine for Toronto's transit.
  • That "Wow" Factor: Achieving our design goal of a clean, premium, Apple/Stripe-inspired aesthetic that makes data feel elegant and accessible.

🧠 What we learned

This hackathon was an intense learning crucible. Our biggest takeaways:

  1. Data Preparation is King: A powerful model is worthless without clean, well-structured data. Our success was born from the hours we spent wrestling with the initial dataset.
  2. The Magic of Parallel Workflows: Our decoupled front-end/back-end architecture was our superpower, allowing us to build the UI and the ML engine simultaneously.
  3. Tell a Story with Data: The best tech doesn't just present numbers; it provides a narrative. We learned how to make data beautiful and intuitive.

🚀 What's next for Transight

This is just the beginning. The foundation we've built is incredibly powerful. The future of Transight includes:

  • Real-Time Data Integration for up-to-the-second predictive accuracy.
  • Personalized User Accounts with proactive alerts for your daily commute.
  • **Additional Transits" to produce faster routes through different transits such as Go Transit, FlixBus, etc.
  • An Open API so other developers can harness our predictive engine to build the next wave of transit innovation.

Thank you for considering our project. We built Transight with the spirit of innovation that Hack the Valley champions, and we genuinely believe it can change the way Torontonians move.

Built With

Share this project:

Updates