Skip to main content

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.

Held-out May resultThe selected model reduced error by 20.8% against the same-hour-last-week baseline across three notice periods.

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.

1 hour24.7% better than the weekly baseline
89.0%
3 hours19.1% better than the weekly baseline
88.6%
6 hours18.5% better than the weekly baseline
88.7%
Selected modelSame hour last week

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.

  1. 01
    Hyde Park Corner, Hyde Park

    Wide forecast range; inspect availability before planning

    3.18 MAE
  2. 02
    Waterloo Station 3, Waterloo

    Wide forecast range; inspect availability before planning

    2.98 MAE
  3. 03
    Waterloo Station 1, Waterloo

    Wide forecast range; inspect availability before planning

    2.58 MAE
  4. 04
    Argyle Street, Kings Cross

    High forecast demand; compare with nearby stations

    2.09 MAE
  5. 05
    Hop Exchange, The Borough

    High forecast demand; compare with nearby stations

    2.11 MAE
  6. 06
    Wormwood Street, Liverpool Street

    High forecast demand; compare with nearby stations

    1.70 MAE

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.

Waterloo Station 3 · 13 May 2026Each point keeps the forecast issue, range and observed departures together.
00:001
01:000
02:000
03:000
04:000
05:001
06:0020
07:0071
08:00152
09:001
10:001
11:000
12:001
13:001
14:002
15:001
16:003
17:004
18:004
19:001
20:000
21:004
22:000
23:000
80% forecast rangeForecastActual departuresWeekly baseline at 08:00
Same hour one week earlier
108
One-hour forecast
161.3
Observed departures
152
Absolute error
9.3
80% forecast range
0.0169.3

One forecast retained

Every value can be followed from counted journeys to planner review.

  1. 01
    station-hour observation

    Counted from unique TfL journey numbers

    Saved result · review role: Operations analyst
    152 departures
  2. 02
    forecast issue

    Only earlier observations available

    Saved result · review role: Operations analyst
    2026-05-13 06:00:00+00:00
  3. 03
    168-hour seasonal lag

    Same station and hour one week earlier

    Saved result · review role: Operations analyst
    108
  4. 04
    selected forecast

    80% interval 0.0 to 169.3

    Saved result · review role: Model reviewer
    161.3
  5. 05
    error review

    Flagged for station-day review

    Saved result · review role: Station operations lead
    9.3 hires
  6. 06
    planner action

    Check live availability, nearby docks and operating constraints before intervention

    Saved result · review role: Service planner
    Human review required

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.

Ordered splits3 expanding origins · final fold held out

Training ends 30 April 2026. The final test runs from 1 to 31 May without random shuffling.

outputs/model-evaluation.json
Leakage controlFuture observations excluded

Demand, arrivals and net movement are shifted by the forecast horizon; station selection uses January to March only.

tests/test_pipeline.py
Model cardgradient boosted quantile

The retained card defines the intended decision, error costs, abstention rule, monitoring triggers and retraining boundary.

outputs/model-card.md
Repeatabilityidentical inputs produced identical retained analytical outputs

Artifacts checked: 5. Locked inputs reproduced the Parquet layers, evaluation and Waterloo predictions byte for byte.

outputs/repeatability-results.txt

Source, 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.

TfL journey records

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.

What is missing

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.

What the result cannot claim

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.

Discuss a forecasting question