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. The ranges were deliberately cautious and wider than the observed outcomes required.
- Official journeys used
- 3,563,266
- Journeys used in the study
- 356,057
- Station-hours modelled
- 41,460
- May forecasts tested
- 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 May watch list. That makes it a place to check 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; check availability before planning
- 02Waterloo Station 3, Waterloo2.98 MAE
Wide forecast range; check availability before planning
- 03Waterloo Station 1, Waterloo2.58 MAE
Wide forecast range; check 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
Follow the Waterloo morning peak from the earlier records to the planning review.
The example follows 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 shown alongside the point estimate rather than being hidden by it.
- 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
Follow one forecast
Every value can be followed from counted journeys to planner review.
- 01station-hour observation152 departures
Counted from unique TfL journey numbers
Review role: Operations analyst - 02forecast issue2026-05-13 06:00:00+00:00
Only earlier observations available
Review role: Operations analyst - 03168-hour seasonal lag108
Same station and hour one week earlier
Review role: Operations analyst - 04selected forecast161.3
80% interval 0.0 to 169.3
Review role: Model reviewer - 05error review9.3 hires
Flagged for station-day review
Review role: Station operations lead - 06planner actionHuman review required
Check live availability, nearby docks and operating constraints before intervention
Review role: Service planner
The six stages are saved in one-station-day-trace.csvand can be reproduced with npm run verify:cycle-hire-demand. The final step requires the service planner to check 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 covers 1 to 31 May, and the records remain in time order.
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 model card records the intended decision, error costs, abstention rule, monitoring triggers and retraining conditions.
outputs/model-card.mdArtifacts checked: 5. Using the same locked inputs reproduced the Parquet layers, evaluation results and Waterloo predictions byte for byte.
outputs/repeatability-results.txtData, period and limits
A forecast shows where to check, not that cycles will be unavailable.
The study uses ten checksum-verified TfL journey extracts from 1 January to 31 May 2026 and a reference list of twelve selected stations.
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 records were not available at the time each forecast was made.
Twelve busy stations do not represent the whole network. This is a historical test on unseen data. It does not demonstrate live performance, a causal effect or an automatic rebalancing instruction.
See how the analysis was produced
The figures on this page are produced by the 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 final May forecasts.
Generated analysis report · outputs/native-report/index.html · 7 analytical checks passed
Technical detailsView the data licence, model comparison, rebuild steps and analytical limits
Build
Python 3.12, DuckDB, Parquet and scikit-learn run from a locked environment. Five analytical output files reproduce byte for byte when the same locked environment is rebuilt.
Evaluation
Three expanding time splits compare a weekly baseline, regularised Poisson model and boosted point and quantile forecasts. May 2026 is reserved for the final test and is not used to train or select the model.
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.
Limits
Completed hires do not reveal unmet demand, historic stock or rebalancing. A planner must check live availability and operating constraints before acting.
Discuss a forecasting problem
Start with the planning decision, then test whether the forecast is good enough to support it.
We can begin with the action being planned, the available records, how far ahead the forecast is needed and the cost of getting it wrong.
