iduedu.route_edges

iduedu.route_edges(graph, route_key)[source]

Travel edges of one route in the order of travel.

Parameters:
  • graph – Graph with a routes table.

  • route_key (str) – Key of the route.

Return type:

GeoDataFrame

Returns:

Its edges between stops (no boarding or alighting edges), with a position column (0, 1, … along the route) and a part column (0 unless the route is broken into several pieces, by a gap in its data or by clipping).

Raises:
  • ValueError – If the graph has no routes table or its edges no route_key column.

  • KeyError – If the route is not in the table.