Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update monthly data up to May 2024 #992

Merged
merged 2 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading