[TxC] National Rail in latest TxC

Hey, the last TxC update (25/06) includes National Rail data. Is this a new thing or is that an error? I’m not quite sure what is covers: LO, Lizzie line & maybe some additional NR?

Screenshot 2024-07-02 at 12.45.48

What they didn’t include was the Replacement Buses zip file, which makes me think it was an error.

Apologies @ndjik - this was an error. We don’t produce TxC for the NR modes as this data is available from network rail open data sources.

There is a new version of journey-planner-timetables.zip available now with replacement buses included @mjcarchive .

Many thanks,
James

2 Likes

no problem, thank you for the update and the quick fix @jamesevans :slight_smile:

@jjamesevans @ndjik
I wouldn’t use it but would any users benefit from having the file provided in error as a seventh zip file? The data being available elsewhere doesn’t seem like a killer reason for not doing it.

I am assuming here (probably wrongly) that the resource cost would be minimal. I can see there might be an issue that the seventh file could get out of sync with the definitive source, not least because update cycles could vary. I note that we already have the second issue for TfL’s own data as it (or something very similar) is also provided to Traveline, whose own update cycle may differ.

It may well not be worth doing but no harm in asking the question!

Hi @mjcarchive - the issue is not with effort, it’s related to the fact that it’s not TfL data as such. We derive this ultimately from Network Rail data.

This is only usually used for internal purposes only.

Many thanks,
James

@jamesevans
Thanks. It is probably not worth the candle to more than an inch further on this but if it has been derived entirely from NR open data there wouldn’t actually be a problem in anyone, TfL or otherwise, presenting it in a different format. There may be little point in doing so but the point of principle interests me.

@mjcarchive Thanks for your query. The National Rail elements of this are really to power our own products. We produce our TxC only on a weekly basis, whereas the National Rail timetable data are released daily. We also cannot be certain that the data is completely accurate, as it is derived from Network Rail with no administration from TfL.

@SarahLS - Thanks, that’s pretty clear cut then.

1 Like

This data is here!!!

Free. Ask for the “Staff Version”, it public and includes seconds.

Just to note that the static timetable data (known as SCHEDULE) is available in ATOC-CIF and JSON formats from Network Rail’s open data platform:

Further information is available from the Open Rail Data Wiki.

1 Like

@LeonByford

is that Cobol or dBase 2 format :slight_smile:

Using the Sunday 05:52 Elizabeth line service from Gidea Park to London Liverpool Street as an example…

ATOC-CIF is a fixed-column format where the first two characters indicate the record type, which determines the columns (and their lengths) for the remainder of each line. So you have Basic Schedule (BS), Basic Schedule Extra Details (BX), Origin Location (LO) and Intermediate Location (LI) records:

BSNC830732406022412080000001 POO2C11    121381001 EMU345 090D     S            P
BX         XRY                                                                  
LOGIDEAPK 0552 05523  EL     TB                                                 
LIROMFORD 0554 0555      055405554        T                                     
LICHDWLHT 0558 0558H     055805583        T                                     
LIGODMAYS 0600 0600H     060006003        T                                     
LISVNKNGS 0602 0602H     060206023        T                                     
LIILFORD  0605H0606      060606063  EL EL T                                     
LIMANRPK  0608 0608H     06080608   EL EL T                                     
LIFRSTGTJ           0609H00000000   EL EL                                       
LIFRSTGT  0610H0611      061106111  EL    T                                     
LIMRYLAND 0612H0613      061306131        T                                     
LISTFD    0615 0616      061506165  EL EL T                                     
LIBOWJ              0617H00000000   EL EL                                       
LIBTHNLGR           0619H00000000   EL EL                                       
LTLIVST   0623 062417    TF                                                     

On the other hand, the JSON version is, well, JSON. It’s probably easier to understand just looking at it, and it’s easier to parse, but the verbosity results in large file sizes, and it’s not as efficient to use:

{
    "JsonScheduleV1": {
        "CIF_bank_holiday_running": null,
        "CIF_stp_indicator": "P",
        "CIF_train_uid": "C83073",
        "applicable_timetable": "Y",
        "atoc_code": "XR",
        "new_schedule_segment": {
            "traction_class": "",
            "uic_code": ""
        },
        "schedule_days_runs": "0000001",
        "schedule_end_date": "2024-12-08",
        "schedule_segment": {
            "signalling_id": "2C11",
            "CIF_train_category": "OO",
            "CIF_headcode": "",
            "CIF_course_indicator": 1,
            "CIF_train_service_code": "21381001",
            "CIF_business_sector": "??",
            "CIF_power_type": "EMU",
            "CIF_timing_load": "345",
            "CIF_speed": "090",
            "CIF_operating_characteristics": "D",
            "CIF_train_class": "S",
            "CIF_sleepers": null,
            "CIF_reservations": null,
            "CIF_connection_indicator": null,
            "CIF_catering_code": null,
            "CIF_service_branding": "",
            "schedule_location": [
                {
                    "location_type": "LO",
                    "record_identity": "LO",
                    "tiploc_code": "GIDEAPK",
                    "tiploc_instance": null,
                    "departure": "0552",
                    "public_departure": "0552",
                    "platform": "3",
                    "line": "EL",
                    "engineering_allowance": null,
                    "pathing_allowance": null,
                    "performance_allowance": null
                },
                {
                    "location_type": "LI",
                    "record_identity": "LI",
                    "tiploc_code": "ROMFORD",
                    "tiploc_instance": null,
                    "departure": "0555",
                    "public_departure": "0555",
                    "platform": "4",
                    "line": null,
                    "engineering_allowance": null,
                    "pathing_allowance": null,
                    "performance_allowance": null,
                    "arrival": "0554",
                    "public_arrival": "0554",
                    "pass": null,
                    "path": null
                },
                {
                    "location_type": "LI",
                    "record_identity": "LI",
                    "tiploc_code": "CHDWLHT",
                    "tiploc_instance": null,
                    "departure": "0558H",
                    "public_departure": "0558",
                    "platform": "3",
                    "line": null,
                    "engineering_allowance": null,
                    "pathing_allowance": null,
                    "performance_allowance": null,
                    "arrival": "0558",
                    "public_arrival": "0558",
                    "pass": null,
                    "path": null
                },
                {
                    "location_type": "LI",
                    "record_identity": "LI",
                    "tiploc_code": "GODMAYS",
                    "tiploc_instance": null,
                    "departure": "0600H",
                    "public_departure": "0600",
                    "platform": "3",
                    "line": null,
                    "engineering_allowance": null,
                    "pathing_allowance": null,
                    "performance_allowance": null,
                    "arrival": "0600",
                    "public_arrival": "0600",
                    "pass": null,
                    "path": null
                },
                {
                    "location_type": "LI",
                    "record_identity": "LI",
                    "tiploc_code": "SVNKNGS",
                    "tiploc_instance": null,
                    "departure": "0602H",
                    "public_departure": "0602",
                    "platform": "3",
                    "line": null,
                    "engineering_allowance": null,
                    "pathing_allowance": null,
                    "performance_allowance": null,
                    "arrival": "0602",
                    "public_arrival": "0602",
                    "pass": null,
                    "path": null
                },
                {
                    "location_type": "LI",
                    "record_identity": "LI",
                    "tiploc_code": "ILFORD",
                    "tiploc_instance": null,
                    "departure": "0606",
                    "public_departure": "0606",
                    "platform": "3",
                    "line": "EL",
                    "engineering_allowance": null,
                    "pathing_allowance": null,
                    "performance_allowance": null,
                    "arrival": "0605H",
                    "public_arrival": "0606",
                    "pass": null,
                    "path": "EL"
                },
                {
                    "location_type": "LI",
                    "record_identity": "LI",
                    "tiploc_code": "MANRPK",
                    "tiploc_instance": null,
                    "departure": "0608H",
                    "public_departure": "0608",
                    "platform": null,
                    "line": "EL",
                    "engineering_allowance": null,
                    "pathing_allowance": null,
                    "performance_allowance": null,
                    "arrival": "0608",
                    "public_arrival": "0608",
                    "pass": null,
                    "path": "EL"
                },
                {
                    "location_type": "LI",
                    "record_identity": "LI",
                    "tiploc_code": "FRSTGTJ",
                    "tiploc_instance": null,
                    "departure": null,
                    "public_departure": null,
                    "platform": null,
                    "line": "EL",
                    "engineering_allowance": null,
                    "pathing_allowance": null,
                    "performance_allowance": null,
                    "arrival": null,
                    "public_arrival": null,
                    "pass": "0609H",
                    "path": "EL"
                },
                {
                    "location_type": "LI",
                    "record_identity": "LI",
                    "tiploc_code": "FRSTGT",
                    "tiploc_instance": null,
                    "departure": "0611",
                    "public_departure": "0611",
                    "platform": "1",
                    "line": "EL",
                    "engineering_allowance": null,
                    "pathing_allowance": null,
                    "performance_allowance": null,
                    "arrival": "0610H",
                    "public_arrival": "0611",
                    "pass": null,
                    "path": null
                },
                {
                    "location_type": "LI",
                    "record_identity": "LI",
                    "tiploc_code": "MRYLAND",
                    "tiploc_instance": null,
                    "departure": "0613",
                    "public_departure": "0613",
                    "platform": "1",
                    "line": null,
                    "engineering_allowance": null,
                    "pathing_allowance": null,
                    "performance_allowance": null,
                    "arrival": "0612H",
                    "public_arrival": "0613",
                    "pass": null,
                    "path": null
                },
                {
                    "location_type": "LI",
                    "record_identity": "LI",
                    "tiploc_code": "STFD",
                    "tiploc_instance": null,
                    "departure": "0616",
                    "public_departure": "0616",
                    "platform": "5",
                    "line": "EL",
                    "engineering_allowance": null,
                    "pathing_allowance": null,
                    "performance_allowance": null,
                    "arrival": "0615",
                    "public_arrival": "0615",
                    "pass": null,
                    "path": "EL"
                },
                {
                    "location_type": "LI",
                    "record_identity": "LI",
                    "tiploc_code": "BOWJ",
                    "tiploc_instance": null,
                    "departure": null,
                    "public_departure": null,
                    "platform": null,
                    "line": "EL",
                    "engineering_allowance": null,
                    "pathing_allowance": null,
                    "performance_allowance": null,
                    "arrival": null,
                    "public_arrival": null,
                    "pass": "0617H",
                    "path": "EL"
                },
                {
                    "location_type": "LI",
                    "record_identity": "LI",
                    "tiploc_code": "BTHNLGR",
                    "tiploc_instance": null,
                    "departure": null,
                    "public_departure": null,
                    "platform": null,
                    "line": "EL",
                    "engineering_allowance": null,
                    "pathing_allowance": null,
                    "performance_allowance": null,
                    "arrival": null,
                    "public_arrival": null,
                    "pass": "0619H",
                    "path": "EL"
                },
                {
                    "location_type": "LT",
                    "record_identity": "LT",
                    "tiploc_code": "LIVST",
                    "tiploc_instance": null,
                    "platform": "17",
                    "arrival": "0623",
                    "public_arrival": "0624",
                    "path": null
                }
            ]
        },
        "schedule_start_date": "2024-06-02",
        "train_status": "P",
        "transaction_type": "Create"
    }
}