Cycle-hire planning research · Python
Cycle Hire Demand and Service Planning
A service planner needs to know which busy station deserves a closer check before the next operating shift. One, three and six-hour forecasts show expected departures and uncertainty; they do not decide where cycles should be moved.
Its 80% forecast range contained the observed total in 88.8% of final May forecasts, so the retained ranges were conservative.
- Official journeys inspected
- 3,563,266
- Journeys retained
- 356,057
- Model-ready station-hours
- 41,460
- Held-out forecasts
- 26,784
The planning question
Where might departures run ahead of the current service plan?
The operations analyst prepares the forecast for a service planner and station operations lead. A high predicted total is not enough: they also need to know how far ahead it was made, how wide the likely range is and whether the station has a history of large misses.
Hyde Park Corner has the widest mean one-hour range in the retained watch list. That makes it a place to inspect live bike availability and nearby docks. It does not prove a shortage or justify a rebalancing move by itself.
Error by notice
More notice gives the planner more time, but less accurate demand.
The selected model remains ahead of the weekly baseline at every horizon. Mean absolute error rises from 2.14 departures at one hour to 2.32 at six hours, so the page never mixes forecasts made at different times.
Station review field
Wide ranges and repeated misses determine where review starts.
The watch list combines observed May demand, forecast error and mean range width. Amber is reserved for uncertainty that needs attention; it is not a performance rating.
- 01Hyde Park Corner, Hyde Park3.18 MAE
Wide forecast range; inspect availability before planning
- 02Waterloo Station 3, Waterloo2.98 MAE
Wide forecast range; inspect availability before planning
- 03Waterloo Station 1, Waterloo2.58 MAE
Wide forecast range; inspect availability before planning
- 04Argyle Street, Kings Cross2.09 MAE
High forecast demand; compare with nearby stations
- 05Hop Exchange, The Borough2.11 MAE
High forecast demand; compare with nearby stations
- 06Wormwood Street, Liverpool Street1.70 MAE
High forecast demand; compare with nearby stations
One station-day
The Waterloo morning peak remains traceable to the earlier records.
The retained forecast is Waterloo Station 3 at 08:00 Europe/London on 13 May 2026. It records 152 departures. The one-hour forecast was 161.3, compared with 108 departures at the same hour a week earlier. The unusually wide range is retained rather than hidden behind the point estimate.
- Same hour one week earlier
- 108
- One-hour forecast
- 161.3
- Observed departures
- 152
- Absolute error
- 9.3
- 80% forecast range
- 0.0–169.3
One forecast retained
Every value can be followed from counted journeys to planner review.
- 01station-hour observation152 departures
Counted from unique TfL journey numbers
Saved result · review role: Operations analyst - 02forecast issue2026-05-13 06:00:00+00:00
Only earlier observations available
Saved result · review role: Operations analyst - 03168-hour seasonal lag108
Same station and hour one week earlier
Saved result · review role: Operations analyst - 04selected forecast161.3
80% interval 0.0 to 169.3
Saved result · review role: Model reviewer - 05error review9.3 hires
Flagged for station-day review
Saved result · review role: Station operations lead - 06planner actionHuman review required
Check live availability, nearby docks and operating constraints before intervention
Saved result · review role: Service planner
The six stages are retained in one-station-day-trace.csvand reproduce with npm run verify:cycle-hire-demand. The final step requires the service planner to inspect live availability, nearby docks and operating constraints before acting.
Time-ordered evaluation
May remains outside training, and every demand feature stops at issue time.
The selected boosted model is compared with a weekly baseline and regularised Poisson model. Selection uses error, peak-hour error, high-volume error and interval coverage rather than a single score.
Training ends 30 April 2026. The final test runs from 1 to 31 May without random shuffling.
outputs/model-evaluation.jsonDemand, arrivals and net movement are shifted by the forecast horizon; station selection uses January to March only.
tests/test_pipeline.pyThe retained card defines the intended decision, error costs, abstention rule, monitoring triggers and retraining boundary.
outputs/model-card.mdArtifacts checked: 5. Locked inputs reproduced the Parquet layers, evaluation and Waterloo predictions byte for byte.
outputs/repeatability-results.txtSource, period and decision boundary
A departure forecast is evidence for a check, not evidence of a shortage.
The study uses ten checksum-locked TfL journey extracts from 1 January to 31 May 2026 and a retained twelve-station reference.
Powered by TfL Open Data under the Transport Data Service Licence. The journey extracts contain completed hires; no client or live operating data is used.
Completed hires do not show attempted hires, historic bike stock, rebalancing, closures, maintenance or capacity changes. Weather is excluded because equivalent issue-time records were not retained.
Twelve busy stations do not represent the whole network. This is a historical held-out test, not deployed performance, a causal effect or an automatic rebalancing instruction.
Open the original analysis
The figures come directly from the retained Python and DuckDB analysis.
The build checks ten official file hashes, creates typed journeys and complete station-hours, fits three model families across three rolling origins and writes the page figures from the retained May forecasts.
Original generated report · outputs/native-report/index.html · 7 analytical checks passed
Technical documentationInspect the data licence, model comparison, rebuild and analytical limits
Build
Python 3.12, DuckDB, Parquet and scikit-learn run from a locked environment. Five retained analytical files reproduce byte for byte on an identical rebuild.
Evaluation
Three expanding time splits compare a weekly baseline, regularised Poisson model and boosted point and quantile forecasts. May 2026 remains the final held-out period.
Where the data comes from
Powered by TfL Open Data under the Transport Data Service Licence. The study uses ten official extracts from 1 January to 31 May 2026.
Boundary
Completed hires do not reveal unmet demand, historic stock or rebalancing. A planner must check live availability and operating constraints before acting.
Bring the decision
Test a forecast against the planning decision it must support.
Start with the operational action, available records, forecast notice and cost of being wrong.
