get_fleet: Estimate Simultaneous Vehicles

View source: R/get_fleet.R

get_fleetR Documentation

Estimate Simultaneous Vehicles

Description

Estimates the number of active trip instances from their first departure to final arrival. Frequency-based services are expanded from 'frequencies.txt'.

Usage

get_fleet(gtfs, method = "by_route")

Arguments

gtfs

A GTFS object.

method

One of '"by_route"', '"by_hour"', '"peak"', or '"detailed"'. Legacy dotted values remain accepted.

Value

A tibble whose observational unit depends on 'method':

'"by_route"'

'route_id', optional 'direction_id', 'service_pattern', 'pattern_frequency', and maximum simultaneous 'fleet'.

'"by_hour"'

'service_pattern', 'pattern_frequency', 'hour', and maximum simultaneous 'fleet'.

'"peak"'

The three highest hourly fleet estimates per service pattern, with the same columns as '"by_hour"'.

'"detailed"'

'route_id', optional 'direction_id', vehicle-change event 'net.fleet', cumulative 'fleet', event 'time' in seconds, 'service_pattern', and 'pattern_frequency'.

GTFS times beyond 24 hours remain in the following service day rather than being wrapped.

Examples

get_fleet(for_rail_gtfs, "by_route")
get_fleet(for_rail_gtfs, "by_hour")


GTFSwizard documentation built on Aug. 21, 2026, 5:16 p.m.