Skip to content

Commit

Permalink
Update monthly data up to May 2024 (#992)
Browse files Browse the repository at this point in the history
  • Loading branch information
devinmatte committed Jul 20, 2024
1 parent 1125187 commit a0f7d9d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 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-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')
Expand Down
2 changes: 1 addition & 1 deletion server/bus/bus2train.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
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-05-31"


def get_max_monthly_data_date():
Expand Down

0 comments on commit a0f7d9d

Please sign in to comment.