How S7 is built

Author

Mohamed Gharbia

Published

October 16, 2026

Blueprint

flowchart TB
  C[/"Census 2021<br/>homes, work from home,<br/>modes, hour bands"/]:::data --> R["TODAY<br/>one correction<br/>for working from home"]:::rule
  H[/"S4 buildings<br/>homes"/]:::data --> W["HOMES<br/>commuters per home,<br/>by mode"]:::step
  R --> W
  R --> BA["BANDS<br/>leaving and arriving,<br/>as published"]:::step
  ST[/"STM stops"/]:::data --> D["DISTANCE<br/>nearest metro entrance<br/>and bus stop, along S1"]:::step
  N[/"S1 streets"/]:::data --> D
  W --> D
  D --> OUT[/"homes, bands, stops"/]:::out
  BA --> OUT
  OUT --> TE["TESTS"]:::test
  classDef data fill:none,stroke:#8a8a8a,color:#e6e6e6
  classDef rule fill:none,stroke:#8a8a8a,stroke-dasharray:4 3,color:#a6a6a6
  classDef step fill:none,stroke:#e6e6e6,color:#e6e6e6
  classDef out fill:none,stroke:#e6e6e6,stroke-width:2px,color:#ffffff
  classDef test fill:none,stroke:#fe83cc,color:#fe83cc

The sources

Source What S7 takes from it
Statistics Canada, 2021 census tract boundaries which tracts cover the study area, and how much of each lies inside it
Statistics Canada, table 98-10-0014 homes and population in each tract
Statistics Canada, table 98-10-0478 people at work in each tract, and how many worked from home
Statistics Canada, table 98-10-0480 residents’ way of getting to work, and the hour band they leave in
Statistics Canada, table 98-10-0504 the people who work in each tract: how they come, and the hour band they arrive in
STM, published timetable (GTFS), feed of 7 October 2026 metro entrances and bus stops around the area, kept when a vehicle stops there on a Wednesday
S4 Buildings today’s homes per building

Three tracts cover nine tenths of the study area. Statistics Canada’s tables are open under the Open Government Licence of Canada, and the STM’s under CC BY 4.0.

Commuters per home

A building with homes takes its tract’s commuters per home and its tract’s mix of ways to work. A building in a tract where nobody lived at the 2021 census would take the rates of the lived-in tracts together and become a checkpoint; none does.

The one correction

The census week fell during the pandemic. S7 reduces each tract’s share working from home by the fall measured across Canada, from 24.3 % in May 2021 to 17.4 % in May 2025. For the people who come here to work, the census does not say how many worked from home, so S7 raises their number by the national change alone, about 9 %. The hour bands keep the census’s own widths: S7 does not spread them into hours.

The nearest stops

For every building with homes, S7 measures the walk to the nearest metro entrance and the nearest bus stop with a departure on a weekday, along the walkable S1 streets from the point where the building meets its street. A stop outside the area is reached through the S1 door that makes the walk shortest, and the part beyond the door is measured as a straight line, so a distance to a stop outside is a little short.

Assumptions

Assumption Why I accept it for now What would replace it
working from home fell in each tract as it did across Canada the only measure since 2021 is national the 2026 census
a building’s residents commute like its tract the census is published by tract nothing finer is open
a walk beyond the area is a straight line S1 stops at the edge the streets beyond the area

Tests

Seven checks

Each check asks one plain question of what S7 wrote. Six must pass, and all six do; the seventh only reports.

Question Answer
T1 Is every census value S7 uses the one in Statistics Canada’s file? yes, every band of both tables
T2 Is the one correction applied as stated, to every tract and every band? yes
T3 Does every home’s number of commuters, by mode, rebuild from its homes and its tract’s rates? yes, 132 buildings
T4 Is each home’s nearest metro entrance and bus stop the nearest along S1, worked out again from scratch? yes, every 4th building
T5 Are the stops the STM’s own, with their departures, and is every home counted at its two nearest stops? yes, 295 stops
T6 Does S7 leave out the counts and space syntax, and draw no imagined walk? yes
T7 What does S7 give? report
TipTesting the tests

The first S7 drew walkers on every street, hour by hour. To do that it had to imagine where each person goes and when they come back, so I took that part out: it belongs to S9. Its tests had already caught one real fault, a distance outside the area counted twice; the measure of the nearest stops keeps that fix.

Stress tests

Run twice on the same input, S7 gives the same output (X1). X2 changes the one correction. With working from home as in May 2021, about 5,400 residents commute; with today’s national figure, 7,200; at the 2016 level, about 9,700. The shares by mode and hour do not move.