From a0f7d9d5a5e857637da6c063f6e3f497c1faf49d Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Sat, 20 Jul 2024 12:11:57 -0400 Subject: [PATCH] Update monthly data up to May 2024 (#992) --- common/constants/dates.ts | 2 +- server/bus/bus2train.py | 2 +- server/chalicelib/date_utils.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/constants/dates.ts b/common/constants/dates.ts index 441c994f1..eb9c5c07e 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-03-31'; +export const BUS_MAX_DATE = '2024-05-31'; 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/server/bus/bus2train.py b/server/bus/bus2train.py index b544f025e..e8adf9dab 100644 --- a/server/bus/bus2train.py +++ b/server/bus/bus2train.py @@ -119,7 +119,7 @@ def to_disk(df: pd.DataFrame, outdir, nozip=False): """ For each service_date/stop_id/direction/route group, we write the events to disk. """ - monthly_service_date = pd.Grouper(key="service_date", freq="1M") + monthly_service_date = pd.Grouper(key="service_date", freq="1ME") grouped = df.groupby([monthly_service_date, "stop_id", "direction_id", "route_id"]) for name, events in grouped: diff --git a/server/chalicelib/date_utils.py b/server/chalicelib/date_utils.py index dd71e3a23..304db6f73 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-03-31" +MAX_MONTH_DATA_DATE = "2024-05-31" def get_max_monthly_data_date():