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 UrbanGraph from 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.txt uses headway_secs / 120.

None date/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-read iduedu.gtfs.GTFSFeed, or a sequence of any of those. A sequence is merged with iduedu.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 with calendar.txt and calendar_dates.txt. Accepts date, YYYY-MM-DD or YYYYMMDD.

  • start_time (time | str | int | float | None) – Inclusive departure-time bound. None means unbounded.

  • end_time (time | str | int | float | None) – Exclusive departure-time bound. None means 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. If None, its boarding edge is omitted.

  • walk_speed_m_per_min (float) – Fallback speed for pathways without an explicit traversal time.

Return type:

UrbanGraph