Inspiration

As Toronto approaches its 2026 municipal election, congestion, construction coordination, and the use of limited street space are everyday issues residents need to understand. The City’s 2026 Congestion Management Plan prioritizes reducing construction impacts and anticipating disruptions. Yet understanding how overlapping closures might affect surrounding streets remains difficult without specialist tools.

An everyday commuter might wonder how construction will affect their journey. An event organizer might need to compare closure times. A city planner might want to explore whether staggering nearby construction projects could reduce disruption.

We wanted to answer a practical question: what if people could explore the consequences of a traffic disruption before it happened?

So we built flowTO, an interactive scenario explorer that makes Toronto’s transportation data more accessible and actionable. Our goal is to support informed, nonpartisan discussion during the election and practical planning afterward.

What it does

flowTO is an interactive Toronto traffic simulator built on approximately 43,000 real road segments, designed to help different users explore the same city from their own perspective.

  • Everyday commuters can explore how a planned closure or major event might affect roads along their usual journey.
  • Event organizers can compare closure locations and times to understand potential disruption around their venue.
  • City planners can explore overlapping construction schedules, compare alternatives, and identify streets that may receive additional traffic.
  • Journalists and community organizations can investigate neighbourhood impacts and use scenario comparisons to inform public discussion.

Users can place road closures, collisions, construction zones, and major events directly onto a 2D or 3D map, adjust their timing, and compare estimated traffic conditions against a baseline scenario. The simulation models rerouting, queues forming, congestion spilling onto neighbouring streets, and recovery after disruptions end.

For example, users can compare two nearby closures happening simultaneously versus the same closures scheduled at different times. An analytics dashboard reports estimated additional vehicle-hours of delay, unfinished trips, and the most affected roads.

A Gemini-powered assistant translates everyday descriptions into structured scenarios, allowing users to describe closures by street names and intersections rather than technical road identifiers. Users can also adjust weather conditions, control playback, and save simulation results through Tiger Data.

flowTO supports exploration rather than personalized navigation. It does not predict elections or support candidates; it helps people ask more informed questions about transportation decisions affecting their city.

How we built it

Our architecture combines a graph-based traffic simulation engine, an interactive geospatial interface, an AI assistant, and time-series analytics.

The road network: We processed Toronto Open Data, including road centrelines, intersection counts, and midblock traffic measurements, into a connected network of approximately 43,000 road segments. Because measurements are incomplete and collected across different years, our pipeline combines available observations and estimates missing volumes using nearby counts and road classifications.

The simulation engine: We built a custom network solver that tracks vehicle movement, queues, and rerouting. The engine accounts for finite road capacity, queue spillback, and congestion recovery. It runs in a dedicated Node.js worker, separating intensive calculations from the interface. Completed simulation windows are cached so users can revisit previously calculated periods without unnecessary processing.

The interface: We used Next.js, TypeScript, Mapbox, and MapLibre to render Toronto in 2D and 3D. Users can place disruptions, drag their endpoints along streets, control playback, inspect road-level metrics, and compare baseline traffic against their scenario.

The AI layer: We integrated Google’s Gemini API to translate natural-language requests into structured disruption configurations and provide explanations. Gemini supports interaction and interpretation, while our custom simulation engine calculates traffic behaviour. Numerical results come from the model rather than AI-generated predictions.

The data layer: We integrated Tiger Data, using Timescale PostgreSQL, to persist simulation configurations and results. Minute-by-minute simulation metrics are stored using hypertables, while continuous aggregates support hourly comparisons across saved runs.

Together, these components turn municipal transportation data into scenarios that people can create, explore, and compare without writing code.

Challenges we ran into

Our biggest challenge was simulating traffic across a large road network while keeping the experience interactive. Vehicle movement, rerouting, queue propagation, and recovery required careful performance optimization and coordination between the server and map playback.

Real-world data presented another challenge. Toronto’s traffic counts are incomplete and span different collection periods. We needed to distinguish observed counts from estimated values and build a usable baseline without implying that every road had current measurements.

We also had to make scenario creation reliable. Natural-language street descriptions can contain ambiguous names, east and west variants, or multiple closures in one request. Translating those descriptions into connected road sections required more than simply matching a street name.

Finally, we worked to make complex results understandable. A visually dramatic map is only useful if people can compare scenarios and understand what the colours and metrics represent.

Accomplishments that we're proud of

We’re proud of connecting real Toronto transportation data, interactive mapping, natural-language scenario creation, and time-series analytics into one functioning prototype.

Users can move from a question such as “What happens if King and Adelaide close at the same time?” to a mapped scenario and a comparison with baseline conditions.

We’re especially proud that our AI integration serves a practical purpose: making scenario creation easier while keeping traffic calculations within an explicit simulation model.

Most importantly, flowTO gives commuters a way to explore potential disruption, event organizers a way to compare options, and city planners a prototype for evaluating overlapping closures. It makes a complex municipal issue something people can investigate directly.

What we learned

We learned how to build and optimize graph-based simulation algorithms, process large geospatial datasets, and integrate time-series storage with computationally intensive applications.

We also learned that making civic data accessible requires more than publishing it. People need a clear question, an approachable interface, and results they can interpret.

Responsible interpretation is essential. Our outputs are exploratory estimates based on historical traffic counts, inferred demand, and modelling assumptions—not validated forecasts or live traffic observations. The current prototype focuses on vehicle traffic and does not yet measure the full effects on transit riders, pedestrians, cyclists, or accessibility.

A useful civic prototype must make these limitations understandable while still helping users investigate meaningful questions.

What's next for flowTO

Our next priority is validating simulation behaviour against observed conditions and improving the model with more detailed intersection signal timing, turning restrictions, and travel demand data.

We also want to test flowTO with everyday commuters, event organizers, and city planners to understand which comparisons help them make decisions. This will guide clearer explanations of uncertainty, more accessible results, and better scenario-sharing tools.

Longer term, we hope to represent transit and other street users more fully, explore environmental impacts, and support collaborative planning.

Our goal is to help Toronto understand transportation trade-offs before experiencing their consequences—during the election and beyond.

Data sources

Our core Toronto data sources are:

longside Toronto’s open datasets, we consulted transportation research and engineering guidance to inform our modelling approach:

Built With

Share this project:

Updates

Submission history