Skip to content

Commit

Permalink
Merge branch 'main' into python3.12-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
devinmatte authored Apr 1, 2024
2 parents 8e158fc + 27df400 commit 210c075
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 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 = '2023-12-31';
export const BUS_MAX_DATE = '2024-02-29';
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
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 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
for y in `seq 2018 2024`; 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
5 changes: 3 additions & 2 deletions 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/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
wget -N -O data/input/2021.zip https://www.arcgis.com/sharing/rest/content/items/2d415555f63b431597721151a7e07a3e/data
Expand All @@ -10,10 +11,10 @@ wget -N -O data/input/2019.zip https://www.arcgis.com/sharing/rest/content/items
wget -N -O data/input/2018.zip https://www.arcgis.com/sharing/rest/content/items/d685ba39d9a54d908f49a2a762a9eb47/data

wget -N -O data/input/gtfs.zip https://cdn.mbta.com/MBTA_GTFS.zip
unzip -d data/input/MBTA_GTFS/ data/input/gtfs.zip
unzip -o -d data/input/MBTA_GTFS/ data/input/gtfs.zip

cd data/input
for i in `seq 2018 2023`; do
for i in `seq 2018 2024`; 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 = "2023-12-31"
MAX_MONTH_DATA_DATE = "2024-02-29"


def parse_event_date(date_str: str):
Expand Down

0 comments on commit 210c075

Please sign in to comment.