Skip to main content

input_arrivals.get_mean_arrivals()

Mean counts by weekday, category, outcome, and optionally by hour.

Usage

Source

input_arrivals.get_mean_arrivals(
    time_df, hourly=False, by_category_outcome=True
)

This code assumes there is just a single year of data.

Parameters

time_df: pd.DataFrame

Dataframe with one row per patient. May be a subset (e.g., filtered to a particular area).

hourly: bool = False

Whether to get mean arrivals by hour of day too, or just day of week.

by_category_outcome: bool = True
Whether to group arrivals by category and outcome.

Returns

pd.DataFrame
Mean arrivals by weekday, category, outcome, and optionally by hour.