From be31e6cfe15405fcd455c73d19d706885f24d442 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Thu, 31 Oct 2024 23:25:41 +0000 Subject: [PATCH] Add validation steps --- output.txt | 2990 +++++++++++++++++++++++++++++++++++++++++++ src/main.py | 52 +- src/train_detail.py | 65 + src/validate.py | 36 + 4 files changed, 3139 insertions(+), 4 deletions(-) create mode 100644 output.txt create mode 100644 src/train_detail.py create mode 100644 src/validate.py diff --git a/output.txt b/output.txt new file mode 100644 index 0000000..afdcc99 --- /dev/null +++ b/output.txt @@ -0,0 +1,2990 @@ +[ + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2V52", + "diagram_time1": "04.50", + "diagram_time2": null, + "diagram_pis_code": "6509", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G43904", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0450", + "stops": [ + "FTN", + "CSA", + "PTC", + "FRM", + "SOU", + "ROM", + "SAL", + "WMN", + "DMH", + "WSB", + "TRO", + "BOA", + "AVF", + "FFD", + "BTH", + "OLF", + "KYN", + "BRI" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2T59", + "diagram_time1": "10.43", + "diagram_time2": null, + "diagram_pis_code": "6497", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44091", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1026", + "stops": [ + "FRO", + "WSB", + "TRO", + "BOA", + "AVF", + "FFD", + "BTH", + "OLF", + "KYN", + "BRI" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2O07", + "diagram_time1": "10.00", + "diagram_time2": null, + "diagram_pis_code": "6495", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44130", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "f" + ], + "trainStartTime": "0945", + "stops": [ + "BRI", + "KYN", + "OLF", + "BTH", + "FFD", + "AVF", + "BOA", + "TRO", + "WSB", + "WMN", + "SAL" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2V96", + "diagram_time1": "19.46", + "diagram_time2": null, + "diagram_pis_code": "5911", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44108", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1913", + "stops": [ + "SAL", + "WMN", + "DMH", + "WSB", + "TRO", + "BOA", + "AVF", + "FFD", + "BTH", + "OLF", + "KYN", + "BRI" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2M13", + "diagram_time1": "07.02", + "diagram_time2": null, + "diagram_pis_code": "6508", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G43798", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0745", + "stops": [ + "WSB", + "TRO", + "MKM", + "CPM", + "SWI" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2T71", + "diagram_time1": "09.45", + "diagram_time2": null, + "diagram_pis_code": "5307", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G43928", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0945", + "stops": [ + "FAL", + "FMT", + "PNM", + "PYN", + "TRU" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2P01", + "diagram_time1": "06.19", + "diagram_time2": null, + "diagram_pis_code": "6270", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44033", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0619", + "stops": [ + "PAR", + "LOS", + "BOD", + "LSK", + "MEN", + "SGM", + "STS", + "SBF", + "KEY", + "DOC", + "DPT", + "PLY" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2G75", + "diagram_time1": "08.24", + "diagram_time2": null, + "diagram_pis_code": "5281", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45260", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0824", + "stops": [ + "PLY", + "DPT", + "DOC", + "KEY", + "SBV", + "BFE", + "BAS", + "CSK", + "GSL" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2G78", + "diagram_time1": "11.19", + "diagram_time2": null, + "diagram_pis_code": "5310", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45221", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1119", + "stops": [ + "GSL", + "CSK", + "BAS", + "BFE", + "SBV", + "KEY", + "DOC", + "DPT", + "PLY" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2L71", + "diagram_time1": "07.13", + "diagram_time2": null, + "diagram_pis_code": "5274", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45016", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0713", + "stops": [ + "LSK", + "SKN", + "CAU", + "SDP", + "LOO" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2L76", + "diagram_time1": "10.08", + "diagram_time2": null, + "diagram_pis_code": "5314", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45327", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1008", + "stops": [ + "LOO", + "LSK" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2C33", + "diagram_time1": "17.00", + "diagram_time2": null, + "diagram_pis_code": "5283", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44133", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1700", + "stops": [ + "PLY", + "DPT", + "DOC", + "KEY", + "SBF", + "STS", + "SGM", + "MEN", + "LSK" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2C36", + "diagram_time1": "18.30", + "diagram_time2": null, + "diagram_pis_code": "5286", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45062", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1830", + "stops": [ + "PLY", + "DPT", + "DOC", + "KEY", + "SBF", + "STS", + "SGM", + "MEN", + "LSK", + "BOD", + "LOS", + "PAR", + "SAU", + "TRU", + "RED", + "CBN", + "HYL", + "SER", + "PNZ" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2A19", + "diagram_time1": "12.18", + "diagram_time2": "12.14", + "diagram_pis_code": "5346", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45280", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1218", + "stops": [ + "SER", + "LEL", + "CBB", + "SIV" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2A20", + "diagram_time1": "12.33", + "diagram_time2": null, + "diagram_pis_code": "5675", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44334", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1233", + "stops": [ + "SIV", + "CBB", + "SER" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2A21", + "diagram_time1": "12.48", + "diagram_time2": null, + "diagram_pis_code": "5674", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45308", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1248", + "stops": [ + "SER", + "CBB", + "SIV" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2A22", + "diagram_time1": "13.03", + "diagram_time2": null, + "diagram_pis_code": "5300", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44319", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1303", + "stops": [ + "SIV", + "CBB", + "LEL", + "SER" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2P90", + "diagram_time1": "19.41", + "diagram_time2": null, + "diagram_pis_code": "5728", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45320", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1941", + "stops": [ + "FAL", + "FMT", + "PNM", + "PYN", + "PRW", + "TRU", + "SAU", + "PAR" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2V54", + "diagram_time1": "06.38", + "diagram_time2": null, + "diagram_pis_code": "6496", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44113", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0638", + "stops": [ + "WEY", + "UPW", + "DCW", + "MDN", + "CNO", + "YET", + "THO", + "YVP", + "CLC", + "BRU", + "FRO", + "WSB", + "TRO", + "BOA", + "AVF", + "FFD", + "BTH", + "OLF", + "KYN", + "BRI", + "FIT", + "BPW", + "YAE", + "GCR" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2O76", + "diagram_time1": "12.51", + "diagram_time2": "12.48", + "diagram_pis_code": "5238", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G43857", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1110", + "stops": [ + "GCR", + "YAE", + "BPW", + "FIT", + "BRI", + "KYN", + "OLF", + "BTH", + "BOA", + "TRO", + "WSB", + "FRO", + "BRU", + "CLC", + "YVP", + "THO", + "YET", + "CNO", + "MDN", + "DCW", + "UPW", + "WEY" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2J08", + "diagram_time1": "10.06", + "diagram_time2": null, + "diagram_pis_code": "5237", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44460", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0702", + "stops": [ + "BSK", + "BMY", + "MOR", + "RGP", + "RDW", + "RDG" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2V94", + "diagram_time1": "17.28", + "diagram_time2": null, + "diagram_pis_code": "5254", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G43987", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1728", + "stops": [ + "WEY", + "UPW", + "DCW", + "MDN", + "CNO", + "YET", + "THO", + "YVP", + "CLC", + "BRU", + "FRO", + "WSB", + "TRO", + "BOA", + "AVF", + "FFD", + "BTH", + "OLF", + "KYN", + "BRI" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2V58", + "diagram_time1": "09.43", + "diagram_time2": "09.27", + "diagram_pis_code": "6504", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G43914", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0823", + "stops": [ + "SOU", + "ROM", + "SAL", + "WMN", + "DMH", + "WSB", + "TRO", + "BOA", + "AVF", + "FFD", + "BTH", + "OLF", + "KYN", + "BRI" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2O19", + "diagram_time1": "06.42", + "diagram_time2": null, + "diagram_pis_code": "5601", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G43828", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0511", + "stops": [ + "GCR", + "SHU", + "STD", + "KEM", + "SWI", + "CPM", + "MKM", + "TRO", + "WSB", + "DMH", + "WMN", + "SAL", + "ROM", + "SOU" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2J37", + "diagram_time1": "22.34", + "diagram_time2": null, + "diagram_pis_code": "6502", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45154", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1312", + "stops": [ + "RDG", + "RDW", + "RGP", + "MOR", + "BMY", + "BSK" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2C38", + "diagram_time1": "00.30", + "diagram_time2": null, + "diagram_pis_code": "5872", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45056", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "2345", + "stops": [ + "BRI", + "KYN", + "OLF", + "BTH", + "FFD", + "AVF", + "BOA", + "TRO", + "WSB", + "FRO" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "1F03", + "diagram_time1": "06.06", + "diagram_time2": null, + "diagram_pis_code": "5917", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44510", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0551", + "stops": [ + "BRI", + "KYN", + "OLF", + "BTH", + "FFD", + "AVF", + "BOA", + "TRO", + "WSB", + "WMN", + "SAL", + "ROM", + "SOU", + "FRM", + "CSA", + "FTN", + "PMS", + "PMH" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2O09", + "diagram_time1": "18.44", + "diagram_time2": "18.34", + "diagram_pis_code": "6499", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44115", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1750", + "stops": [ + "GCR", + "SHU", + "STD", + "KEM", + "SWI", + "CPM", + "MKM", + "TRO", + "WSB", + "DMH", + "WMN", + "SAL" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2Y03", + "diagram_time1": "07.19", + "diagram_time2": "07.15", + "diagram_pis_code": "6081", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45391", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0631", + "stops": [ + "SVB", + "SAR", + "AVN", + "PRI", + "SHH", + "SML", + "CFN", + "RDA", + "MTP", + "SRD", + "LWH", + "BRI", + "BMT", + "PSN", + "NLS", + "YAT", + "WOR", + "WNM", + "WSM" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2K14", + "diagram_time1": "08.10", + "diagram_time2": null, + "diagram_pis_code": "6167", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45237", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0810", + "stops": [ + "WSM", + "WNM", + "WOR", + "YAT", + "NLS", + "PSN", + "BMT", + "BRI", + "LWH", + "SRD", + "MTP", + "RDA", + "CFN", + "SML", + "SHH", + "PRI", + "AVN", + "SAR", + "SVB" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2K21", + "diagram_time1": "11.01", + "diagram_time2": null, + "diagram_pis_code": "6070", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45311", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1101", + "stops": [ + "SVB", + "SAR", + "AVN", + "PRI", + "SHH", + "SML", + "CFN", + "RDA", + "MTP", + "SRD", + "LWH", + "BRI" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2C08", + "diagram_time1": "08.11", + "diagram_time2": null, + "diagram_pis_code": "6226", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44102", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0811", + "stops": [ + "GCR", + "YAE", + "BPW", + "FIT", + "BRI", + "KYN", + "OLF", + "BTH", + "BOA", + "TRO", + "WSB", + "FRO" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2K28", + "diagram_time1": "12.11", + "diagram_time2": null, + "diagram_pis_code": "6083", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44261", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1211", + "stops": [ + "BRI", + "LWH", + "SRD", + "MTP", + "RDA", + "CFN", + "SML", + "SHH", + "PRI", + "AVN" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "1F10", + "diagram_time1": "10.57", + "diagram_time2": null, + "diagram_pis_code": "6490", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44529", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0823", + "stops": [ + "PMH", + "PMS", + "FTN", + "CSA", + "FRM", + "SOU", + "ROM", + "SAL", + "WMN", + "WSB", + "TRO", + "BOA", + "BTH", + "BRI", + "FIT", + "NWP", + "CDF" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "1F17", + "diagram_time1": "12.30", + "diagram_time2": null, + "diagram_pis_code": "6488", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44507", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1230", + "stops": [ + "CDF", + "NWP", + "FIT", + "BRI", + "BTH", + "BOA", + "TRO", + "WSB", + "WMN", + "SAL", + "ROM", + "SOU", + "FRM", + "CSA", + "FTN", + "PMS", + "PMH" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "1F04", + "diagram_time1": "07.56", + "diagram_time2": null, + "diagram_pis_code": "6545", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44530", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0642", + "stops": [ + "FRO", + "WSB", + "TRO", + "BOA", + "AVF", + "FFD", + "BTH", + "OLF", + "KYN", + "BRI", + "FIT", + "PWY", + "STJ", + "NWP", + "CDF" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "1F11", + "diagram_time1": "09.28", + "diagram_time2": null, + "diagram_pis_code": "6487", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44522", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0928", + "stops": [ + "CDF", + "NWP", + "STJ", + "FIT", + "BRI", + "BTH", + "BOA", + "TRO", + "WSB", + "DMH", + "WMN", + "SAL", + "ROM", + "SOU", + "FRM", + "CSA", + "FTN", + "PMS", + "PMH" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "1F06", + "diagram_time1": "08.58", + "diagram_time2": null, + "diagram_pis_code": "6489", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44515", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0601", + "stops": [ + "PMH", + "PMS", + "FTN", + "CSA", + "FRM", + "SOU", + "ROM", + "SAL", + "WMN", + "DMH", + "WSB", + "TRO", + "BOA", + "FFD", + "BTH", + "OLF", + "KYN", + "BRI", + "FIT", + "STJ", + "NWP", + "CDF" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2G54", + "diagram_time1": "09.13", + "diagram_time2": null, + "diagram_pis_code": "6225", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44477", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1915", + "stops": [ + "WEA", + "DRG", + "CBP", + "SGN", + "GFD" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2K38", + "diagram_time1": "14.10", + "diagram_time2": null, + "diagram_pis_code": "6068", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45281", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1410", + "stops": [ + "WSM", + "WNM", + "WOR", + "YAT", + "NLS", + "PSN", + "BMT", + "BRI", + "LWH", + "SRD", + "MTP", + "RDA", + "CFN", + "SML", + "SHH", + "PRI", + "AVN" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2D80", + "diagram_time1": "21.10", + "diagram_time2": null, + "diagram_pis_code": "5092", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44221", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "2110", + "stops": [ + "WSM", + "WNM", + "WOR", + "YAT", + "NLS", + "PSN", + "BMT", + "BRI", + "FIT", + "BPW" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2K62", + "diagram_time1": "21.13", + "diagram_time2": null, + "diagram_pis_code": "6085", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G43993", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "2113", + "stops": [ + "AVN", + "SAR", + "SVB" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2K64", + "diagram_time1": "20.10", + "diagram_time2": null, + "diagram_pis_code": "6084", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44056", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "2010", + "stops": [ + "WSM", + "WNM", + "WOR", + "YAT", + "NLS", + "PSN", + "BMT", + "BRI", + "LWH", + "SRD", + "MTP", + "RDA", + "CFN" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2O70", + "diagram_time1": "06.02", + "diagram_time2": null, + "diagram_pis_code": "5641", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G43843", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0650", + "stops": [ + "WSB", + "FRO", + "BRU", + "CLC", + "YVP", + "THO", + "YET", + "CNO", + "MDN", + "DCW", + "UPW", + "WEY" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2M02", + "diagram_time1": "05.10", + "diagram_time2": null, + "diagram_pis_code": "5075", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44197", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0510", + "stops": [ + "TAU", + "BWT", + "HIG", + "WSM", + "WNM", + "WOR", + "YAT", + "NLS", + "PSN", + "BMT", + "BRI" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2B72", + "diagram_time1": "07.07", + "diagram_time2": null, + "diagram_pis_code": "5719", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44420", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0707", + "stops": [ + "EXD", + "CDI", + "YEO", + "COP", + "MRD", + "LAP", + "EGG", + "KGN", + "PMA", + "UMB", + "CPN", + "BNP" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2T13", + "diagram_time1": "10.30", + "diagram_time2": "10.25", + "diagram_pis_code": "6182", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G43923", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0957", + "stops": [ + "EXM", + "LYM", + "TOP", + "NCO", + "DIG", + "EXC", + "EXD", + "EXT", + "MBT", + "SCS", + "DWW", + "DWL", + "TGM", + "NTA", + "TRR", + "TQY", + "PGN" + ] + }, + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44071", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1129", + "stops": [ + "NBY", + "KIT", + "HGD", + "BDW" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2B70", + "diagram_time1": "05.22", + "diagram_time2": null, + "diagram_pis_code": "5718", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44404", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0522", + "stops": [ + "EXD", + "CDI", + "EGG", + "UMB", + "BNP" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2T11", + "diagram_time1": "08.54", + "diagram_time2": null, + "diagram_pis_code": "6189", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G43901", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0854", + "stops": [ + "EXM", + "LYM", + "LYC", + "EXN", + "TOP", + "NCO", + "DIG", + "POL", + "SJP", + "EXC", + "EXD", + "EXT", + "MBT", + "SCS", + "DWW", + "DWL", + "TGM", + "NTA", + "TRR", + "TQY", + "PGN" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2T18", + "diagram_time1": "12.23", + "diagram_time2": null, + "diagram_pis_code": "5380", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45198", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1223", + "stops": [ + "EXM", + "LYM", + "LYC", + "EXN", + "TOP", + "NCO", + "DIG", + "POL", + "SJP", + "EXC", + "EXD", + "DWL", + "TGM", + "NTA", + "TRR", + "TQY", + "PGN" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2F03", + "diagram_time1": "05.44", + "diagram_time2": null, + "diagram_pis_code": "5417", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45049", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0544", + "stops": [ + "EXD", + "EXC", + "DIG", + "NCO", + "TOP", + "LYM", + "EXM" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2K04", + "diagram_time1": "09.35", + "diagram_time2": null, + "diagram_pis_code": "6050", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44066", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0935", + "stops": [ + "EXC", + "EXD", + "CDI", + "OKE" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2K05", + "diagram_time1": "10.37", + "diagram_time2": "10.34", + "diagram_pis_code": "6051", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44166", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1032", + "stops": [ + "EXC", + "EXD", + "NTC", + "CDI", + "OKE" + ] + }, + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45231", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0701", + "stops": [ + "SVB", + "SAR", + "AVN", + "PRI", + "SHH", + "SML", + "CFN", + "RDA", + "MTP", + "SRD", + "LWH", + "BRI" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2T29", + "diagram_time1": "17.56", + "diagram_time2": null, + "diagram_pis_code": "6089", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G43924", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1756", + "stops": [ + "EXM", + "LYM", + "LYC", + "EXN", + "TOP", + "NCO", + "DIG", + "POL", + "SJP", + "EXC", + "EXD", + "EXT", + "SCS", + "DWW", + "DWL", + "TGM", + "NTA", + "TRR", + "TQY", + "PGN" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2B84", + "diagram_time1": "19.22", + "diagram_time2": "19.19", + "diagram_pis_code": "5351", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G16617", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1652", + "stops": [ + "BNE", + "COO", + "FZP", + "MAI" + ] + }, + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45005", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1917", + "stops": [ + "EXC", + "EXD", + "NTC", + "CDI", + "YEO", + "COP", + "MRD", + "EGG", + "UMB", + "BNP" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2L92", + "diagram_time1": "16.31", + "diagram_time2": null, + "diagram_pis_code": "6152", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44046", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1631", + "stops": [ + "BNP", + "UMB", + "KGN", + "EGG", + "MRD", + "COP", + "YEO", + "CDI", + "EXD", + "EXC", + "PIN", + "CBK", + "FNT", + "HON", + "AXM" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2T31", + "diagram_time1": "19.30", + "diagram_time2": "19.26", + "diagram_pis_code": "6293", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44111", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1856", + "stops": [ + "EXM", + "LYM", + "TOP", + "NCO", + "DIG", + "EXC", + "EXD", + "EXT", + "MBT", + "SCS", + "DWL", + "TGM", + "NTA", + "TRR", + "TQY", + "PGN" + ] + }, + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44127", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "2049", + "stops": [ + "NBY", + "KIT", + "HGD", + "BDW" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2T34", + "diagram_time1": "19.42", + "diagram_time2": null, + "diagram_pis_code": "6285", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45194", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1942", + "stops": [ + "BNP", + "UMB", + "EGG", + "MRD", + "COP", + "YEO", + "CDI", + "NTC", + "EXD", + "EXT", + "MBT", + "SCS", + "DWW", + "DWL", + "TGM", + "NTA", + "TRR", + "TQY", + "PGN" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "1D91", + "diagram_time1": "19.30", + "diagram_time2": null, + "diagram_pis_code": "6486", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44690", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-12T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th" + ], + "trainStartTime": "1930", + "stops": [ + "CDF", + "NWP", + "FIT", + "BRI", + "BTH", + "BOA", + "TRO", + "WSB", + "WMN", + "SAL", + "ROM", + "SOU", + "SOA", + "ESL", + "HDE", + "BOE", + "FRM", + "FTN", + "PMS", + "PMH" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2E30", + "diagram_time1": "21.00", + "diagram_time2": null, + "diagram_pis_code": "6271", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44173", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "2100", + "stops": [ + "PNZ", + "SER", + "HYL", + "CBN", + "RED", + "TRU", + "SAU", + "PAR", + "LOS", + "BOD", + "LSK", + "MEN", + "SGM", + "STS", + "PLY", + "IVY", + "TOT", + "NTA", + "EXD" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2C66", + "diagram_time1": "23.48", + "diagram_time2": null, + "diagram_pis_code": "6310", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45476", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-12T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th" + ], + "trainStartTime": "2348", + "stops": [ + "BRI", + "NLS", + "YAT", + "WOR", + "WSM", + "HIG", + "BWT", + "TAU", + "TVP", + "EXD" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2T05", + "diagram_time1": "05.51", + "diagram_time2": null, + "diagram_pis_code": "6243", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G43850", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0551", + "stops": [ + "EXM", + "LYM", + "TOP", + "NCO", + "DIG", + "POL", + "EXC", + "EXD", + "EXT", + "MBT", + "SCS", + "DWW", + "DWL", + "TGM", + "NTA", + "TRR", + "TQY", + "PGN" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2T16", + "diagram_time1": "11.23", + "diagram_time2": null, + "diagram_pis_code": "5379", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45187", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1123", + "stops": [ + "EXM", + "LYM", + "LYC", + "EXN", + "TOP", + "NCO", + "DIG", + "POL", + "SJP", + "EXC", + "EXD", + "DWW", + "DWL", + "TGM", + "NTA", + "TRR", + "TQY", + "PGN" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2T04", + "diagram_time1": "05.58", + "diagram_time2": null, + "diagram_pis_code": "6205", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G43918", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0558", + "stops": [ + "EXD", + "EXT", + "MBT", + "SCS", + "DWW", + "DWL", + "TGM", + "NTA", + "TRR", + "TQY", + "PGN" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2K01", + "diagram_time1": "06.31", + "diagram_time2": null, + "diagram_pis_code": "6052", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44146", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0631", + "stops": [ + "EXD", + "CDI", + "OKE" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2T08", + "diagram_time1": "07.24", + "diagram_time2": null, + "diagram_pis_code": "5381", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44425", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "0724", + "stops": [ + "EXM", + "LYM", + "LYC", + "EXN", + "TOP", + "NCO", + "DIG", + "POL", + "SJP", + "EXC", + "EXD", + "EXT", + "SCS", + "DWW", + "DWL", + "TGM", + "NTA", + "TRR", + "TQY", + "PGN" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2F32", + "diagram_time1": "19.15", + "diagram_time2": null, + "diagram_pis_code": "6292", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45114", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-12T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th" + ], + "trainStartTime": "1915", + "stops": [ + "PGN", + "TQY", + "TRR", + "NTA", + "TGM", + "DWL", + "DWW", + "MBT", + "EXD", + "EXC", + "SJP", + "POL", + "DIG", + "NCO", + "TOP", + "EXN", + "LYC", + "LYM", + "EXM" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2E62", + "diagram_time1": "18.30", + "diagram_time2": null, + "diagram_pis_code": "6048", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44124", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1830", + "stops": [ + "OKE", + "CDI", + "EXD" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2B82", + "diagram_time1": "17.19", + "diagram_time2": "17.17", + "diagram_pis_code": "5352", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G16615", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1652", + "stops": [ + "BNE", + "MLW" + ] + }, + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44413", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1715", + "stops": [ + "EXC", + "EXD", + "NTC", + "CDI", + "YEO", + "COP", + "MRD", + "LAP", + "EGG", + "KGN", + "PMA", + "UMB", + "CPN", + "BNP" + ] + } + ] + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2T33", + "diagram_time1": "19.56", + "diagram_time2": null, + "diagram_pis_code": "6158", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44114", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "1956", + "stops": [ + "EXM", + "LYM", + "TOP", + "NCO", + "DIG", + "POL", + "SJP", + "EXC", + "EXD", + "EXT", + "MBT", + "SCS", + "DWW", + "DWL", + "TGM", + "NTA", + "TRR", + "TQY", + "PGN" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2B86", + "diagram_time1": "20.54", + "diagram_time2": null, + "diagram_pis_code": "6369", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44998", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "2054", + "stops": [ + "EXM", + "LYM", + "LYC", + "EXN", + "TOP", + "NCO", + "DIG", + "POL", + "SJP", + "EXC", + "EXD", + "NTC", + "CDI", + "YEO", + "COP", + "MRD", + "LAP", + "EGG", + "KGN", + "UMB", + "BNP" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2C97", + "diagram_time1": "23.05", + "diagram_time2": "22.54", + "diagram_pis_code": "5488", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45072", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "2305", + "stops": [ + "BRI", + "BMT", + "PSN", + "NLS", + "YAT", + "WOR", + "WNM", + "WSM", + "HIG", + "BWT", + "TAU", + "TVP", + "EXD" + ] + } + ], + "verification": "AUTO: Diagram/Schedule Time Match" + }, + { + "diagram_date": "2024-09-09 00:00:00", + "train_headcode": "2B85", + "diagram_time1": "20.23", + "diagram_time2": "20.21", + "diagram_pis_code": "6091", + "timetable_entries": [ + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G44439", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "2019", + "stops": [ + "EXC", + "EXD", + "CDI", + "YEO", + "COP", + "MRD", + "EGG", + "UMB", + "BNP" + ] + }, + { + "stpIndicator": "P", + "operator": "GW", + "trainUid": "G45088", + "scheduleStart": "2024-06-02T23:00:00.000Z", + "scheduleEnd": "2024-12-13T23:59:59.000Z", + "daysRun": [ + "m", + "t", + "w", + "th", + "f" + ], + "trainStartTime": "2036", + "stops": [ + "MAI", + "FZP", + "COO", + "BNE", + "MLW" + ] + } + ] + } +] \ No newline at end of file diff --git a/src/main.py b/src/main.py index 3d414b6..34f6dc2 100644 --- a/src/main.py +++ b/src/main.py @@ -3,7 +3,10 @@ import sys import glob import datetime import json + import parse_pdf +import train_detail +import validate # List all PDF files in the given directory def list_pdf_files(directory): @@ -72,11 +75,52 @@ def main(): for pdf_file in pdf_files: schedule_cards.append(get_schedule_card_data(pdf_file)) - # print(schedule_cards) - out = open("output.txt", "w") - out.write(json.dumps(schedule_cards, indent=4, default=str)) - out.close() + # Iterate over schedule cards and fetch train data + trains = [] + existing_codes = [] + for schedule_card in schedule_cards: + date = schedule_card['schedule_date'] + for schedule in schedule_card['schedule_data']: + + ## Skip over schedules which have no PIS Code + if schedule['pis_code'] is None: + continue + + ## Check if PIS code already processed, if so skip it. Else add it to 'existing_codes' + if schedule['pis_code'] in existing_codes: + continue + existing_codes.append(schedule['pis_code']) + + full_schedule = train_detail.find_gw_trains_by_headcode(schedule['headcode'], date) + train = { + 'schedule_date': date, + 'schedule_headcode': schedule['headcode'], + 'schedule_location': schedule['location'], + 'schedule_time1': schedule['time0'], + 'schedule_time2': schedule['time1'], + 'schedule_pis_code': schedule['pis_code'], + 'timetable_entry': full_schedule, + } + + ## Filter out values missing schedule details or with matching PIS Codes + if not full_schedule: + continue # Skip if timetable entry was not found + + if len(train['timetable_entry']) == 1 and train['schedule_pis_code'] == train['timetable_entry'][0].get('pis', {}).get('code'): + continue # Skip if only one possible timetable entry exists, and PIS code matches OwlBoards suggestion + + trains.append(train) + + organised_for_processing = train_detail.organise_trains(trains) + + auto_matched = validate.filter_timetable_entries(organised_for_processing) + + + # print(trains) + out = open("output.txt", "w") + out.write(json.dumps(auto_matched, indent=4, default=str)) + out.close() if __name__ == "__main__": main() \ No newline at end of file diff --git a/src/train_detail.py b/src/train_detail.py new file mode 100644 index 0000000..50ecb77 --- /dev/null +++ b/src/train_detail.py @@ -0,0 +1,65 @@ +from pyOwlBoard import client + +ob_client = client.OwlBoardClient('https://owlboard.info', 'x') + +def find_gw_trains_by_headcode(headcode, date): + train_list = ob_client.get_trains_by_headcode(headcode, date) + + # Filter for 'gw & hx' services only + for train in train_list[:]: + if train['operator'] not in ('GW', 'HX'): + train_list.remove(train) + + # Get details for any services remaining in list + train_detail_list = [] + for train in train_list: + train_detail = ob_client.get_trains_by_trainUid(train['trainUid'], date) + train_detail_list.append(train_detail) + + return train_detail_list + +# Organize list of trains removing unimportant information +def organise_trains(trains): + organised_trains = [] + for train in trains: + organised_train = { + 'diagram_date': train['schedule_date'], + 'train_headcode': train['schedule_headcode'], + 'diagram_time1': train['schedule_time1'], + 'diagram_time2': train['schedule_time2'], + 'diagram_pis_code': train['schedule_pis_code'], + 'timetable_entries': rationalise_timetable_entry(train['timetable_entry']), + } + + organised_trains.append(organised_train) + return organised_trains + +# Convert timetable entry into a list of CRS Codes for PIS identification +def rationalise_timetable_entry(timetable_entries): + rationalised_entries = [] + for timetable_entry in timetable_entries: + entry = { + 'stpIndicator': timetable_entry['stpIndicator'], + 'operator': timetable_entry['operator'], + 'trainUid': timetable_entry['trainUid'], + 'scheduleStart': timetable_entry['scheduleStart'], + 'scheduleEnd': timetable_entry['scheduleEnd'], + 'daysRun': timetable_entry['daysRun'], + 'trainStartTime': timetable_entry['stops'][0].get('wttDeparture') or timetable_entry['stops'][0].get('publicDeparture'), + 'stops': create_crs_list_from_stops(timetable_entry['stops']), + } + + rationalised_entries.append(entry) + return rationalised_entries + +# Work through list of stops, and create a list of CRS codes for public stops +def create_crs_list_from_stops(stops): + crs_list = [] + for stop in stops: + if not stop['isPublic']: + continue + + loc_ref = ob_client.get_loc_ref_codes_by_tiploc(stop['tiploc']) + + crs_list.append(loc_ref[0]['3ALPHA']) + return crs_list \ No newline at end of file diff --git a/src/validate.py b/src/validate.py new file mode 100644 index 0000000..071102d --- /dev/null +++ b/src/validate.py @@ -0,0 +1,36 @@ +## Validates and filters input based on whether diagram time matches schedule start time +def filter_timetable_entries(diagram_entries): + for entry in diagram_entries: + diagram_time1 = (entry.get('diagram_time1') or '').replace('.', '') + diagram_time2 = (entry.get('diagram_time2') or '').replace('.', '') + timetable_entries = entry.get('timetable_entries', []) + + # Collect train start times for comparison + train_start_times = [t['trainStartTime'] for t in timetable_entries] + + # Check for match + matching_times = [ + t for t in train_start_times + if t == diagram_time1 or t== diagram_time2 + ] + + # Check for unique matches + if len(matching_times) == 1: + # Filter any non-matching entries if there is a match + entry['timetable_entries'] = [ + t for t in timetable_entries + if t['trainStartTime'] == matching_times[0] + ] + + entry['verification'] = "AUTO: Diagram/Schedule Time Match" + + return diagram_entries + +## Checks OwlBoard API for existing PIS codes and whether they match +def check_and_validate_against_owlboard(train_entries): + ### Loop through input list (which is output of above function, currently in output.txt) + ### check whether code exists in OwlBoard API, if so - does it match. + ### If exists but no match, open an issue. + ### If does not exist, do nothing. + ### If exists and does match, remove from input list. + ### Return output \ No newline at end of file