From dcac871aba1cc5bbc8fe204d96395e5c927f742a Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Sat, 27 Jul 2024 13:55:40 -0400 Subject: [PATCH] Adding more bus routes! (#988) * Adding routes 10,11,14,18,26 * Adding many new routes * Support all new data * Updating backlog to June --- common/constants/baselines.ts | 30 ++++++ common/constants/bus_constants/10.json | 91 +++++++++++++++++++ common/constants/bus_constants/11.json | 101 +++++++++++++++++++++ common/constants/bus_constants/14.json | 101 +++++++++++++++++++++ common/constants/bus_constants/18.json | 51 +++++++++++ common/constants/bus_constants/26.json | 51 +++++++++++ common/constants/bus_constants/29.json | 101 +++++++++++++++++++++ common/constants/bus_constants/30.json | 61 +++++++++++++ common/constants/bus_constants/31.json | 61 +++++++++++++ common/constants/bus_constants/35.json | 71 +++++++++++++++ common/constants/bus_constants/36.json | 101 +++++++++++++++++++++ common/constants/bus_constants/37.json | 61 +++++++++++++ common/constants/bus_constants/38.json | 71 +++++++++++++++ common/constants/bus_constants/42.json | 51 +++++++++++ common/constants/bus_constants/43.json | 61 +++++++++++++ common/constants/bus_constants/44.json | 91 +++++++++++++++++++ common/constants/bus_constants/51.json | 81 +++++++++++++++++ common/constants/bus_constants/69.json | 51 +++++++++++ common/constants/bus_constants/7.json | 61 +++++++++++++ common/constants/bus_constants/8.json | 121 +++++++++++++++++++++++++ common/constants/bus_constants/80.json | 81 +++++++++++++++++ common/constants/bus_constants/83.json | 61 +++++++++++++ common/constants/bus_constants/87.json | 91 +++++++++++++++++++ common/constants/bus_constants/88.json | 81 +++++++++++++++++ common/constants/bus_constants/90.json | 61 +++++++++++++ common/constants/bus_constants/93.json | 61 +++++++++++++ common/constants/bus_constants/94.json | 71 +++++++++++++++ common/constants/bus_constants/95.json | 71 +++++++++++++++ common/constants/bus_constants/96.json | 91 +++++++++++++++++++ common/constants/bus_constants/97.json | 61 +++++++++++++ common/constants/bus_constants/99.json | 71 +++++++++++++++ common/constants/dates.ts | 2 +- common/constants/stations.ts | 60 ++++++++++++ common/types/lines.ts | 60 ++++++++++++ server/bus/bus2train.py | 3 - server/bus/check_latest_manifests.sh | 2 +- server/bus/gen_bus_data.sh | 2 +- server/bus/gen_manifests.sh | 2 +- server/bus/gen_stop_list.sh | 9 ++ server/bus/stop_list.py | 60 ++++++++++++ server/chalicelib/date_utils.py | 2 +- 41 files changed, 2464 insertions(+), 8 deletions(-) create mode 100644 common/constants/bus_constants/10.json create mode 100644 common/constants/bus_constants/11.json create mode 100644 common/constants/bus_constants/14.json create mode 100644 common/constants/bus_constants/18.json create mode 100644 common/constants/bus_constants/26.json create mode 100644 common/constants/bus_constants/29.json create mode 100644 common/constants/bus_constants/30.json create mode 100644 common/constants/bus_constants/31.json create mode 100644 common/constants/bus_constants/35.json create mode 100644 common/constants/bus_constants/36.json create mode 100644 common/constants/bus_constants/37.json create mode 100644 common/constants/bus_constants/38.json create mode 100644 common/constants/bus_constants/42.json create mode 100644 common/constants/bus_constants/43.json create mode 100644 common/constants/bus_constants/44.json create mode 100644 common/constants/bus_constants/51.json create mode 100644 common/constants/bus_constants/69.json create mode 100644 common/constants/bus_constants/7.json create mode 100644 common/constants/bus_constants/8.json create mode 100644 common/constants/bus_constants/80.json create mode 100644 common/constants/bus_constants/83.json create mode 100644 common/constants/bus_constants/87.json create mode 100644 common/constants/bus_constants/88.json create mode 100644 common/constants/bus_constants/90.json create mode 100644 common/constants/bus_constants/93.json create mode 100644 common/constants/bus_constants/94.json create mode 100644 common/constants/bus_constants/95.json create mode 100644 common/constants/bus_constants/96.json create mode 100644 common/constants/bus_constants/97.json create mode 100644 common/constants/bus_constants/99.json create mode 100755 server/bus/gen_stop_list.sh create mode 100644 server/bus/stop_list.py diff --git a/common/constants/baselines.ts b/common/constants/baselines.ts index 36500ec34..960afc1e2 100644 --- a/common/constants/baselines.ts +++ b/common/constants/baselines.ts @@ -28,32 +28,62 @@ export const PEAK_RIDERSHIP: { 'line-green': 87148, '1': 15272, '4': 850, + '7': 5126, + '8': 3423, '9': 7116, + '10': 2922, + '11': 3280, + '14': 1478, '15': 6379, '16': 6197, '1719': 6300, + '18': 510, '21': 5236, '22': 8767, '23': 12225, + '26': 1616, '28': 12893, + '29': 2299, + '30': 2382, + '31': 6339, '32': 10982, '34': 6674, + '35': 2301, + '36': 2998, + '37': 1530, + '38': 882, '39': 11792, '41': 2119, + '42': 2746, + '43': 930, + '44': 3433, '45': 3310, '47': 5955, + '51': 1681, '55': 816, '57': 11284, '6170170': 6988, '66': 14505, + '69': 3019, '71': 5789, '73': 6616, '77': 8015, + '80': 1932, + '83': 2146, '85': 1189, '86': 6850, + '87': 4218, + '88': 4292, '89': 3963, + '90': 1583, '91': 1942, '92': 1459, + '93': 5480, + '94': 1961, + '95': 1764, + '96': 2387, + '97': 1184, + '99': 2039, '104109': 8163, '111': 11258, '114116117': 12867, diff --git a/common/constants/bus_constants/10.json b/common/constants/bus_constants/10.json new file mode 100644 index 000000000..a73c6e970 --- /dev/null +++ b/common/constants/bus_constants/10.json @@ -0,0 +1,91 @@ +{ + "10": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "City Point", + "branches": null, + "station": "ctypt", + "order": 1, + "stops": { + "1": ["10-1-33"], + "0": ["10-0-33"] + } + }, + { + "stop_name": "L Street @ Broadway", + "branches": null, + "station": "lbrwy", + "order": 2, + "stops": { + "1": ["10-1-41"], + "0": ["10-0-25"] + } + }, + { + "stop_name": "Perkins Square (Dorchester) @ Broadway (Southbound)", + "branches": null, + "station": "perks", + "order": 3, + "stops": { + "1": ["10-1-45"], + "0": ["10-0-20"] + } + }, + { + "stop_name": "Andrew", + "branches": null, + "station": "andrw", + "order": 4, + "stops": { + "1": ["10-1-13"], + "0": ["10-0-13"] + } + }, + { + "stop_name": "South Bay Mall", + "branches": null, + "station": "sobay", + "order": 5, + "stops": { + "1": ["10-1-11241"], + "0": ["10-0-29051"] + } + }, + { + "stop_name": "BU Medical Campus", + "branches": null, + "station": "bumed", + "order": 6, + "stops": { + "1": ["10-1-5090"], + "0": ["10-0-5089"] + } + }, + { + "stop_name": "Back Bay", + "branches": null, + "station": "bbsta", + "order": 7, + "stops": { + "1": ["10-1-11384"], + "0": ["10-0-176"] + } + }, + { + "stop_name": "Saint James Avenue @ Dartmouth Street", + "branches": null, + "station": "stjim", + "order": 8, + "stops": { + "1": ["10-1-178"], + "0": ["10-0-178"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/11.json b/common/constants/bus_constants/11.json new file mode 100644 index 000000000..8146aa969 --- /dev/null +++ b/common/constants/bus_constants/11.json @@ -0,0 +1,101 @@ +{ + "11": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "South Station", + "branches": null, + "station": "sosta", + "order": 0, + "stops": { + "1": ["11-1-6564"], + "0": ["11-0-6564"] + } + }, + { + "stop_name": "City Point", + "branches": null, + "station": "ctypt", + "order": 1, + "stops": { + "1": ["11-1-33"], + "0": ["11-0-33"] + } + }, + { + "stop_name": "Day Boulevard & O Street", + "branches": null, + "station": "dayo", + "order": 2, + "stops": { + "1": ["11-1-275"], + "0": ["11-0-268"] + } + }, + { + "stop_name": "Dorchester Street & 8th Street", + "branches": null, + "station": "dotst", + "order": 3, + "stops": { + "1": ["11-1-286"], + "0": ["11-0-258"] + } + }, + { + "stop_name": "C @ Cabot Garage", + "branches": null, + "station": "cabgr", + "order": 4, + "stops": { + "1": ["11-1-30294"], + "0": ["11-0-30294"] + } + }, + { + "stop_name": "Broadway Station", + "branches": null, + "station": "brway", + "order": 5, + "stops": { + "1": ["11-1-150"], + "0": ["11-0-151"] + } + }, + { + "stop_name": "Washington Street @ Herald Street", + "branches": null, + "station": "waher", + "order": 6, + "stops": { + "1": ["11-1-15095"], + "0": ["11-0-15095"] + } + }, + { + "stop_name": "Washington Street @ Tufts Medical Center", + "branches": null, + "station": "tumed", + "order": 7, + "stops": { + "1": ["11-1-6565"], + "0": ["11-0-6565"] + } + }, + { + "stop_name": "Bedford & Chauncy Streets", + "branches": null, + "station": "bdfch", + "order": 8, + "stops": { + "1": ["11-1-16538"], + "0": ["11-0-16538"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/14.json b/common/constants/bus_constants/14.json new file mode 100644 index 000000000..d61d691fb --- /dev/null +++ b/common/constants/bus_constants/14.json @@ -0,0 +1,101 @@ +{ + "14": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Belgrade & Corinth Streets (Roslindale Square)", + "branches": null, + "station": "belco", + "order": 1, + "stops": { + "1": ["14-1-797"], + "0": ["14-0-797"] + } + }, + { + "stop_name": "Hyde Park Avenue @ Cummins Highway", + "branches": null, + "station": "hpave", + "order": 2, + "stops": { + "1": ["14-1-6433"], + "0": ["14-0-6460"] + } + }, + { + "stop_name": "Cummins Highway", + "branches": null, + "station": "cmhwy", + "order": 3, + "stops": { + "1": ["14-1-26500"], + "0": ["14-0-10424"] + } + }, + { + "stop_name": "Franklin Park", + "branches": null, + "station": "frnpk", + "order": 4, + "stops": { + "1": ["14-1-383"], + "0": ["14-0-415"] + } + }, + { + "stop_name": "Grove Hall", + "branches": null, + "station": "ghall", + "order": 5, + "stops": { + "1": ["14-1-386"], + "0": ["14-0-412"] + } + }, + { + "stop_name": "Warren Street @ Boston Latin Academy", + "branches": null, + "station": "latac", + "order": 6, + "stops": { + "1": ["14-1-390"], + "0": ["14-0-407"] + } + }, + { + "stop_name": "Nubian Station", + "branches": null, + "station": "nubn", + "order": 7, + "stops": { + "1": ["14-1-64000"], + "0": ["14-0-64000"] + } + }, + { + "stop_name": "Jackson Square Station", + "branches": null, + "station": "jasst", + "order": 8, + "stops": { + "1": ["14-1-11531"], + "0": ["14-0-11531"] + } + }, + { + "stop_name": "Heath Street Loop", + "branches": null, + "station": "heath", + "order": 9, + "stops": { + "1": ["14-1-1761"], + "0": ["14-0-1761"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/18.json b/common/constants/bus_constants/18.json new file mode 100644 index 000000000..eb67855d9 --- /dev/null +++ b/common/constants/bus_constants/18.json @@ -0,0 +1,51 @@ +{ + "18": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Ashmont Terminal", + "branches": null, + "station": "ashmt", + "order": 1, + "stops": { + "1": ["18-1-334"], + "0": ["18-0-334"] + } + }, + { + "stop_name": "Fields Corner", + "branches": null, + "station": "fldcr", + "order": 2, + "stops": { + "1": ["18-1-322"], + "0": ["18-0-323"] + } + }, + { + "stop_name": "Bay Street @ Auckland Street", + "branches": null, + "station": "bauck", + "order": 3, + "stops": { + "1": ["18-1-180"], + "0": ["18-0-180"] + } + }, + { + "stop_name": "Andrew", + "branches": null, + "station": "andrw", + "order": 4, + "stops": { + "1": ["18-1-13"], + "0": ["18-0-13"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/26.json b/common/constants/bus_constants/26.json new file mode 100644 index 000000000..df774273d --- /dev/null +++ b/common/constants/bus_constants/26.json @@ -0,0 +1,51 @@ +{ + "26": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Gallivan Boulevard @ Washington Street", + "branches": null, + "station": "galli", + "order": 0, + "stops": { + "1": ["26-1-494"], + "0": ["26-0-494", "26-0-511"] + } + }, + { + "stop_name": "Ashmont Terminal", + "branches": null, + "station": "ashmt", + "order": 1, + "stops": { + "1": ["26-1-334"], + "0": ["26-0-334"] + } + }, + { + "stop_name": "Codman Square", + "branches": null, + "station": "codmn", + "order": 2, + "stops": { + "1": ["26-1-371"], + "0": ["26-0-426"] + } + }, + { + "stop_name": "Morton @ Gallivan", + "branches": null, + "station": "mort", + "order": 3, + "stops": { + "1": ["26-1-507"], + "0": ["26-0-499", "26-0-507"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/29.json b/common/constants/bus_constants/29.json new file mode 100644 index 000000000..25f160d1c --- /dev/null +++ b/common/constants/bus_constants/29.json @@ -0,0 +1,101 @@ +{ + "29": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Mattapan Station", + "branches": null, + "station": "matpn", + "order": 1, + "stops": { + "1": ["29-1-18511"], + "0": ["29-0-18511"] + } + }, + { + "stop_name": "Wellington Hill", + "branches": null, + "station": "wellh", + "order": 2, + "stops": { + "1": ["29-1-1728"], + "0": ["29-0-1714"] + } + }, + { + "stop_name": "Morton Street @ Blue Hill Avenue", + "branches": null, + "station": "mortn", + "order": 3, + "stops": { + "1": ["29-1-1731"], + "0": ["29-0-11712"] + } + }, + { + "stop_name": "Blue Hill Avenue @ Talbot Avenue", + "branches": null, + "station": "bltal", + "order": 4, + "stops": { + "1": ["29-1-1737"], + "0": ["29-0-419"] + } + }, + { + "stop_name": "Franklin Field Housing", + "branches": null, + "station": "field", + "order": 4, + "stops": { + "1": ["29-1-11735"], + "0": ["29-0-11735"] + } + }, + { + "stop_name": "Franklin Park", + "branches": null, + "station": "frnpk", + "order": 5, + "stops": { + "1": ["29-1-383"], + "0": ["29-0-17391"] + } + }, + { + "stop_name": "Seaver & Humboldt", + "branches": null, + "station": "svrhm", + "order": 6, + "stops": { + "1": ["29-1-1741"], + "0": ["29-0-17411"] + } + }, + { + "stop_name": "Egleston Square", + "branches": null, + "station": "egles", + "order": 7, + "stops": { + "1": ["29-1-1188"], + "0": ["29-0-10413"] + } + }, + { + "stop_name": "Jackson Square Station", + "branches": null, + "station": "jasst", + "order": 8, + "stops": { + "1": ["29-1-11531"], + "0": ["29-0-11531"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/30.json b/common/constants/bus_constants/30.json new file mode 100644 index 000000000..fd4969a99 --- /dev/null +++ b/common/constants/bus_constants/30.json @@ -0,0 +1,61 @@ +{ + "30": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Mattapan Station", + "branches": null, + "station": "matpn", + "order": 1, + "stops": { + "1": ["30-1-185"], + "0": ["30-0-185"] + } + }, + { + "stop_name": "Cummins Highway @ American Legion Highway", + "branches": null, + "station": "cmaml", + "order": 2, + "stops": { + "1": ["30-1-96459"], + "0": ["30-0-16434"] + } + }, + { + "stop_name": "Hyde Park Avenue @ Cummins Highway", + "branches": null, + "station": "hpave", + "order": 3, + "stops": { + "1": ["30-1-6459"], + "0": ["30-0-6433"] + } + }, + { + "stop_name": "Roslindale Square", + "branches": null, + "station": "rossq", + "order": 4, + "stops": { + "1": ["30-1-636"], + "0": ["30-0-6022"] + } + }, + { + "stop_name": "Forest Hills Busway", + "branches": null, + "station": "fhill", + "order": 5, + "stops": { + "1": ["30-1-10642"], + "0": ["30-0-10642"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/31.json b/common/constants/bus_constants/31.json new file mode 100644 index 000000000..4ca5bcce2 --- /dev/null +++ b/common/constants/bus_constants/31.json @@ -0,0 +1,61 @@ +{ + "31": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Mattapan Station", + "branches": null, + "station": "matpn", + "order": 1, + "stops": { + "1": ["31-1-18511"], + "0": ["31-0-18511"] + } + }, + { + "stop_name": "Wellington Hill", + "branches": null, + "station": "wellh", + "order": 2, + "stops": { + "1": ["31-1-1728"], + "0": ["31-0-1714"] + } + }, + { + "stop_name": "Morton Street @ Blue Hill Avenue", + "branches": null, + "station": "mortn", + "order": 3, + "stops": { + "1": ["31-1-543"], + "0": ["31-0-11712"] + } + }, + { + "stop_name": "Shattuck Hospital", + "branches": null, + "station": "shosp", + "order": 4, + "stops": { + "1": ["31-1-546"], + "0": ["31-0-5232"] + } + }, + { + "stop_name": "Forest Hills Busway", + "branches": null, + "station": "fhill", + "order": 5, + "stops": { + "1": ["31-1-875"], + "0": ["31-0-875"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/35.json b/common/constants/bus_constants/35.json new file mode 100644 index 000000000..3659098ae --- /dev/null +++ b/common/constants/bus_constants/35.json @@ -0,0 +1,71 @@ +{ + "35": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Dedham Mall", + "branches": null, + "station": "dmall", + "order": 1, + "stops": { + "1": ["35-1-10833"], + "0": ["35-0-10833"] + } + }, + { + "stop_name": "Stimson Street @ Washington Street", + "branches": null, + "station": "stims", + "order": 2, + "stops": { + "1": ["35-1-616", "35-1-763"], + "0": ["35-0-616", "35-0-831"] + } + }, + { + "stop_name": "Spring Street @ Centre Street", + "branches": null, + "station": "sring", + "order": 3, + "stops": { + "1": ["35-1-780"], + "0": ["35-0-821"] + } + }, + { + "stop_name": "West Roxbury Parkway @ Centre", + "branches": null, + "station": "pkwy", + "order": 4, + "stops": { + "1": ["35-1-787"], + "0": ["35-0-5256", "35-0-804"] + } + }, + { + "stop_name": "Roslindale Square", + "branches": null, + "station": "rossq", + "order": 5, + "stops": { + "1": ["35-1-636"], + "0": ["35-0-602"] + } + }, + { + "stop_name": "Forest Hills Busway", + "branches": null, + "station": "fhill", + "order": 6, + "stops": { + "1": ["35-1-10642"], + "0": ["35-0-10642"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/36.json b/common/constants/bus_constants/36.json new file mode 100644 index 000000000..0acd19df4 --- /dev/null +++ b/common/constants/bus_constants/36.json @@ -0,0 +1,101 @@ +{ + "36": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Industrial Park (West Roxbury) near VA Rivermoor", + "branches": null, + "station": "indwr", + "order": 1, + "stops": { + "1": ["36-1-120"], + "0": ["36-0-120"] + } + }, + { + "stop_name": "Millennium Park", + "branches": null, + "station": "mpark", + "order": 1, + "stops": { + "1": ["36-1-67120"], + "0": ["36-0-67120"] + } + }, + { + "stop_name": "VA Hospital (Dedham)", + "branches": null, + "station": "vaded", + "order": 1, + "stops": { + "1": ["36-1-10820"], + "0": ["36-0-10820"] + } + }, + { + "stop_name": "Charles River Loop", + "branches": null, + "station": "cloop", + "order": 2, + "stops": { + "1": ["36-1-774"], + "0": ["36-0-820"] + } + }, + { + "stop_name": "Spring Street @ Centre Street", + "branches": null, + "station": "sring", + "order": 2, + "stops": { + "1": ["36-1-779"], + "0": ["36-0-812", "36-0-821"] + } + }, + { + "stop_name": "Centre & LaGrange (West Roxbury)", + "branches": null, + "station": "wrox", + "order": 3, + "stops": { + "1": ["36-1-781"], + "0": ["36-0-810"] + } + }, + { + "stop_name": "West Roxbury Parkway @ Centre", + "branches": null, + "station": "pkwy", + "order": 4, + "stops": { + "1": ["36-1-787"], + "0": ["36-0-804"] + } + }, + { + "stop_name": "Roslindale Square", + "branches": null, + "station": "rossq", + "order": 5, + "stops": { + "1": ["36-1-636"], + "0": ["36-0-602"] + } + }, + { + "stop_name": "Forest Hills Busway", + "branches": null, + "station": "fhill", + "order": 6, + "stops": { + "1": ["36-1-10642", "36-1-875"], + "0": ["36-0-10642"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/37.json b/common/constants/bus_constants/37.json new file mode 100644 index 000000000..65bd6fb4d --- /dev/null +++ b/common/constants/bus_constants/37.json @@ -0,0 +1,61 @@ +{ + "37": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Baker & Vermont Streets", + "branches": null, + "station": "baker", + "order": 1, + "stops": { + "1": ["37-1-853"], + "0": ["37-0-853"] + } + }, + { + "stop_name": "Centre & LaGrange (West Roxbury)", + "branches": null, + "station": "wrox", + "order": 2, + "stops": { + "1": ["37-1-781"], + "0": ["37-0-845"] + } + }, + { + "stop_name": "West Roxbury Parkway @ Centre", + "branches": null, + "station": "pkwy", + "order": 3, + "stops": { + "1": ["37-1-787"], + "0": ["37-0-804"] + } + }, + { + "stop_name": "Roslindale Square", + "branches": null, + "station": "rossq", + "order": 4, + "stops": { + "1": ["37-1-636"], + "0": ["37-0-602"] + } + }, + { + "stop_name": "Forest Hills Busway", + "branches": null, + "station": "fhill", + "order": 5, + "stops": { + "1": ["37-1-10642"], + "0": ["37-0-10642"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/38.json b/common/constants/bus_constants/38.json new file mode 100644 index 000000000..4cddda11d --- /dev/null +++ b/common/constants/bus_constants/38.json @@ -0,0 +1,71 @@ +{ + "38": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Wren Street", + "branches": null, + "station": "wren", + "order": 1, + "stops": { + "1": ["38-1-5263"], + "0": ["38-0-5263"] + } + }, + { + "stop_name": "West Roxbury Parkway @ Centre", + "branches": null, + "station": "pkwy", + "order": 2, + "stops": { + "1": ["38-1-15216", "38-1-804"], + "0": ["38-0-5256"] + } + }, + { + "stop_name": "Centre Street @ Weld Street", + "branches": null, + "station": "ctrwe", + "order": 3, + "stops": { + "1": ["38-1-5223"], + "0": ["38-0-5249"] + } + }, + { + "stop_name": "Centre Street @ Faulkner Hospital", + "branches": null, + "station": "fahsp", + "order": 4, + "stops": { + "1": ["38-1-5227"], + "0": ["38-0-5245"] + } + }, + { + "stop_name": "Jamaica Plain Center (Monument)", + "branches": null, + "station": "jpctr", + "order": 5, + "stops": { + "1": ["38-1-2003", "38-1-99991"], + "0": ["38-0-1128", "38-0-11939"] + } + }, + { + "stop_name": "Forest Hills Busway", + "branches": null, + "station": "fhill", + "order": 6, + "stops": { + "1": ["38-1-10642"], + "0": ["38-0-10642"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/42.json b/common/constants/bus_constants/42.json new file mode 100644 index 000000000..3cb88d08d --- /dev/null +++ b/common/constants/bus_constants/42.json @@ -0,0 +1,51 @@ +{ + "42": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Forest Hills Busway", + "branches": null, + "station": "fhill", + "order": 1, + "stops": { + "1": ["42-1-875"], + "0": ["42-0-875"] + } + }, + { + "stop_name": "Washington Street @ Green Street", + "branches": null, + "station": "wasgr", + "order": 2, + "stops": { + "1": ["42-1-5236"], + "0": ["42-0-41187"] + } + }, + { + "stop_name": "Egleston Square", + "branches": null, + "station": "egles", + "order": 3, + "stops": { + "1": ["42-1-1165"], + "0": ["42-0-1187"] + } + }, + { + "stop_name": "Nubian Station", + "branches": null, + "station": "nubn", + "order": 4, + "stops": { + "1": ["42-1-64000"], + "0": ["42-0-64000"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/43.json b/common/constants/bus_constants/43.json new file mode 100644 index 000000000..85abbb2a5 --- /dev/null +++ b/common/constants/bus_constants/43.json @@ -0,0 +1,61 @@ +{ + "43": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Ruggles", + "branches": null, + "station": "rugg", + "order": 1, + "stops": { + "1": ["43-1-17863"], + "0": ["43-0-17863"] + } + }, + { + "stop_name": "Tremont & Massachusetts Avenue", + "branches": null, + "station": "trmas", + "order": 2, + "stops": { + "1": ["43-1-1230"], + "0": ["43-0-1252"] + } + }, + { + "stop_name": "Tremont Street @ Darthmouth/West Dedham Streets", + "branches": null, + "station": "tred", + "order": 3, + "stops": { + "1": ["43-1-1235"], + "0": ["43-0-1246"] + } + }, + { + "stop_name": "Park Square (Charles Street)", + "branches": null, + "station": "prksq", + "order": 4, + "stops": { + "1": ["43-1-1241"], + "0": ["43-0-8281"] + } + }, + { + "stop_name": "Park Street", + "branches": null, + "station": "pktrm", + "order": 5, + "stops": { + "1": ["43-1-10000"], + "0": ["43-0-10000"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/44.json b/common/constants/bus_constants/44.json new file mode 100644 index 000000000..43a64b1e1 --- /dev/null +++ b/common/constants/bus_constants/44.json @@ -0,0 +1,91 @@ +{ + "44": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Jackson Square Station", + "branches": null, + "station": "jasst", + "order": 1, + "stops": { + "1": ["44-1-11531"], + "0": ["44-0-11531"] + } + }, + { + "stop_name": "Egleston Square", + "branches": null, + "station": "egles", + "order": 2, + "stops": { + "1": ["44-1-10413"], + "0": ["44-0-1188"] + } + }, + { + "stop_name": "Seaver & Humboldt", + "branches": null, + "station": "svrhm", + "order": 3, + "stops": { + "1": ["44-1-1325"], + "0": ["44-0-1354"] + } + }, + { + "stop_name": "Townsend Street @ Humboldt Avenue (Latin Academy)", + "branches": null, + "station": "towhm", + "order": 4, + "stops": { + "1": ["44-1-1332"], + "0": ["44-0-1346"] + } + }, + { + "stop_name": "Warren Street @ Walnut Avenue", + "branches": null, + "station": "warwl", + "order": 5, + "stops": { + "1": ["44-1-396"], + "0": ["44-0-40001"] + } + }, + { + "stop_name": "Nubian Station", + "branches": null, + "station": "nubn", + "order": 6, + "stops": { + "1": ["44-1-64000"], + "0": ["44-0-64000"] + } + }, + { + "stop_name": "Roxbury Crossing Station", + "branches": null, + "station": "roxbs", + "order": 7, + "stops": { + "1": ["44-1-21148"], + "0": ["44-0-11257"] + } + }, + { + "stop_name": "Ruggles", + "branches": null, + "station": "rugg", + "order": 8, + "stops": { + "1": ["44-1-17861"], + "0": ["44-0-17863"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/51.json b/common/constants/bus_constants/51.json new file mode 100644 index 000000000..aa35a6eb8 --- /dev/null +++ b/common/constants/bus_constants/51.json @@ -0,0 +1,81 @@ +{ + "51": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Reservoir Busway", + "branches": null, + "station": "resbu", + "order": 1, + "stops": { + "1": ["51-1-21917"], + "0": ["51-0-21917"] + } + }, + { + "stop_name": "Boylston @ Chestnut Hill Avenue", + "branches": null, + "station": "bocnh", + "order": 2, + "stops": { + "1": ["51-1-11545"], + "0": ["51-0-81916"] + } + }, + { + "stop_name": "Grove & South Streets", + "branches": null, + "station": "south", + "order": 3, + "stops": { + "1": ["51-1-11837"], + "0": ["51-0-1895"] + } + }, + { + "stop_name": "VFW Parkway @ Corey Street", + "branches": null, + "station": "vfcor", + "order": 4, + "stops": { + "1": ["51-1-1839"], + "0": ["51-0-1888"] + } + }, + { + "stop_name": "Centre Street @ Weld Street", + "branches": null, + "station": "ctrwe", + "order": 5, + "stops": { + "1": ["51-1-1853"], + "0": ["51-0-1875"] + } + }, + { + "stop_name": "Roslindale Square", + "branches": null, + "station": "rossq", + "order": 6, + "stops": { + "1": ["51-1-636"], + "0": ["51-0-602"] + } + }, + { + "stop_name": "Forest Hills Busway", + "branches": null, + "station": "fhill", + "order": 7, + "stops": { + "1": ["51-1-10642"], + "0": ["51-0-10642"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/69.json b/common/constants/bus_constants/69.json new file mode 100644 index 000000000..0caee3669 --- /dev/null +++ b/common/constants/bus_constants/69.json @@ -0,0 +1,51 @@ +{ + "69": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Harvard", + "branches": null, + "station": "hhgat", + "order": 1, + "stops": { + "1": ["69-1-110"], + "0": ["69-0-110"] + } + }, + { + "stop_name": "Inman Square", + "branches": null, + "station": "inman", + "order": 2, + "stops": { + "1": ["69-1-1404"], + "0": ["69-0-1425"] + } + }, + { + "stop_name": "Cambridge Street @ Windsor Street", + "branches": null, + "station": "camwd", + "order": 3, + "stops": { + "1": ["69-1-11408"], + "0": ["69-0-1422"] + } + }, + { + "stop_name": "Lechmere Station", + "branches": null, + "station": "lchmr", + "order": 4, + "stops": { + "1": ["69-1-70500"], + "0": ["69-0-70500"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/7.json b/common/constants/bus_constants/7.json new file mode 100644 index 000000000..cbeb62483 --- /dev/null +++ b/common/constants/bus_constants/7.json @@ -0,0 +1,61 @@ +{ + "7": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "City Point", + "branches": null, + "station": "ctypt", + "order": 1, + "stops": { + "1": ["7-1-33", "7-1-333"], + "0": ["7-0-33", "7-0-333"] + } + }, + { + "stop_name": "L Street @ Broadway", + "branches": null, + "station": "lbrwy", + "order": 2, + "stops": { + "1": ["7-1-886"], + "0": ["7-0-879"] + } + }, + { + "stop_name": "Boston Convention Center", + "branches": null, + "station": "bcec", + "order": 3, + "stops": { + "1": ["7-1-890"], + "0": ["7-0-889"] + } + }, + { + "stop_name": "South Station", + "branches": null, + "station": "sosta", + "order": 4, + "stops": { + "1": ["7-1-892"], + "0": ["7-0-6564"] + } + }, + { + "stop_name": "Otis & Summer Streets", + "branches": null, + "station": "otsum", + "order": 5, + "stops": { + "1": ["7-1-16535"], + "0": ["7-0-16535"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/8.json b/common/constants/bus_constants/8.json new file mode 100644 index 000000000..19abb01c5 --- /dev/null +++ b/common/constants/bus_constants/8.json @@ -0,0 +1,121 @@ +{ + "8": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "University of Massachusetts, Boston", + "branches": null, + "station": "umass", + "order": 1, + "stops": { + "1": ["8-1-111"], + "0": ["8-0-142"] + } + }, + { + "stop_name": "JFK/UMass", + "branches": null, + "station": "jfk", + "order": 2, + "stops": { + "1": ["8-1-121"], + "0": ["8-0-121"] + } + }, + { + "stop_name": "Edward Everett Square Columbia @ Massachusetts Avenue", + "branches": null, + "station": "edevt", + "order": 3, + "stops": { + "1": ["8-1-123"], + "0": ["8-0-134"] + } + }, + { + "stop_name": "South Bay Mall", + "branches": null, + "station": "sobay", + "order": 4, + "stops": { + "1": ["8-1-29051"], + "0": ["8-0-11241"] + } + }, + { + "stop_name": "BU Medical Campus", + "branches": null, + "station": "bumed", + "order": 5, + "stops": { + "1": ["8-1-10015"], + "0": ["8-0-5089"] + } + }, + { + "stop_name": "Nubian Station", + "branches": null, + "station": "nubn", + "order": 6, + "stops": { + "1": ["8-1-64"], + "0": ["8-0-64"] + } + }, + { + "stop_name": "Ruggles", + "branches": null, + "station": "rugg", + "order": 7, + "stops": { + "1": ["8-1-17863"], + "0": ["8-0-17861"] + } + }, + { + "stop_name": "Huntington & Ruggles", + "branches": null, + "station": "hrugg", + "order": 8, + "stops": { + "1": ["8-1-1799"], + "0": ["8-0-1784"] + } + }, + { + "stop_name": "Brookline & Longwood Avenues", + "branches": null, + "station": "brlng", + "order": 9, + "stops": { + "1": ["8-1-1804"], + "0": ["8-0-1779"] + } + }, + { + "stop_name": "Fenway Park", + "branches": null, + "station": "fnypk", + "order": 10, + "stops": { + "1": ["8-1-1563"], + "0": ["8-0-1518"] + } + }, + { + "stop_name": "Kenmore (Busway)", + "branches": null, + "station": "kenbs", + "order": 11, + "stops": { + "1": ["8-1-899"], + "0": ["8-0-899"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/80.json b/common/constants/bus_constants/80.json new file mode 100644 index 000000000..a2fcfc560 --- /dev/null +++ b/common/constants/bus_constants/80.json @@ -0,0 +1,81 @@ +{ + "80": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Arlington Center", + "branches": null, + "station": "arlct", + "order": 1, + "stops": { + "1": ["80-1-2362"], + "0": ["80-0-2362"] + } + }, + { + "stop_name": "Boston Street @ High Street", + "branches": null, + "station": "boshi", + "order": 2, + "stops": { + "1": ["80-1-3513"], + "0": ["80-0-2418"] + } + }, + { + "stop_name": "North Street", + "branches": null, + "station": "nostr", + "order": 3, + "stops": { + "1": ["80-1-2374"], + "0": ["80-0-2412"] + } + }, + { + "stop_name": "Powder House", + "branches": null, + "station": "powdr", + "order": 4, + "stops": { + "1": ["80-1-2381"], + "0": ["80-0-2738"] + } + }, + { + "stop_name": "Magoun Square", + "branches": null, + "station": "mgnsq", + "order": 5, + "stops": { + "1": ["80-1-2699"], + "0": ["80-0-2404"] + } + }, + { + "stop_name": "Medford Street @ School Street (Somerville High School)", + "branches": null, + "station": "mdscl", + "order": 6, + "stops": { + "1": ["80-1-2388"], + "0": ["80-0-2398"] + } + }, + { + "stop_name": "Lechmere Station", + "branches": null, + "station": "lchmr", + "order": 7, + "stops": { + "1": ["80-1-70500"], + "0": ["80-0-70500"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/83.json b/common/constants/bus_constants/83.json new file mode 100644 index 000000000..e7c6279d8 --- /dev/null +++ b/common/constants/bus_constants/83.json @@ -0,0 +1,61 @@ +{ + "83": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Rindge Avenue", + "branches": null, + "station": "rindg", + "order": 1, + "stops": { + "1": ["83-1-2425"], + "0": ["83-0-2425"] + } + }, + { + "stop_name": "Porter Square", + "branches": null, + "station": "portr", + "order": 2, + "stops": { + "1": ["83-1-2430"], + "0": ["83-0-23151", "83-0-2460"] + } + }, + { + "stop_name": "Inman Square", + "branches": null, + "station": "inman", + "order": 3, + "stops": { + "1": ["83-1-2439"], + "0": ["83-0-2451"] + } + }, + { + "stop_name": "Prospect Street @ Broadway", + "branches": null, + "station": "proby", + "order": 4, + "stops": { + "1": ["83-1-2441"], + "0": ["83-0-2448"] + } + }, + { + "stop_name": "Central Square (Cambridge)", + "branches": null, + "station": "cntsq", + "order": 5, + "stops": { + "1": ["83-1-1060"], + "0": ["83-0-1060"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/87.json b/common/constants/bus_constants/87.json new file mode 100644 index 000000000..e00eaf956 --- /dev/null +++ b/common/constants/bus_constants/87.json @@ -0,0 +1,91 @@ +{ + "87": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Arlington Center", + "branches": null, + "station": "arlct", + "order": 1, + "stops": { + "1": ["87-1-12644"], + "0": ["87-0-12644"] + } + }, + { + "stop_name": "Clarendon Hill", + "branches": null, + "station": "clarh", + "order": 2, + "stops": { + "1": ["87-1-2637"], + "0": ["87-0-12636", "87-0-2637"] + } + }, + { + "stop_name": "Teele Square @ Broadway", + "branches": null, + "station": "teele", + "order": 3, + "stops": { + "1": ["87-1-2577"], + "0": ["87-0-2634"] + } + }, + { + "stop_name": "Davis", + "branches": null, + "station": "davis", + "order": 4, + "stops": { + "1": ["87-1-2581"], + "0": ["87-0-5104"] + } + }, + { + "stop_name": "Somerville Avenue @ Park Street", + "branches": null, + "station": "smvpk", + "order": 5, + "stops": { + "1": ["87-1-2591"], + "0": ["87-0-2618"] + } + }, + { + "stop_name": "Union Square", + "branches": null, + "station": "unsqu", + "order": 6, + "stops": { + "1": ["87-1-2510"], + "0": ["87-0-2612"] + } + }, + { + "stop_name": "McGrath Highway @ Somerville Avenue", + "branches": null, + "station": "mcgsm", + "order": 7, + "stops": { + "1": ["87-1-2600"], + "0": ["87-0-2607"] + } + }, + { + "stop_name": "Lechmere Station", + "branches": null, + "station": "lchmr", + "order": 8, + "stops": { + "1": ["87-1-70500"], + "0": ["87-0-70500"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/88.json b/common/constants/bus_constants/88.json new file mode 100644 index 000000000..4a05fab5e --- /dev/null +++ b/common/constants/bus_constants/88.json @@ -0,0 +1,81 @@ +{ + "88": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Clarendon Hill", + "branches": null, + "station": "clarh", + "order": 1, + "stops": { + "1": ["88-1-2637"], + "0": ["88-0-2637"] + } + }, + { + "stop_name": "Teele Square @ Broadway", + "branches": null, + "station": "teele", + "order": 2, + "stops": { + "1": ["88-1-2577"], + "0": ["88-0-2634"] + } + }, + { + "stop_name": "Davis", + "branches": null, + "station": "davis", + "order": 3, + "stops": { + "1": ["88-1-2581"], + "0": ["88-0-5104"] + } + }, + { + "stop_name": "Highland Avenue @ Cedar Street", + "branches": null, + "station": "hlcdr", + "order": 4, + "stops": { + "1": ["88-1-2677"], + "0": ["88-0-2671"] + } + }, + { + "stop_name": "Highland Avenue @ School Street (Somerville High School)", + "branches": null, + "station": "hlscl", + "order": 5, + "stops": { + "1": ["88-1-2684"], + "0": ["88-0-2662", "88-0-2664"] + } + }, + { + "stop_name": "McGrath Highway @ Somerville Avenue", + "branches": null, + "station": "mcgsm", + "order": 6, + "stops": { + "1": ["88-1-2600"], + "0": ["88-0-2607"] + } + }, + { + "stop_name": "Lechmere Station", + "branches": null, + "station": "lchmr", + "order": 7, + "stops": { + "1": ["88-1-70500"], + "0": ["88-0-70500"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/90.json b/common/constants/bus_constants/90.json new file mode 100644 index 000000000..15f31ad68 --- /dev/null +++ b/common/constants/bus_constants/90.json @@ -0,0 +1,61 @@ +{ + "90": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Davis", + "branches": null, + "station": "davis", + "order": 1, + "stops": { + "1": ["90-1-5104"], + "0": ["90-0-5104"] + } + }, + { + "stop_name": "Highland Avenue @ School Street (Somerville High School)", + "branches": null, + "station": "hlscl", + "order": 2, + "stops": { + "1": ["90-1-2684"], + "0": ["90-0-2662"] + } + }, + { + "stop_name": "Broadway @ Cross Street", + "branches": null, + "station": "brwcr", + "order": 3, + "stops": { + "1": ["90-1-2747"], + "0": ["90-0-2748"] + } + }, + { + "stop_name": "Sullivan Square", + "branches": null, + "station": "sull", + "order": 4, + "stops": { + "1": ["90-1-29001"], + "0": ["90-0-29001"] + } + }, + { + "stop_name": "Assembly Mall & Row", + "branches": null, + "station": "amall", + "order": 5, + "stops": { + "1": ["90-1-28745"], + "0": ["90-0-28746"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/93.json b/common/constants/bus_constants/93.json new file mode 100644 index 000000000..24168c62f --- /dev/null +++ b/common/constants/bus_constants/93.json @@ -0,0 +1,61 @@ +{ + "93": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Sullivan Square", + "branches": null, + "station": "sull", + "order": 1, + "stops": { + "1": ["93-1-29010"], + "0": ["93-0-29001"] + } + }, + { + "stop_name": "Main Street @ Bunker Hill Street", + "branches": null, + "station": "mnbnk", + "order": 2, + "stops": { + "1": ["93-1-2844"], + "0": ["93-0-2867"] + } + }, + { + "stop_name": "City Square", + "branches": null, + "station": "ctysq", + "order": 3, + "stops": { + "1": ["93-1-12829", "93-1-2855"], + "0": ["93-0-12836"] + } + }, + { + "stop_name": "Haymarket", + "branches": null, + "station": "hayms", + "order": 4, + "stops": { + "1": ["93-1-117", "93-1-83091"], + "0": ["93-0-117"] + } + }, + { + "stop_name": "Milk & Devonshire Street", + "branches": null, + "station": "milk", + "order": 5, + "stops": { + "1": ["93-1-6548"], + "0": ["93-0-6548"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/94.json b/common/constants/bus_constants/94.json new file mode 100644 index 000000000..b225d8167 --- /dev/null +++ b/common/constants/bus_constants/94.json @@ -0,0 +1,71 @@ +{ + "94": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Medford Square", + "branches": null, + "station": "medfd", + "order": 1, + "stops": { + "1": ["94-1-45002"], + "0": ["94-0-45002"] + } + }, + { + "stop_name": "Winthrop Circle", + "branches": null, + "station": "wicir", + "order": 2, + "stops": { + "1": ["94-1-5005"], + "0": ["94-0-6322"] + } + }, + { + "stop_name": "Boston Street @ High Street", + "branches": null, + "station": "boshi", + "order": 3, + "stops": { + "1": ["94-1-3513"], + "0": ["94-0-2418"] + } + }, + { + "stop_name": "North Street", + "branches": null, + "station": "nostr", + "order": 4, + "stops": { + "1": ["94-1-2374"], + "0": ["94-0-2412"] + } + }, + { + "stop_name": "Powder House", + "branches": null, + "station": "powdr", + "order": 5, + "stops": { + "1": ["94-1-2381"], + "0": ["94-0-2405"] + } + }, + { + "stop_name": "Davis", + "branches": null, + "station": "davis", + "order": 6, + "stops": { + "1": ["94-1-5104"], + "0": ["94-0-5104"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/95.json b/common/constants/bus_constants/95.json new file mode 100644 index 000000000..3862aa038 --- /dev/null +++ b/common/constants/bus_constants/95.json @@ -0,0 +1,71 @@ +{ + "95": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Arlington Center", + "branches": null, + "station": "arlct", + "order": 1, + "stops": { + "1": ["95-1-2362"], + "0": ["95-0-2362"] + } + }, + { + "stop_name": "Playstead Road", + "branches": null, + "station": "plast", + "order": 1, + "stops": { + "1": ["95-1-6310"], + "0": ["95-0-6310"] + } + }, + { + "stop_name": "High Street @ Harvard Avenue", + "branches": null, + "station": "hihar", + "order": 2, + "stops": { + "1": ["95-1-16316"], + "0": ["95-0-16305"] + } + }, + { + "stop_name": "Winthrop Circle", + "branches": null, + "station": "wicir", + "order": 3, + "stops": { + "1": ["95-1-6322"], + "0": ["95-0-5005"] + } + }, + { + "stop_name": "Medford Square", + "branches": null, + "station": "medfd", + "order": 4, + "stops": { + "1": ["95-1-5031", "95-1-63241"], + "0": ["95-0-5002", "95-0-63241"] + } + }, + { + "stop_name": "Sullivan Square", + "branches": null, + "station": "sull", + "order": 5, + "stops": { + "1": ["95-1-29001"], + "0": ["95-0-29003"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/96.json b/common/constants/bus_constants/96.json new file mode 100644 index 000000000..ca5417521 --- /dev/null +++ b/common/constants/bus_constants/96.json @@ -0,0 +1,91 @@ +{ + "96": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Medford Square", + "branches": null, + "station": "medfd", + "order": 1, + "stops": { + "1": ["96-1-45002"], + "0": ["96-0-45002"] + } + }, + { + "stop_name": "Main Street @ George Street (Medford)", + "branches": null, + "station": "mngrg", + "order": 2, + "stops": { + "1": ["96-1-5034"], + "0": ["96-0-5040"] + } + }, + { + "stop_name": "Boston Street @ Winthrop Street", + "branches": null, + "station": "bowin", + "order": 3, + "stops": { + "1": ["96-1-2376"], + "0": ["96-0-2410"] + } + }, + { + "stop_name": "Powder House", + "branches": null, + "station": "powdr", + "order": 4, + "stops": { + "1": ["96-1-2381"], + "0": ["96-0-2405"] + } + }, + { + "stop_name": "Davis", + "branches": null, + "station": "davis", + "order": 5, + "stops": { + "1": ["96-1-5015"], + "0": ["96-0-5104"] + } + }, + { + "stop_name": "Porter Square", + "branches": null, + "station": "portr", + "order": 6, + "stops": { + "1": ["96-1-12301"], + "0": ["96-0-23151"] + } + }, + { + "stop_name": "Cambridge Common Loop", + "branches": null, + "station": "hloop", + "order": 7, + "stops": { + "1": ["96-1-2307"], + "0": ["96-0-2310"] + } + }, + { + "stop_name": "Harvard Bus Tunnels", + "branches": null, + "station": "bally", + "order": 8, + "stops": { + "1": ["96-1-32549"], + "0": ["96-0-20761"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/97.json b/common/constants/bus_constants/97.json new file mode 100644 index 000000000..70bd309d9 --- /dev/null +++ b/common/constants/bus_constants/97.json @@ -0,0 +1,61 @@ +{ + "97": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Malden Center Station", + "branches": null, + "station": "malst", + "order": 1, + "stops": { + "1": ["97-1-5327"], + "0": ["97-0-5327"] + } + }, + { + "stop_name": "Medford Street @ Main Street", + "branches": null, + "station": "mfdmn", + "order": 2, + "stops": { + "1": ["97-1-45331"], + "0": ["97-0-45413"] + } + }, + { + "stop_name": "Everett Square", + "branches": null, + "station": "evrtc", + "order": 3, + "stops": { + "1": ["97-1-5496"], + "0": ["97-0-5695"] + } + }, + { + "stop_name": "Sweester Circle", + "branches": null, + "station": "sweet", + "order": 4, + "stops": { + "1": ["97-1-5560"], + "0": ["97-0-5565"] + } + }, + { + "stop_name": "Wellington Station", + "branches": null, + "station": "welst", + "order": 5, + "stops": { + "1": ["97-1-5271"], + "0": ["97-0-5271"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/99.json b/common/constants/bus_constants/99.json new file mode 100644 index 000000000..e71868155 --- /dev/null +++ b/common/constants/bus_constants/99.json @@ -0,0 +1,71 @@ +{ + "99": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Upper Highland", + "branches": null, + "station": "uphgh", + "order": 1, + "stops": { + "1": ["99-1-15058"], + "0": ["99-0-15058"] + } + }, + { + "stop_name": "Glen Ridge Nursing Home", + "branches": null, + "station": "glrdg", + "order": 2, + "stops": { + "1": ["99-1-5080"], + "0": ["99-0-5080"] + } + }, + { + "stop_name": "Malden Center Station", + "branches": null, + "station": "malst", + "order": 3, + "stops": { + "1": ["99-1-5327"], + "0": ["99-0-5072"] + } + }, + { + "stop_name": "Main Street @ Cross Street", + "branches": null, + "station": "mncrs", + "order": 4, + "stops": { + "1": ["99-1-5449"], + "0": ["99-0-5451"] + } + }, + { + "stop_name": "Sweester Circle", + "branches": null, + "station": "sweet", + "order": 5, + "stops": { + "1": ["99-1-5404"], + "0": ["99-0-5405"] + } + }, + { + "stop_name": "Wellington Station", + "branches": null, + "station": "welst", + "order": 6, + "stops": { + "1": ["99-1-5271"], + "0": ["99-0-5271"] + } + } + ] + } +} diff --git a/common/constants/dates.ts b/common/constants/dates.ts index 47e2d7719..4147de474 100644 --- a/common/constants/dates.ts +++ b/common/constants/dates.ts @@ -35,7 +35,7 @@ export const THREE_MONTHS_AGO_STRING = TODAY.subtract(90, 'days').format(DATE_FO const OVERVIEW_TRAIN_MIN_DATE = '2016-02-01'; const TRAIN_MIN_DATE = '2016-01-15'; const BUS_MIN_DATE = '2018-08-01'; -export const BUS_MAX_DATE = '2024-05-31'; +export const BUS_MAX_DATE = '2024-06-30'; export const BUS_MAX_DAY = dayjs(BUS_MAX_DATE); export const BUS_MAX_DATE_MINUS_ONE_WEEK = dayjs(BUS_MAX_DATE) .subtract(7, 'days') diff --git a/common/constants/stations.ts b/common/constants/stations.ts index 2e8ad80e8..40e59b634 100644 --- a/common/constants/stations.ts +++ b/common/constants/stations.ts @@ -4,31 +4,61 @@ import type { LineMap } from '../types/stations'; import stations_json from './stations.json'; import bus_1 from './bus_constants/1.json'; import bus_4 from './bus_constants/4.json'; +import bus_7 from './bus_constants/7.json'; +import bus_8 from './bus_constants/8.json'; import bus_9 from './bus_constants/9.json'; +import bus_10 from './bus_constants/10.json'; +import bus_11 from './bus_constants/11.json'; +import bus_14 from './bus_constants/14.json'; import bus_15 from './bus_constants/15.json'; import bus_16 from './bus_constants/16.json'; import bus_17_19 from './bus_constants/17-19.json'; +import bus_18 from './bus_constants/18.json'; import bus_21 from './bus_constants/21.json'; import bus_22 from './bus_constants/22.json'; import bus_23 from './bus_constants/23.json'; +import bus_26 from './bus_constants/26.json'; import bus_28 from './bus_constants/28.json'; +import bus_29 from './bus_constants/29.json'; +import bus_30 from './bus_constants/30.json'; +import bus_31 from './bus_constants/31.json'; import bus_32 from './bus_constants/32.json'; import bus_34 from './bus_constants/34.json'; +import bus_35 from './bus_constants/35.json'; +import bus_36 from './bus_constants/36.json'; +import bus_37 from './bus_constants/37.json'; +import bus_38 from './bus_constants/38.json'; import bus_39 from './bus_constants/39.json'; import bus_41 from './bus_constants/41.json'; +import bus_42 from './bus_constants/42.json'; +import bus_43 from './bus_constants/43.json'; +import bus_44 from './bus_constants/44.json'; import bus_45 from './bus_constants/45.json'; import bus_47 from './bus_constants/47.json'; +import bus_51 from './bus_constants/51.json'; import bus_55 from './bus_constants/55.json'; import bus_57 from './bus_constants/57.json'; import bus_66 from './bus_constants/66.json'; +import bus_69 from './bus_constants/69.json'; import bus_71 from './bus_constants/71.json'; import bus_73 from './bus_constants/73.json'; import bus_77 from './bus_constants/77.json'; +import bus_80 from './bus_constants/80.json'; +import bus_83 from './bus_constants/83.json'; import bus_85 from './bus_constants/85.json'; import bus_86 from './bus_constants/86.json'; +import bus_87 from './bus_constants/87.json'; +import bus_88 from './bus_constants/88.json'; import bus_89 from './bus_constants/89.json'; +import bus_90 from './bus_constants/90.json'; import bus_91 from './bus_constants/91.json'; import bus_92 from './bus_constants/92.json'; +import bus_93 from './bus_constants/93.json'; +import bus_94 from './bus_constants/94.json'; +import bus_95 from './bus_constants/95.json'; +import bus_96 from './bus_constants/96.json'; +import bus_97 from './bus_constants/97.json'; +import bus_99 from './bus_constants/99.json'; import bus_111 from './bus_constants/111.json'; import bus_104_109 from './bus_constants/104-109.json'; import bus_61_70_170 from './bus_constants/61-70-170.json'; @@ -41,31 +71,61 @@ export const rtStations: { [key in Exclude]: export const busStations: { [key: string]: LineMap } = { ...bus_1, ...bus_4, + ...bus_7, + ...bus_8, ...bus_9, + ...bus_10, + ...bus_11, + ...bus_14, ...bus_15, ...bus_16, ...bus_17_19, + ...bus_18, ...bus_21, ...bus_22, ...bus_23, + ...bus_26, ...bus_28, + ...bus_29, + ...bus_30, + ...bus_31, ...bus_32, ...bus_34, + ...bus_35, + ...bus_36, + ...bus_37, + ...bus_38, ...bus_39, ...bus_41, + ...bus_42, + ...bus_43, + ...bus_44, ...bus_45, ...bus_47, + ...bus_51, ...bus_55, ...bus_57, ...bus_66, + ...bus_69, ...bus_71, ...bus_73, ...bus_77, + ...bus_80, + ...bus_83, ...bus_85, ...bus_86, + ...bus_87, + ...bus_88, ...bus_89, + ...bus_90, ...bus_91, ...bus_92, + ...bus_93, + ...bus_94, + ...bus_95, + ...bus_96, + ...bus_97, + ...bus_99, ...bus_111, ...bus_104_109, ...bus_61_70_170, diff --git a/common/types/lines.ts b/common/types/lines.ts index bb1ed7a1d..8be3caa07 100644 --- a/common/types/lines.ts +++ b/common/types/lines.ts @@ -12,31 +12,61 @@ export type LinePath = 'red' | 'orange' | 'green' | 'blue' | 'bus' | 'commuter-r export type BusRoute = | '1' | '4' + | '7' + | '8' | '9' + | '10' + | '11' + | '14' | '15' | '16' | '17/19' + | '18' | '21' | '22' | '23' + | '26' | '28' + | '29' + | '30' + | '31' | '32' | '34' + | '35' + | '36' + | '37' + | '38' | '39' | '41' + | '42' + | '43' + | '44' | '45' | '47' + | '51' | '55' | '57' | '66' + | '69' | '71' | '73' | '77' + | '80' + | '83' | '85' | '86' + | '87' + | '88' | '89' + | '90' | '91' | '92' + | '93' + | '94' + | '95' + | '96' + | '97' + | '99' | '111' | '61/70/170' | '104/109' @@ -105,30 +135,60 @@ export const RAIL_LINES = ['red', 'orange', 'green', 'blue']; export const BUS_ROUTES: BusRoute[] = [ '1', '4', + '7', + '8', '9', + '10', + '11', + '14', '15', '16', + '18', '21', '22', '23', + '26', '28', + '29', + '30', + '31', '32', '34', + '35', + '36', + '37', + '38', '39', '41', + '42', + '43', + '44', '45', '47', + '51', '55', '57', '66', + '69', '71', '73', '77', + '80', + '83', '85', '86', + '87', + '88', '89', + '90', '91', '92', + '93', + '94', + '95', + '96', + '97', + '99', '111', '17/19', '61/70/170', diff --git a/server/bus/bus2train.py b/server/bus/bus2train.py index e8adf9dab..e144cac6e 100644 --- a/server/bus/bus2train.py +++ b/server/bus/bus2train.py @@ -1,7 +1,6 @@ import argparse import pathlib import pandas as pd -import numpy as np from datetime import datetime from gtfs_archive import add_gtfs_headways @@ -103,8 +102,6 @@ def process_events(df: pd.DataFrame): ) df = add_gtfs_headways(df) - # We can't use headway info for the combined routes since gtfs won't be grouped this way. - df.loc[df.route_id.isin(["114", "116", "117"]), "scheduled_headway"] = np.nan df["vehicle_id"] = "" df["vehicle_label"] = "" diff --git a/server/bus/check_latest_manifests.sh b/server/bus/check_latest_manifests.sh index 545e07f62..b4545f735 100755 --- a/server/bus/check_latest_manifests.sh +++ b/server/bus/check_latest_manifests.sh @@ -2,7 +2,7 @@ newfile=$1 -for i in 1 4 9 15 16 21 22 23 28 32 34 39 41 45 47 55 57 66 71 73 77 85 86 89 91 92 111; do +for i in 1 4 7 8 9 10 11 14 15 16 18 21 22 23 26 28 29 30 31 32 34 35 36 37 38 39 41 42 43 44 45 47 51 55 57 66 69 71 73 77 80 83 85 86 87 88 89 90 91 92 93 94 95 96 97 99 111; do mkdir -p data/output/manifests/ poetry run python manifest.py $newfile data/output/manifests/$i.json --checkpoints data/input/MBTA_GTFS/checkpoints.txt -r $i echo "Comparing old and new manifests for route $i" diff --git a/server/bus/gen_bus_data.sh b/server/bus/gen_bus_data.sh index 0fd713a31..fb161eee6 100755 --- a/server/bus/gen_bus_data.sh +++ b/server/bus/gen_bus_data.sh @@ -2,7 +2,7 @@ routes="$@" if [ -z "$routes" ]; then - routes="1 4 9 15 16 17 19 21 22 23 28 32 34 39 41 45 47 55 57 61 66 70 71 73 77 85 86 89 91 92 104 109 111 114 116 117 170 220 221 222" + routes="1 4 7 8 9 10 11 14 15 16 17 18 19 21 22 23 26 28 29 30 31 32 34 35 36 37 38 39 41 42 43 44 45 47 51 55 57 61 66 69 70 71 73 77 80 83 85 86 87 88 89 90 91 92 93 94 95 96 97 99 104 109 111 114 116 117 170 220 221 222" fi for y in `seq 2018 2024`; do diff --git a/server/bus/gen_manifests.sh b/server/bus/gen_manifests.sh index 3ddfdf56a..5fa39903b 100755 --- a/server/bus/gen_manifests.sh +++ b/server/bus/gen_manifests.sh @@ -1,6 +1,6 @@ #!/bin/bash -for route in 1 9 15 16 22 23 28 32 39 57 66 71 73 77 111 114 116 117 220 221 222; do +for route in 1 4 7 8 9 10 11 14 15 16 17 18 19 21 22 23 26 28 29 30 31 32 34 35 36 37 38 39 41 42 43 44 45 47 51 55 57 61 66 69 70 71 73 77 80 83 85 86 87 88 89 90 91 92 93 94 95 96 97 99 104 109 111 114 116 117 170 220 221 222; do mkdir -p data/output/manifests/$route for f in $(find data/input/ -name *.csv); do diff --git a/server/bus/gen_stop_list.sh b/server/bus/gen_stop_list.sh new file mode 100755 index 000000000..cc14ca6fa --- /dev/null +++ b/server/bus/gen_stop_list.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +for route in 1 4 7 8 9 10 11 14 15 16 18 21 22 23 26 28 29 30 31 32 34 35 36 37 38 39 41 42 43 44 45 47 51 55 57 66 69 71 73 77 80 83 85 86 87 88 89 90 91 92 93 94 95 96 97 99 111; do + for f in $(find data/input/2024/ -name *.csv); do + month=$(echo $f | cut -d/ -f4 | cut -d. -f1) + poetry run python stop_list.py $f --checkpoints "data/input/MBTA_GTFS/checkpoints.txt" -r $route + break 1 + done +done diff --git a/server/bus/stop_list.py b/server/bus/stop_list.py new file mode 100644 index 000000000..1f46c42cf --- /dev/null +++ b/server/bus/stop_list.py @@ -0,0 +1,60 @@ +import argparse +import json +import pandas as pd + +from bus2train import load_data + + +def load_checkpoints(checkpoint_file): + """ + input: path to checkpoints.txt from GTFS + output: dict(checkpoint_id -> station_name) or {} + """ + if checkpoint_file: + chks = pd.read_csv(checkpoint_file, index_col="checkpoint_id").squeeze("columns") + chks.index = chks.index.str.lower() + return chks.str.replace("(Bus)", "", regex=False).str.strip() + else: + return {} + + +def get_stop_ids(df, checkpoint_file): + df["time_point_id"] = df["time_point_id"].str.lower() + df["time_point_order"] = df["time_point_order"].fillna(0) + + tpts = ( + df[["route_id", "stop_id", "time_point_id", "direction_id"]] + .value_counts(dropna=False) + .rename("counts") + .reset_index() + ) + + # use checkpoint file to map time_point_id to stop_name + station_names = load_checkpoints(checkpoint_file) + tpts["stop_name"] = tpts["time_point_id"].map(station_names) + + return tpts + + +def main(): + parser = argparse.ArgumentParser() + + parser.add_argument("input", metavar="INPUT_CSV") + parser.add_argument("--routes", "-r", nargs="+", type=str) + parser.add_argument("--checkpoints", metavar="gtfs_checkpoints.txt") + + args = parser.parse_args() + input_csv = args.input + routes = args.routes + checkpoint_file = args.checkpoints + + data = load_data(input_csv, routes) + stop_ids = get_stop_ids(data, checkpoint_file) + + print(routes[0]) + json_formatted_str = json.dumps(list(set(stop_ids["stop_id"].sort_values().tolist())), indent=2) + print(json_formatted_str) + + +if __name__ == "__main__": + main() diff --git a/server/chalicelib/date_utils.py b/server/chalicelib/date_utils.py index 304db6f73..c411f6443 100644 --- a/server/chalicelib/date_utils.py +++ b/server/chalicelib/date_utils.py @@ -8,7 +8,7 @@ EASTERN_TIME = ZoneInfo("US/Eastern") # The most recent date for which we have monthly data -MAX_MONTH_DATA_DATE = "2024-05-31" +MAX_MONTH_DATA_DATE = "2024-06-30" def get_max_monthly_data_date():