From c17003c61e06293085e1a829de3b73187c13a376 Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Thu, 11 Jan 2024 14:01:06 -0500 Subject: [PATCH] Adding more bus routes to the dashboard! (#934) * Adding more bus routes to the dashboard! * Add missing stop ids * Adding missing stop ids --- common/constants/baselines.ts | 14 ++- common/constants/bus_constants/104-109.json | 91 ++++++++++++++++ common/constants/bus_constants/111.json | 4 +- common/constants/bus_constants/16.json | 4 +- common/constants/bus_constants/17-19.json | 14 +-- common/constants/bus_constants/21.json | 4 +- .../constants/bus_constants/220-221-222.json | 8 +- common/constants/bus_constants/34.json | 10 +- common/constants/bus_constants/39.json | 2 +- common/constants/bus_constants/4.json | 81 ++++++++++++++ common/constants/bus_constants/41.json | 101 ++++++++++++++++++ common/constants/bus_constants/45.json | 81 ++++++++++++++ common/constants/bus_constants/47.json | 2 +- common/constants/bus_constants/55.json | 51 +++++++++ common/constants/bus_constants/61-70-170.json | 10 +- common/constants/bus_constants/85.json | 41 +++++++ common/constants/bus_constants/9.json | 4 +- common/constants/bus_constants/91.json | 51 +++++++++ common/constants/bus_constants/92.json | 61 +++++++++++ common/constants/stations.ts | 16 +++ common/types/lines.ts | 24 +++++ common/utils/stations.ts | 1 + server/bus/check_latest_manifests.sh | 2 +- server/bus/gen_bus_data.sh | 2 +- 24 files changed, 645 insertions(+), 34 deletions(-) create mode 100644 common/constants/bus_constants/104-109.json create mode 100644 common/constants/bus_constants/4.json create mode 100644 common/constants/bus_constants/41.json create mode 100644 common/constants/bus_constants/45.json create mode 100644 common/constants/bus_constants/55.json create mode 100644 common/constants/bus_constants/85.json create mode 100644 common/constants/bus_constants/91.json create mode 100644 common/constants/bus_constants/92.json diff --git a/common/constants/baselines.ts b/common/constants/baselines.ts index da5782a94..1eed84ff2 100644 --- a/common/constants/baselines.ts +++ b/common/constants/baselines.ts @@ -1,3 +1,5 @@ +import type { BusRouteId, Line } from '../types/lines'; + // These are manually chosen based off the peak *monthly* scheduled service. Selecting highest value " export const PEAK_SCHEDULED_SERVICE = { 'line-red': 223, @@ -17,12 +19,15 @@ export const PEAK_SPEED = { }; // These are manually chosen based off the peak value. Need to be updated when all data is generated. -export const PEAK_RIDERSHIP = { +export const PEAK_RIDERSHIP: { + [key in Exclude | BusRouteId | 'DEFAULT']: number; +} = { 'line-red': 213703, 'line-orange': 169578, 'line-blue': 60129, 'line-green': 87148, '1': 15272, + '4': 850, '9': 7116, '15': 6379, '16': 6197, @@ -34,15 +39,22 @@ export const PEAK_RIDERSHIP = { '32': 10982, '34': 6674, '39': 11792, + '41': 2119, + '45': 3310, '47': 5955, + '55': 816, '57': 11284, '6170170': 6988, '66': 14505, '71': 5789, '73': 6616, '77': 8015, + '85': 1189, '86': 6850, '89': 3963, + '91': 1942, + '92': 1459, + '104109': 8163, '111': 11258, '114116117': 12867, '220221222': 3370, diff --git a/common/constants/bus_constants/104-109.json b/common/constants/bus_constants/104-109.json new file mode 100644 index 000000000..9fe24209c --- /dev/null +++ b/common/constants/bus_constants/104-109.json @@ -0,0 +1,91 @@ +{ + "104/109": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Linden Square (Malden)", + "branches": ["109"], + "station": "lindn", + "order": 1, + "stops": { + "1": ["109-1-7412"], + "0": ["109-0-7412", "109-0-7417"] + } + }, + { + "stop_name": "Malden Center Station", + "branches": ["104"], + "station": "malst", + "order": 1, + "stops": { + "1": ["104-1-53270"], + "0": ["104-0-53270"] + } + }, + { + "stop_name": "Broadway Plaza @ Broadway", + "branches": ["109"], + "station": "brypl", + "order": 2, + "stops": { + "1": ["109-1-5481"], + "0": ["109-0-5524"] + } + }, + { + "stop_name": "Ferry St @ Cross St", + "branches": ["104"], + "station": "fercr", + "order": 2, + "stops": { + "1": ["104-1-5347"], + "0": ["104-0-5361"] + } + }, + { + "stop_name": "Glendale Square", + "branches": ["104", "109"], + "station": "glndl", + "order": 3, + "stops": { + "1": ["104-1-5354", "109-1-5488"], + "0": ["104-0-5518", "109-0-5518", "104-0-5517", "109-0-5517"] + } + }, + { + "stop_name": "Everett Square", + "branches": ["104", "109"], + "station": "evrtc", + "order": 4, + "stops": { + "1": ["104-1-5496", "109-1-5496"], + "0": ["104-0-5695", "109-0-5695"] + } + }, + { + "stop_name": "Sweester Circle", + "branches": ["104", "109"], + "station": "sweet", + "order": 5, + "stops": { + "1": ["104-1-5560", "109-1-5560"], + "0": ["104-0-5565", "109-0-5565"] + } + }, + { + "stop_name": "Sullivan Square", + "branches": ["104", "109"], + "station": "sull", + "order": 6, + "stops": { + "1": ["104-1-2874", "109-1-2874"], + "0": ["104-0-2874", "109-0-2874"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/111.json b/common/constants/bus_constants/111.json index 3ac70b696..1fe8bbf38 100644 --- a/common/constants/bus_constants/111.json +++ b/common/constants/bus_constants/111.json @@ -17,7 +17,7 @@ } }, { - "stop_name": "Garfield Avenue & Clyde", + "stop_name": "Garfield Ave & Clyde", "branches": null, "station": "garfi", "order": 2, @@ -87,7 +87,7 @@ } }, { - "stop_name": "Rutherford Avenue & Ramp", + "stop_name": "Rutherford Ave & Ramp", "branches": null, "station": "ruthf", "order": 8, diff --git a/common/constants/bus_constants/16.json b/common/constants/bus_constants/16.json index 2660d98c0..cc577b4ca 100644 --- a/common/constants/bus_constants/16.json +++ b/common/constants/bus_constants/16.json @@ -27,7 +27,7 @@ } }, { - "stop_name": "Columbia Road @ Washington Street", + "stop_name": "Columbia Road @ Washington St", "branches": null, "station": "cowas", "order": 3, @@ -37,7 +37,7 @@ } }, { - "stop_name": "Columbia Road @ Quincy Street", + "stop_name": "Columbia Road @ Quincy St", "branches": null, "station": "coqui", "order": 4, diff --git a/common/constants/bus_constants/17-19.json b/common/constants/bus_constants/17-19.json index 47c51eac9..b05083104 100644 --- a/common/constants/bus_constants/17-19.json +++ b/common/constants/bus_constants/17-19.json @@ -17,7 +17,7 @@ } }, { - "stop_name": "Geneva Avenue @ Bowdoin Street", + "stop_name": "Geneva Ave @ Bowdoin St", "branches": ["19"], "station": "genbo", "order": 2, @@ -37,7 +37,7 @@ } }, { - "stop_name": "Geneva Avenue @ Columbia Road", + "stop_name": "Geneva Ave @ Columbia Road", "branches": ["19"], "station": "genco", "order": 3, @@ -57,7 +57,7 @@ } }, { - "stop_name": "Edward Everett Square Columbia @ Massachusetts Avenue", + "stop_name": "Edward Everett Square Columbia @ Massachusetts Ave", "branches": ["17"], "station": "edevt", "order": 4, @@ -87,7 +87,7 @@ } }, { - "stop_name": "Warren Street @ Boston Latin Academy", + "stop_name": "Warren St @ Boston Latin Academy", "branches": ["19"], "station": "latac", "order": 5, @@ -97,7 +97,7 @@ } }, { - "stop_name": "Warren Street @ Walnut Avenue", + "stop_name": "Warren St @ Walnut Ave", "branches": ["19"], "station": "warwl", "order": 6, @@ -117,7 +117,7 @@ } }, { - "stop_name": "Melnea Cass Boulevard @ Washington Street", + "stop_name": "Melnea Cass Boulevard @ Washington St", "branches": ["19"], "station": "melwa", "order": 8, @@ -157,7 +157,7 @@ } }, { - "stop_name": "Brookline Avenue @ Park Drive", + "stop_name": "Brookline Ave @ Park Drive", "branches": ["19"], "station": "brkpk", "order": 12, diff --git a/common/constants/bus_constants/21.json b/common/constants/bus_constants/21.json index c8dac7282..a73737919 100644 --- a/common/constants/bus_constants/21.json +++ b/common/constants/bus_constants/21.json @@ -17,7 +17,7 @@ } }, { - "stop_name": "Dorchester Avenue @ Gallivan Boulevard", + "stop_name": "Dorchester Ave @ Gallivan Boulevard", "branches": null, "station": "dotga", "order": 2, @@ -37,7 +37,7 @@ } }, { - "stop_name": "Morton Street @ Blue Hill Avenue", + "stop_name": "Morton St @ Blue Hill Ave", "branches": null, "station": "mortn", "order": 4, diff --git a/common/constants/bus_constants/220-221-222.json b/common/constants/bus_constants/220-221-222.json index 88feaf0c8..4a3fe4eb7 100644 --- a/common/constants/bus_constants/220-221-222.json +++ b/common/constants/bus_constants/220-221-222.json @@ -37,7 +37,7 @@ } }, { - "stop_name": "Broad Street @ Middle Street", + "stop_name": "Broad St @ Middle St", "branches": ["222"], "station": "brmdl", "order": 3, @@ -47,7 +47,7 @@ } }, { - "stop_name": "Otis Street & Downer Avenue", + "stop_name": "Otis St & Downer Ave", "branches": ["220"], "station": "otdow", "order": 4, @@ -77,7 +77,7 @@ } }, { - "stop_name": "Washington Street @ Southern Artery", + "stop_name": "Washington St @ Southern Artery", "branches": ["220", "221", "222"], "station": "wassa", "order": 7, @@ -87,7 +87,7 @@ } }, { - "stop_name": "McGrath Highway @ Washington Street", + "stop_name": "McGrath Highway @ Washington St", "branches": ["220", "222"], "station": "mgrwa", "order": 8, diff --git a/common/constants/bus_constants/34.json b/common/constants/bus_constants/34.json index 286f8e43d..d421af456 100644 --- a/common/constants/bus_constants/34.json +++ b/common/constants/bus_constants/34.json @@ -7,7 +7,7 @@ }, "stations": [ { - "stop_name": "Dedham Line (Washington Street)", + "stop_name": "Dedham Line (Washington St)", "branches": null, "station": "dline", "order": 1, @@ -27,7 +27,7 @@ } }, { - "stop_name": "Stimson Street @ Washington Street", + "stop_name": "Stimson St @ Washington St", "branches": null, "station": "stims", "order": 2, @@ -37,7 +37,7 @@ } }, { - "stop_name": "Washington Street @ West Boundary Road", + "stop_name": "Washington St @ West Boundary Road", "branches": null, "station": "wawbw", "order": 3, @@ -47,7 +47,7 @@ } }, { - "stop_name": "Washington Street @ LaGrange Street", + "stop_name": "Washington St @ LaGrange St", "branches": null, "station": "walag", "order": 4, @@ -57,7 +57,7 @@ } }, { - "stop_name": "Washington Street @ Metropolitan Avenue", + "stop_name": "Washington St @ Metropolitan Avenue", "branches": null, "station": "wamet", "order": 5, diff --git a/common/constants/bus_constants/39.json b/common/constants/bus_constants/39.json index 419d75678..8970f6e9f 100644 --- a/common/constants/bus_constants/39.json +++ b/common/constants/bus_constants/39.json @@ -37,7 +37,7 @@ } }, { - "stop_name": "Heath Street Loop", + "stop_name": "Heath St Loop", "branches": null, "station": "heath", "order": 4, diff --git a/common/constants/bus_constants/4.json b/common/constants/bus_constants/4.json new file mode 100644 index 000000000..e952dff81 --- /dev/null +++ b/common/constants/bus_constants/4.json @@ -0,0 +1,81 @@ +{ + "4": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "North Station", + "branches": null, + "station": "north", + "order": 1, + "stops": { + "1": ["4-1-113", "4-1-114"], + "0": ["4-0-113", "4-0-114"] + } + }, + { + "stop_name": "Atlantic & State Streets", + "branches": null, + "station": "atlst", + "order": 2, + "stops": { + "1": ["4-1-236"], + "0": ["4-0-224"] + } + }, + { + "stop_name": "Haymarket", + "branches": null, + "station": "hayms", + "order": 2, + "stops": { + "1": ["4-1-30203", "4-1-83091"], + "0": ["4-0-117"] + } + }, + { + "stop_name": "South Station", + "branches": null, + "station": "sosta", + "order": 3, + "stops": { + "1": ["4-1-6564"], + "0": ["4-0-892"] + } + }, + { + "stop_name": "Seaport Boulevard @ Sleeper St", + "branches": null, + "station": "seasl", + "order": 4, + "stops": { + "1": ["4-1-21599"], + "0": ["4-0-11599"] + } + }, + { + "stop_name": "World Trade Center", + "branches": null, + "station": "trade", + "order": 5, + "stops": { + "1": ["4-1-242", "4-1-243"], + "0": ["4-0-214"] + } + }, + { + "stop_name": "Drydock Avenue @ Design Center Place", + "branches": null, + "station": "drdck", + "order": 6, + "stops": { + "1": ["4-1-210", "4-1-31255"], + "0": ["4-0-210", "4-0-31255"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/41.json b/common/constants/bus_constants/41.json new file mode 100644 index 000000000..a2631dafd --- /dev/null +++ b/common/constants/bus_constants/41.json @@ -0,0 +1,101 @@ +{ + "41": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Jamaica Plain Center (Monument)", + "branches": null, + "station": "jpctr", + "order": 1, + "stops": { + "1": ["41-1-11939"], + "0": ["41-0-1939"] + } + }, + { + "stop_name": "Centre St & South Huntington Ave", + "branches": null, + "station": "shunt", + "order": 2, + "stops": { + "1": ["41-1-11131"], + "0": ["41-0-11609", "41-0-1160"] + } + }, + { + "stop_name": "Jackson Square Station", + "branches": null, + "station": "jasst", + "order": 3, + "stops": { + "1": ["41-1-11531"], + "0": ["41-0-11531"] + } + }, + { + "stop_name": "Nubian Station", + "branches": null, + "station": "nubn", + "order": 4, + "stops": { + "1": ["41-1-64000"], + "0": ["41-0-64000"] + } + }, + { + "stop_name": "Blue Hill Ave @ Dudley St", + "branches": null, + "station": "bhdud", + "order": 5, + "stops": { + "1": ["41-1-1497"], + "0": ["41-0-1486"] + } + }, + { + "stop_name": "Uphams Corner", + "branches": null, + "station": "upham", + "order": 6, + "stops": { + "1": ["41-1-2933"], + "0": ["41-0-2910"] + } + }, + { + "stop_name": "Edward Everett Square Columbia @ Massachusetts Ave", + "branches": null, + "station": "edevt", + "order": 7, + "stops": { + "1": ["41-1-2935"], + "0": ["41-0-123"] + } + }, + { + "stop_name": "Columbia Road @ Dorchester Ave", + "branches": null, + "station": "coldt", + "order": 8, + "stops": { + "1": ["41-1-136"], + "0": ["41-0-122"] + } + }, + { + "stop_name": "JFK/UMass", + "branches": null, + "station": "jfk", + "order": 9, + "stops": { + "1": ["41-1-121"], + "0": ["41-0-121"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/45.json b/common/constants/bus_constants/45.json new file mode 100644 index 000000000..b6f76b6d3 --- /dev/null +++ b/common/constants/bus_constants/45.json @@ -0,0 +1,81 @@ +{ + "45": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Franklin Park", + "branches": null, + "station": "frnpk", + "order": 1, + "stops": { + "1": ["45-1-1565", "45-1-383"], + "0": ["45-0-1565", "45-0-415"] + } + }, + { + "stop_name": "Grove Hall", + "branches": null, + "station": "ghall", + "order": 2, + "stops": { + "1": ["45-1-1566"], + "0": ["45-0-1586"] + } + }, + { + "stop_name": "Blue Hill Ave @ Quincy St", + "branches": null, + "station": "bhqui", + "order": 3, + "stops": { + "1": ["45-1-1569"], + "0": ["45-0-1583"] + } + }, + { + "stop_name": "Blue Hill Ave @ Dudley St", + "branches": null, + "station": "bhdud", + "order": 4, + "stops": { + "1": ["45-1-1576"], + "0": ["45-0-1577"] + } + }, + { + "stop_name": "Nubian Station", + "branches": null, + "station": "nubn", + "order": 5, + "stops": { + "1": ["45-1-64000"], + "0": ["45-0-64000"] + } + }, + { + "stop_name": "Roxbury Crossing Station", + "branches": null, + "station": "roxbs", + "order": 6, + "stops": { + "1": ["45-1-21148"], + "0": ["45-0-11257"] + } + }, + { + "stop_name": "Ruggles", + "branches": null, + "station": "rugg", + "order": 7, + "stops": { + "1": ["45-1-17861"], + "0": ["45-0-17863"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/47.json b/common/constants/bus_constants/47.json index dce844139..6ff1edda5 100644 --- a/common/constants/bus_constants/47.json +++ b/common/constants/bus_constants/47.json @@ -17,7 +17,7 @@ } }, { - "stop_name": "Mountfort Street @ Commonwealth Avenue", + "stop_name": "Mountfort St @ Commonwealth Ave", "branches": null, "station": "mount", "order": 2, diff --git a/common/constants/bus_constants/55.json b/common/constants/bus_constants/55.json new file mode 100644 index 000000000..c949a12b5 --- /dev/null +++ b/common/constants/bus_constants/55.json @@ -0,0 +1,51 @@ +{ + "55": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Jersey & Queensberry", + "branches": null, + "station": "jqnsb", + "order": 1, + "stops": { + "1": ["55-1-1926"], + "0": ["55-0-1926"] + } + }, + { + "stop_name": "Massachusetts Ave & Boylston St", + "branches": null, + "station": "maboy", + "order": 2, + "stops": { + "1": ["55-1-1932", "55-1-1931"], + "0": ["55-0-11391"] + } + }, + { + "stop_name": "Saint James Ave @ Dartmouth St", + "branches": null, + "station": "stjim", + "order": 3, + "stops": { + "1": ["55-1-178"], + "0": ["55-0-178"] + } + }, + { + "stop_name": "Park Street", + "branches": null, + "station": "pktrm", + "order": 4, + "stops": { + "1": ["55-1-10000"], + "0": ["55-0-10000"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/61-70-170.json b/common/constants/bus_constants/61-70-170.json index be19421e2..d1fbde749 100644 --- a/common/constants/bus_constants/61-70-170.json +++ b/common/constants/bus_constants/61-70-170.json @@ -17,13 +17,13 @@ } }, { - "stop_name": "Lincoln Street @ Silver Hill Lane", + "stop_name": "Lincoln St @ Silver Hill Lane", "branches": ["61"], "station": "linsh", "order": 1, "stops": { - "1": ["61-1-7784"], - "0": ["61-0-7784"] + "1": ["61-1-7784", "61-1-7783"], + "0": ["61-0-7784", "61-0-7783"] } }, { @@ -47,7 +47,7 @@ } }, { - "stop_name": "Totten Pond Road @ Third Avenue", + "stop_name": "Totten Pond Road @ Third Ave", "branches": ["61"], "station": "tpthd", "order": 2, @@ -87,7 +87,7 @@ } }, { - "stop_name": "Western Avenue @ North Harvard", + "stop_name": "Western Ave @ North Harvard", "branches": ["70"], "station": "wnhvd", "order": 6, diff --git a/common/constants/bus_constants/85.json b/common/constants/bus_constants/85.json new file mode 100644 index 000000000..98a0d50d5 --- /dev/null +++ b/common/constants/bus_constants/85.json @@ -0,0 +1,41 @@ +{ + "85": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Bow Street (Somerville)", + "branches": null, + "station": "bwsvl", + "order": 1, + "stops": { + "1": ["85-1-2574", "85-1-2519"], + "0": ["85-0-2574", "85-0-2519"] + } + }, + { + "stop_name": "Union Square", + "branches": null, + "station": "unsqu", + "order": 2, + "stops": { + "1": ["85-1-2510"], + "0": ["85-0-2528"] + } + }, + { + "stop_name": "Kendall Station (Busway)", + "branches": null, + "station": "kndl", + "order": 3, + "stops": { + "1": ["85-1-2231"], + "0": ["85-0-2231"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/9.json b/common/constants/bus_constants/9.json index da6c94b87..d10f10e14 100644 --- a/common/constants/bus_constants/9.json +++ b/common/constants/bus_constants/9.json @@ -17,7 +17,7 @@ } }, { - "stop_name": "L Street @ Broadway", + "stop_name": "L St @ Broadway", "branches": null, "station": "lbrwy", "order": 2, @@ -47,7 +47,7 @@ } }, { - "stop_name": "Silver Line @ Washington Street", + "stop_name": "Silver Line @ Washington St", "branches": null, "station": "slvwa", "order": 5, diff --git a/common/constants/bus_constants/91.json b/common/constants/bus_constants/91.json new file mode 100644 index 000000000..796150a2d --- /dev/null +++ b/common/constants/bus_constants/91.json @@ -0,0 +1,51 @@ +{ + "91": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Sullivan Square", + "branches": null, + "station": "sull", + "order": 1, + "stops": { + "1": ["91-1-28741", "91-1-29006"], + "0": ["91-0-2874", "91-0-29001"] + } + }, + { + "stop_name": "Union Square", + "branches": null, + "station": "unsqu", + "order": 2, + "stops": { + "1": ["91-1-2612"], + "0": ["91-0-2597", "91-0-2531"] + } + }, + { + "stop_name": "Inman Square", + "branches": null, + "station": "inman", + "order": 3, + "stops": { + "1": ["91-1-2439", "91-1-12439"], + "0": ["91-0-2451", "91-0-12451"] + } + }, + { + "stop_name": "Central Square (Cambridge)", + "branches": null, + "station": "cntsq", + "order": 4, + "stops": { + "1": ["91-1-1060"], + "0": ["91-0-1060"] + } + } + ] + } +} diff --git a/common/constants/bus_constants/92.json b/common/constants/bus_constants/92.json new file mode 100644 index 000000000..15b10e97b --- /dev/null +++ b/common/constants/bus_constants/92.json @@ -0,0 +1,61 @@ +{ + "92": { + "type": "bus", + "direction": { + "0": "outbound", + "1": "inbound" + }, + "stations": [ + { + "stop_name": "Sullivan Square", + "branches": null, + "station": "sull", + "order": 1, + "stops": { + "1": ["92-1-28741", "92-1-29009"], + "0": ["92-0-2874", "92-0-29001"] + } + }, + { + "stop_name": "Main St @ Bunker Hill St", + "branches": null, + "station": "mnbnk", + "order": 2, + "stops": { + "1": ["92-1-2821"], + "0": ["92-0-32840"] + } + }, + { + "stop_name": "City Square", + "branches": null, + "station": "ctysq", + "order": 3, + "stops": { + "1": ["92-1-28281"], + "0": ["92-0-2835"] + } + }, + { + "stop_name": "Haymarket", + "branches": null, + "station": "hayms", + "order": 4, + "stops": { + "1": ["92-1-117", "92-1-30203", "92-1-83091"], + "0": ["92-0-117"] + } + }, + { + "stop_name": "Milk & Devonshire St", + "branches": null, + "station": "milk", + "order": 5, + "stops": { + "1": ["92-1-6548"], + "0": ["92-0-6548"] + } + } + ] + } +} diff --git a/common/constants/stations.ts b/common/constants/stations.ts index 123f5a533..3593d4847 100644 --- a/common/constants/stations.ts +++ b/common/constants/stations.ts @@ -3,6 +3,7 @@ import type { LineShort } from '../types/lines'; 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_9 from './bus_constants/9.json'; import bus_15 from './bus_constants/15.json'; import bus_16 from './bus_constants/16.json'; @@ -14,15 +15,22 @@ import bus_28 from './bus_constants/28.json'; import bus_32 from './bus_constants/32.json'; import bus_34 from './bus_constants/34.json'; import bus_39 from './bus_constants/39.json'; +import bus_41 from './bus_constants/41.json'; +import bus_45 from './bus_constants/45.json'; import bus_47 from './bus_constants/47.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_71 from './bus_constants/71.json'; import bus_73 from './bus_constants/73.json'; import bus_77 from './bus_constants/77.json'; +import bus_85 from './bus_constants/85.json'; import bus_86 from './bus_constants/86.json'; import bus_89 from './bus_constants/89.json'; +import bus_91 from './bus_constants/91.json'; +import bus_92 from './bus_constants/92.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'; import bus_114_116_117 from './bus_constants/114-116-117.json'; import bus_220_221_222 from './bus_constants/220-221-222.json'; @@ -32,6 +40,7 @@ export const rtStations: { [key in Exclude]: export const busStations: { [key: string]: LineMap } = { ...bus_1, + ...bus_4, ...bus_9, ...bus_15, ...bus_16, @@ -43,15 +52,22 @@ export const busStations: { [key: string]: LineMap } = { ...bus_32, ...bus_34, ...bus_39, + ...bus_41, + ...bus_45, ...bus_47, + ...bus_55, ...bus_57, ...bus_66, ...bus_71, ...bus_73, ...bus_77, + ...bus_85, ...bus_86, ...bus_89, + ...bus_91, + ...bus_92, ...bus_111, + ...bus_104_109, ...bus_61_70_170, ...bus_114_116_117, ...bus_220_221_222, diff --git a/common/types/lines.ts b/common/types/lines.ts index 14095473d..2ac419093 100644 --- a/common/types/lines.ts +++ b/common/types/lines.ts @@ -11,6 +11,7 @@ export type LinePath = 'red' | 'orange' | 'green' | 'blue' | 'bus' | 'commuter-r /** All currently available Bus Routes */ export type BusRoute = | '1' + | '4' | '9' | '15' | '16' @@ -22,19 +23,34 @@ export type BusRoute = | '32' | '34' | '39' + | '41' + | '45' | '47' + | '55' | '57' | '66' | '71' | '73' | '77' + | '85' | '86' | '89' + | '91' + | '92' | '111' | '61/70/170' + | '104/109' | '114/116/117' | '220/221/222'; +export type BusRouteId = + | Exclude + | '1719' + | '6170170' + | '104109' + | '114116117' + | '220221222'; + export type CommuterRailRoute = | 'CR-Fitchburg' | 'CR-Franklin' @@ -82,6 +98,7 @@ export const LANDING_RAIL_LINES: Line[] = ['line-red', 'line-orange', 'line-blue export const RAIL_LINES = ['red', 'orange', 'green', 'blue']; export const BUS_ROUTES: BusRoute[] = [ '1', + '4', '9', '15', '16', @@ -92,17 +109,24 @@ export const BUS_ROUTES: BusRoute[] = [ '32', '34', '39', + '41', + '45', '47', + '55', '57', '66', '71', '73', '77', + '85', '86', '89', + '91', + '92', '111', '17/19', '61/70/170', + '104/109', '114/116/117', '220/221/222', ]; diff --git a/common/utils/stations.ts b/common/utils/stations.ts index 1714ec4c8..51a541d32 100644 --- a/common/utils/stations.ts +++ b/common/utils/stations.ts @@ -80,6 +80,7 @@ export const getStationForInvalidFromSelection = (line: Line, busRoute?: BusRout if (busRoute === '17/19') return getParentStationForStopId('17-1-323'); if (busRoute === '220/221/222') return getParentStationForStopId('222-1-32004'); if (busRoute === '61/70/170') return getParentStationForStopId('70-0-88333'); + if (busRoute === '104/109') return getParentStationForStopId('104-1-5560'); } throw new Error('There should be no other lines with invalid from station selections.'); }; diff --git a/server/bus/check_latest_manifests.sh b/server/bus/check_latest_manifests.sh index ac4a39242..545e07f62 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 9 15 16 21 22 23 28 32 34 39 47 57 66 71 73 77 86 89 111; do +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 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 947fb7e83..b925bed88 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 9 15 16 17 19 21 22 23 28 32 34 39 47 57 61 66 70 71 73 77 86 89 104 109 111 114 116 117 170 220 221 222" + 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" fi for y in `seq 2018 2023`; do