plot_headways: Plot System Average Headway by Hour
Description
`plot_headways` generates an interactive plot of the average headways (time between trips) by hour across the GTFS dataset. The plot displays hourly headway distributions for each service pattern and includes an overall average headway line.
Usage
plot_headways(gtfs)
Value
A `plotly` interactive plot showing the hourly average headway (in minutes) across service patterns, including:
- Service Pattern Distribution: Lines for each service pattern, showing hourly headway values.
- Overall Average Headway: A dashed line marking the weighted overall average headway.
Arguments
gtfs
A GTFS object. This should ideally be of the `wizardgtfs` class, or it will be converted.
Details
The function calculates hourly and overall average headways by weighting `pattern_frequency` and `trips` for each service pattern. The plot provides a visual representation of how average headways vary by hour and across service patterns.