All thirty days

Day 24: Network

Canada's scheduled transit as one network: 115,649 links between 100,160 stops in 80 agencies' timetables, lit by how many trips run each one on a Wednesday. 42.5% of it sees 15 trips a day or fewer.

network.json
Loading 115,649 links
Look at
Show or hide
Trips a day on a link, busier direction
1–1516–4748–9596–191192+Montréal metro, not counted
Click a link for its agency and trips.

This is every bus, train, metro and ferry link in the 80 transit timetables unmap serves, drawn as one network. A node is a stop, 100,160 of them, and a link joins two stops a trip runs between without stopping: 115,649 links, 68,773 km of them. Each is lit by how many trips run it on Wednesday 25 November 2026 in its busier direction, from dim for a few a day to bright for one every few minutes. 184,370 trips run that day.

Most of the network is thin. 42.5% of its length sees 15 trips a day or fewer, less than one an hour. 9.4% sees 96 or more, about one every 10 minutes across a 16-hour day, and 1.9% sees 192 or more. The map opens on Toronto; switch to another city to see which of its streets carry the bright lines, or to all of Canada, where whole networks shrink to sparks.

The trips are concentrated too. Five networks run 58.3% of them, and Toronto's TTC alone runs 21.7%, 40,001 trips. 35 of the 80 timetables are in British Columbia, most of them BC Transit's small-town systems; the smallest, 100 Mile House, runs 8 trips.

The blank spaces are as much about data as about buses. Saskatchewan, Manitoba, Prince Edward Island and the three territories have no timetable on this map: Winnipeg, Saskatoon and Regina publish their schedules, but unmap's transit API does not carry them yet, nor Kitchener-Waterloo, Durham, Laval or VIA Rail, so no line here crosses the country. Montréal's metro is drawn in grey and not counted, because the STM's terms do not allow building on its metro schedules. Click a link for its agency and its trips.

How it's made

One basemap and one layer. This is the whole map, minus the legend.

import { createMap } from '@unmap/sdk'

// One edge per pair of stops a trip runs between without stopping, from each agency's GTFS:
// count the trips that run it on one Wednesday, in each direction, and keep the busier one.
const trips = new Map()
for (const trip of tripsRunningOn('2026-11-25')) {           // calendar.txt + calendar_dates.txt
  const runs = trip.frequencies ? trip.runsPerHeadway : 1       // frequencies.txt
  trip.stops.slice(1).forEach((stop, i) => {
    const key = edge(trip.stops[i], stop)                       // the same key both ways
    trips.set(key, (trips.get(key) ?? 0) + runs)
  })
}

const map = createMap({ key: 'um_pk_live_...', container: '#map', style: 'muted' })
map.on('load', () => {
  const labels = map.getStyle().layers.find((l) => l.type === 'symbol').id
  map.addSource('network', { type: 'geojson', data: toLines(trips) }) // each edge's piece of shapes.txt
  map.addLayer({ id: 'network', type: 'line', source: 'network',
    layout: { 'line-sort-key': ['get', 'trips'] },                    // busiest on top
    paint: { 'line-color': ['step', ['get', 'trips'],
      '#4A2A42', 16, '#7A2F5E', 48, '#B8377A', 96, '#FF3E9A', 192, '#FFC2DE'] } }, labels)
})

The timetables are the 80 GTFS feeds unmap's static transit API serves, downloaded from each agency on 24 November 2026. A script reads which services run on Wednesday 25 November 2026 from each feed's calendar and its exceptions, turns a trip given as a headway in frequencies.txt into one trip per headway, and walks every trip stop by stop, counting the trips on each pair of consecutive stops in both directions and keeping the busier one. A link is drawn along the trip's own shape between its two stops, or as a straight line when the feed has no shape or a stop sits more than 150 m from it. Three feeds had already replaced their schedule with the next one and run nothing that day, London, Red Deer and Longueuil, so each is counted on the first Wednesday its new schedule runs. The counts are scheduled trips, not riders, and not what actually ran: a cancelled bus still counts. Stops are each agency's own, so where two networks share a street their links are drawn side by side, not added together. The script is scripts/build-challenge-network.mjs in the unmap repository.

Data

  • Timetables: GTFS from 80 Canadian transit agencies, each under the terms listed for it at unmap.dev/coverage.
  • Route and arrival data used in this product or service is provided by permission of TransLink. TransLink assumes no responsibility for the accuracy or currency of the Data used in this product or service.
  • Data provided by Metrolinx. Metrolinx is not responsible for the accuracy of this information.
  • Contains information licensed under the Open Government Licence - Toronto. Contains information licensed under the Open Government Licence - City of Calgary. Contains information from OC Transpo. Société de transport de Montréal. BC Ferries.
  • Basemap: unmap, © OpenStreetMap contributors.

Share this map

Post it, or make your own and tag it #30DayMapChallenge.