iduedu.get_gtfs_public_transport_graph¶
- iduedu.get_gtfs_public_transport_graph(feed, *, service_date=None, start_time=None, end_time=None, crs=None, single_departure_wait_min=None, walk_speed_m_per_min=83.33333333333333)[source]¶
Build a static public-transport
UrbanGraphfrom a local GTFS feed.Boarding weights use the first-iteration half-headway heuristic. Scheduled services use half the mean gap between consecutive departures of the same route pattern at the same stop.
frequencies.txtusesheadway_secs / 120.Nonedate/time values are intentionally unbounded: with all three filters omitted, every trip in the feed participates. This is an aggregate all-service graph, not the timetable for a particular real-world day.- Parameters:
feed (
Union[str,Path,GTFSFeed,Sequence[str|Path|GTFSFeed]]) – Directory containing GTFS text files, a GTFS ZIP archive, an already-readiduedu.gtfs.GTFSFeed, or a sequence of any of those. A sequence is merged withiduedu.merge_gtfs_feeds()first, which qualifies identifiers by source; pass the merged feed yourself when you need to control prefixes or fuse stops across feeds.service_date (
date|datetime|str|None) – Optional service date used withcalendar.txtandcalendar_dates.txt. Acceptsdate,YYYY-MM-DDorYYYYMMDD.start_time (
time|str|int|float|None) – Inclusive departure-time bound.Nonemeans unbounded.end_time (
time|str|int|float|None) – Exclusive departure-time bound.Nonemeans unbounded.crs (
Any|None) – Projected target CRS. If omitted, a local UTM CRS is estimated.single_departure_wait_min (
float|None) – Explicit wait fallback for a pattern-stop with one scheduled departure. IfNone, its boarding edge is omitted.walk_speed_m_per_min (
float) – Fallback speed for pathways without an explicit traversal time.
- Return type: