TransitRadar

What a train is made of, and why the data lies about it

Which carriages make up a particular train is published data, but almost nothing about it means what it appears to mean. Here is what the industry's own allocation feed says, and the four places we have watched it mislead.

If you have ever wanted to know whether the 17:42 will be four coaches or eight, that fact exists in a feed. It is not a passenger feed and it was never written for you, which is why reading it correctly takes some care.

Allocations, not observations

The data comes from the industry's train allocation system, and the single most important thing about it is in the name. It records what an operator has allocated to a service — the units the plan says should form it. It is not a report that those units turned up.

The publisher is explicit that the allocation is not guaranteed during disruption, and we have watched operators amend a diagram late in the evening for a service that ran that morning. So a formation is a statement about intent with a timestamp attached, and on a service page we show the timestamp beside it for exactly that reason. If the train was swapped at short notice, the feed may never say so.

A unit number and a vehicle number look identical

Two kinds of number appear, and nothing about their shape tells them apart. A unit is the whole self-contained train — 755403 — and a vehicle is one carriage within it, such as 911403. Both are six digits. Both are painted on the outside of a train.

Our vehicle lookup therefore accepts either and searches both, because a person standing on a platform reading a number off the bodyside has no reason to know which they are holding. A vehicle is matched through the link between carriage and formation, so it finds the train even though the carriage number appears nowhere on the unit's own record.

A related trap: a unit is not a train. It works all day. When we checked one Class 756, it was allocated to fifteen separate services on a single date, and units routinely manage nine to sixteen. Showing one dot for a unit without saying which working it is on would imply the dot was the unit's whole day.

The 24-coach train that was six

This is the worst mistake we have made with this data, and it is worth describing because nothing about it looked broken.

The feed republishes an allocation once per leg of a diagram, and the same units appear in every repeat. Summing them naively published a TransPennine service as “24 coaches, Class 185” — eight allocations alternating two three-car units, when the train was two units and six coaches.

Measured across our archive, 5,060 of 15,287 services (33%) carried a repeated unit, and the worst case repeated eleven times. What makes it dangerous is that both answers are believable to anyone not counting carriages on a platform. There is no error, no gap and no warning — just a number that is four times too big.

The fix is to count each unit once. It has to be applied when the data is read back from storage as well as when it arrives, and our first attempt missed that: the stored copy was reloaded, written back out, and the bad figures laundered themselves back into the archive.

A “cab” flag that does not mean a cab

Each vehicle carries a field that appears to say whether it has a driving cab. It does not, and the example that proved it was one we had been testing against for months: a Class 755/4 flags a cab on all five of its vehicles, including the seatless power pack in the middle. The real answer is two.

Across 382 distinct units, the number of flagged vehicles per unit came out as: two on 333 units, three on 24, one on 11, five on 6, ten on 5, six on 2, four on 1. The over-flagging clusters in particular fleets — 755, 756, 745, 331, 380, 231, 385.

Read a vehicle at a time, that field would draw five driving cabs on a five-car train. So we only describe a formation's ends where the flags are self-consistent — one flagged vehicle, or exactly two at the front and back. That labels 336 of 382 units and refuses 46, and the refusal is the feature. A unit with a single flag is not quietly repaired by assuming the other end, because a missing flag and a genuinely single-cab vehicle are the same observation.

The letters nobody can decode

Vehicles carry a set of “special characteristics” letters — GWY, DW, GQ9. They are present on 43.8% of vehicles across 40 distinct values, and they are the only accessibility-shaped field in the whole feed. It is tempting to read them.

We measured instead, and both obvious readings failed. W looks like the wheelchair vehicle until you find it spanning 13 to 76 seats. G looks like the vehicle with the toilet until you find it on 9% of non-cab vehicles and on every vehicle of 63 units. 9 turns out to be a unit-level property — present on every vehicle of all seventeen units that carry it — so drawing it per carriage would imply a distinction that does not exist.

So we publish the raw letters and no interpretation. A wheelchair symbol in the wrong place is the kind of wrong a passenger acts on, and being unhelpful is much better than being confidently misleading. Sixteen classes publish no letters at all, which is why an absent code can never be rendered as “not fitted”.

What it does not cover

Coverage is structurally incomplete rather than merely patchy. London Overground and Caledonian Sleeper are excluded; Tyne and Wear Metro and Sheffield Supertram do not use the system at all. “No allocation recorded” and “this operator is not in the feed” are different statements, and we try never to collapse them into one.

Some fields are soft even inside a good message. Livery, operator and seat counts are approximate. Orientation — which way round a unit is coupled — is published and we store it, but it is unreliable for most operators, so we show it nowhere. About 45% of livery values and 92% of decor values are a placeholder meaning “unset”, which would read as a real answer if we passed it through, so it becomes an absence instead.

Seat totals are summed only when every vehicle declares one. The carriage carrying the pantograph routinely declares none, so partial trains are normal — and a partial sum reads like a capacity figure while being quietly short by a whole coach.

Where to see it

A service page shows the full formation carriage by carriage, including for past dates the archive still holds. The vehicle lookup goes the other way: give it a unit or carriage number and it finds what that vehicle is working now, what else it worked today, and which days we hold an allocation for it. Station boards and journey legs show a shorter summary — how long the train is and what class, where the whole train is one class.

If you want the wider picture of what each feed can and cannot tell you, the data page lists every source we use, and the methodology explains how the archive figures are put together.