Duplicate arrivals at Canary Wharf DLR

It looks like the trains at Canary Wharf are duplicated, although the platforms are different. This is visible here:

The raw data is similar. Here’s a fragment for a train (or 2) going to Bank simultaneously.

{
    "$type": "Tfl.Api.Presentation.Entities.Prediction, Tfl.Api.Presentation.Entities",
    "id": "-937089209",
    "operationType": 1,
    "vehicleId": "",
    "naptanId": "940GZZDLCAN",
    "stationName": "Canary Wharf DLR Station",
    "lineId": "dlr",
    "lineName": "DLR",
    "platformName": "Platform 5",
    "direction": "inbound",
    "bearing": "",
    "destinationNaptanId": "940GZZDLBNK",
    "destinationName": "Bank DLR Station",
    "timestamp": "2020-08-29T12:30:23.4606832Z",
    "timeToStation": 880,
    "currentLocation": "",
    "towards": "",
    "expectedArrival": "2020-08-29T12:45:03Z",
    "timeToLive": "2020-08-29T12:45:03Z",
    "modeName": "dlr",
    "timing": {
        "$type": "Tfl.Api.Presentation.Entities.PredictionTiming, Tfl.Api.Presentation.Entities",
        "countdownServerAdjustment": "00:00:00",
        "source": "0001-01-01T00:00:00",
        "insert": "0001-01-01T00:00:00",
        "read": "2020-08-29T12:31:03.952Z",
        "sent": "2020-08-29T12:30:23Z",
        "received": "0001-01-01T00:00:00"
    }
},
{
    "$type": "Tfl.Api.Presentation.Entities.Prediction, Tfl.Api.Presentation.Entities",
    "id": "-937089209",
    "operationType": 1,
    "vehicleId": "",
    "naptanId": "940GZZDLCAN",
    "stationName": "Canary Wharf DLR Station",
    "lineId": "dlr",
    "lineName": "DLR",
    "platformName": "Platform 6",
    "direction": "inbound",
    "bearing": "",
    "destinationNaptanId": "940GZZDLBNK",
    "destinationName": "Bank DLR Station",
    "timestamp": "2020-08-29T12:30:23.4606832Z",
    "timeToStation": 880,
    "currentLocation": "",
    "towards": "",
    "expectedArrival": "2020-08-29T12:45:03Z",
    "timeToLive": "2020-08-29T12:45:03Z",
    "modeName": "dlr",
    "timing": {
        "$type": "Tfl.Api.Presentation.Entities.PredictionTiming, Tfl.Api.Presentation.Entities",
        "countdownServerAdjustment": "00:00:00",
        "source": "0001-01-01T00:00:00",
        "insert": "0001-01-01T00:00:00",
        "read": "2020-08-29T12:31:03.952Z",
        "sent": "2020-08-29T12:30:23Z",
        "received": "0001-01-01T00:00:00"
    }
},

Is this an error in the data?

Rob

@dev_rob

At Canary Wharf DLR, all the platforms are double-headed, or The Spanish Solution Spanish solution - Wikipedia

This means that trains arrive/depart from platforms 1 and 2 at the same time, ditto 3 and 4 and also 5 and 6. This is great because you can change trains in the same direction without having to use the stairs.

Thanks, this is new to me. In the API data I can’t see a way to distinuish the boarding platform from the departure platform. My use case is just to just get the next train, so to avoid what looks like duplicate trains (even thought they’re not) I’ll need to deduplicate or filter out the arrival platforms.

Most of the time the ‘expectedArrival’ matches for each of platforms, although occasionally there’s a difference of a minute. I guess this is because the train arrives, waits a minute, then departs. So that suggests using expectedArrival isn’t a good way to dedupe.

(Ideally the API would deal with this :slight_smile: )

@dev_rob

Of course, you can walk where you like at 940GZZDLCAN. You can even wait for a train to be in the station so you can cross from one platform to the other (see also Platforms 3 & 3A at Statford)

I find the best way to deal with the DLR is to simply absorb the whole system using https://api.tfl.gov.uk/line/dlr/arrivals

There is only one ID per train so you can work it out from that. As I recall.

There are ids in the feed here https://api.tfl.gov.uk/StopPoint/940GZZDLCAN/Arrivals?mode=dlr
but they’re all the same. It would be useful if they’re different per train.

1 Like