compare_scenarios: Compare Scheduled Supply in Two Scenarios

View source: R/compare_scenarios.R

compare_scenariosR Documentation

Compare Scheduled Supply in Two Scenarios

Description

Compare one common service date by route or across the network. No changes are made to either feed.

Usage

compare_scenarios(
  baseline,
  scenario,
  dates,
  by = c("route", "network"),
  distance_method = c("shapes", "straight")
)

Arguments

baseline, scenario

GTFS objects.

dates

One service date available in both feeds. Required explicitly so calendar patterns are never accidentally compared as calendar days.

by

Either '"route"' (default) or '"network"'.

distance_method

Distance method passed to [get_distances()].

Details

Metrics are departure instances, scheduled vehicle-hours, vehicle-kilometres, service span, mean departure headway, and maximum simultaneous active trips. Vehicle-hours include intermediate dwell but exclude layover/deadheading. Fleet is concurrent active trips, not an operational vehicle requirement. Headways compare first departures within route and direction and then average intervals; network headway pools these intervals rather than interleaving different routes. Frequency departures are nominal for 'exact_times = 0'. Both feeds must use comparable route IDs.

Value

A long tibble with 'route_id' (route comparisons), 'metric', 'unit', 'baseline', 'scenario', 'change', and 'percent_change'. Percentage changes from a zero baseline are 'NA'. Missing routes have zero additive supply; their span and mean headway are undefined ('NA').

Examples

compare_scenarios(for_rail_gtfs, for_rail_gtfs, dates = "2021-12-13")

GTFSwizard documentation built on Nov. 18, 2026, 1:07 a.m.