Skip to content

Commit

Permalink
Support all new data
Browse files Browse the repository at this point in the history
  • Loading branch information
devinmatte committed Jun 10, 2024
1 parent 435411e commit 95886c5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion common/constants/dates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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-03-31';
export const BUS_MAX_DATE = '2024-04-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')
Expand Down
2 changes: 1 addition & 1 deletion server/bus/check_latest_manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

newfile=$1

for i in 1 4 9 10 11 14 15 16 18 21 22 23 26 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"
Expand Down
2 changes: 1 addition & 1 deletion server/bus/gen_bus_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

routes="$@"
if [ -z "$routes" ]; then
routes="1 4 9 10 11 14 15 16 17 18 19 21 22 23 26 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
Expand Down
2 changes: 1 addition & 1 deletion server/bus/gen_manifests.sh
Original file line number Diff line number Diff line change
@@ -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 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 114 116 117 220 221 222; do
mkdir -p data/output/manifests/$route

for f in $(find data/input/ -name *.csv); do
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,6 +1,6 @@
#!/bin/bash

for route in 29 30 31 35 36 37 38; do
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
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-03-31"
MAX_MONTH_DATA_DATE = "2024-04-30"


def get_max_monthly_data_date():
Expand Down

0 comments on commit 95886c5

Please sign in to comment.