Skip to content

Commit

Permalink
Merge branch 'main' into commuter-rail-in-dd
Browse files Browse the repository at this point in the history
  • Loading branch information
devinmatte authored Mar 2, 2025
2 parents 340b542 + db3f2ee commit 5c11f07
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/bus/gen_bus_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ -z "$routes" ]; then
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
for y in `seq 2018 2025`; do
for f in $(find data/input/$y/ -name '*.csv'); do
echo "Generating stop data from $f"
poetry run python bus2train.py $f data/output -r $routes
Expand Down
2 changes: 1 addition & 1 deletion server/bus/gen_stop_list.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/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
for f in $(find data/input/2025/ -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
Expand Down
3 changes: 2 additions & 1 deletion server/bus/setup_bus_input.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

mkdir -p data/input

wget -N -O data/input/2025.zip https://www.arcgis.com/sharing/rest/content/items/924df13d845f4907bb6a6c3ed380d57a/data
wget -N -O data/input/2024.zip https://www.arcgis.com/sharing/rest/content/items/96c77138c3144906bce93d0257531b6a/data
wget -N -O data/input/2023.zip https://www.arcgis.com/sharing/rest/content/items/b7b36fdb7b3a4728af2fccc78c2ca5b7/data
wget -N -O data/input/2022.zip https://www.arcgis.com/sharing/rest/content/items/ef464a75666349f481353f16514c06d0/data
Expand All @@ -14,7 +15,7 @@ wget -N -O data/input/gtfs.zip https://cdn.mbta.com/MBTA_GTFS.zip
unzip -o -d data/input/MBTA_GTFS/ data/input/gtfs.zip

cd data/input
for i in `seq 2018 2024`; do
for i in `seq 2018 2025`; do
unzip -o -d $i $i.zip
done

Expand Down
2 changes: 1 addition & 1 deletion server/chalicelib/date_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
EASTERN_TIME = ZoneInfo("US/Eastern")

# The most recent date for which we have monthly data
MAX_MONTH_DATA_DATE = "2024-12-31"
MAX_MONTH_DATA_DATE = "2025-01-31"


def get_max_monthly_data_date():
Expand Down

0 comments on commit 5c11f07

Please sign in to comment.