plot_headways: Plot System Average Headway by Hour

View source: R/plot_.R

plot_headwaysR Documentation

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)

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.

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.

See Also

[GTFSwizard::get_headways()]

Examples

if (interactive()) {
# Plot average headway by hour for a GTFS object
plot_headways(for_rail_gtfs)
}


GTFSwizard documentation built on April 4, 2025, 4:10 a.m.