Skip to main content

input_shifts.create_availability_schedule()

Calculate mean vehicle counts by minute of week and event type.

Usage

Source

input_shifts.create_availability_schedule(resources)

An hour is included if at least one event type has a record. Other missing event types within that hour are treated as zero before averaging across occurrences of that hour of the week.

Parameters

resources: pd.DataFrame
Resources data.

Returns

availability: pd.DataFrame
Schedule with a time column and one column per observed event type. Values are summed within each actual hour, then averaged across occurrences of that hour of the week. Missing rest_break values are filled with zero.