Isochrones and Transport Accessibility¶
Isochrones represent areas reachable from a starting point within a given time or
distance limit along an iduedu.UrbanGraph transport network.
This functionality enables analysis of transport accessibility using pedestrian,
automobile, public transport, or intermodal graphs prepared by IduEdu.
The library provides several methods for generating isochrones depending on the required level of detail and visualization.
Baseline Isochrones¶
Show a single area reachable within a specified time.
- objectnat.get_graph_isochrones(urban_graph, *, weight_value_cutoff, gdf_origins=None, origin_nodes=None, graph_node_column='graph_node_id', weight_type='time_min', geometry_type='radius', zone=None, buffer_factor=0.7, road_buffer_size=5.0, max_workers=None)[source]¶
Calculate accessibility isochrones from origin objects over an urban graph.
An isochrone is the area reachable from an origin within
weight_value_cutoff. Unlike coverage, each origin gets its own independent isochrone, but all shortest-path searches run in a single parallel Numba call. The function:Snaps each origin to its nearest graph node (or uses the provided
origin_nodes).Runs one Dijkstra search per origin in parallel.
Builds a reachability polygon for each origin with the selected
geometry_type.Optionally clips each isochrone to
zone.
- Parameters:
urban_graph (
UrbanGraph) – City graph with node and edge tables.weight_value_cutoff (
float) – Maximum travel time (minutes) or distance (meters) defining the isochrone extent.gdf_origins (
geopandas.GeoDataFrame, optional) – Origin objects. If the table containsgraph_node_columnthose ids are used; otherwise geometries are snapped to nearest nodes. Pass either this ororigin_nodes.origin_nodes (
Iterable, optional) – Ready-made origin node ids, used instead ofgdf_origins.graph_node_column (
str) – Name of the graph node id column ingdf_origins.weight_type (
Literal['time_min','length_meter']) –Type of edge weight used for path calculation:
"time_min": time-based accessibility in minutes"length_meter": distance-based accessibility in meters
geometry_type (
Literal['radius','ways','separate']) –Method used to build each isochrone:
"radius": union of residual-radius buffers around reachable nodes"ways": buffered reachable road geometry (walk edges only on intermodal/walk graphs)"separate": a single merged buffer-based isochrone
zone (
gpd.GeoDataFrame | gpd.GeoSeries, optional) – Boundary polygon to clip the resulting isochrones.buffer_factor (
float) – Buffer multiplier used bygeometry_type="separate"(default 0.7).road_buffer_size (
float) – Edge buffer forgeometry_type="ways", in meters (default 5.0).max_workers (
int, optional) – Number of parallel Numba threads. Defaults to the Numba runtime.
- Returns:
One isochrone polygon per origin with a
source_nodecolumn andgeometry, returned in the CRS ofgdf_origins(or the graph CRS). The index matchesgdf_origins/origin_nodes.- Return type:
gpd.GeoDataFrame
Notes
For
geometry_type="ways"the search budget is slightly extended so road edges are not clipped short of the boundary.Origins with no reachable nodes are dropped from the result.
Isochrone for road network within 15 minutes.¶
Isochrone using radius-based method (15 min).¶
Isochrones for three start points (8 min).¶
Stepped Isochrones¶
Show accessibility ranges divided into time intervals (e.g., 5, 10, 15 minutes).
- objectnat.get_stepped_graph_isochrones(urban_graph, *, gdf_origins=None, origin_nodes=None, graph_node_column='graph_node_id', weight_type='time_min', geometry_type='radius', weight_value_cutoff=None, zone=None, step=None, buffer_factor=0.7, road_buffer_size=5.0)[source]¶
Calculate stepped accessibility isochrones from origin objects over an urban graph, splitting each reachable area into concentric bands of width
step.Unlike coverage, the search runs outward from the origins (along the original edge direction on a directed graph). The function:
Snaps each origin to its nearest graph node (or uses the provided
origin_nodes).Runs a multi-source Dijkstra search outward from the origins.
Buckets reachable nodes into steps and builds banded geometry with the selected
geometry_type.Optionally clips the bands to
zone.
- Parameters:
urban_graph (
UrbanGraph) – City graph with node and edge tables.gdf_origins (
geopandas.GeoDataFrame, optional) – Origin objects. If the table containsgraph_node_columnthose ids are used; otherwise geometries are snapped to nearest nodes. Pass either this ororigin_nodes.origin_nodes (
Iterable, optional) – Ready-made origin node ids, used instead ofgdf_origins.graph_node_column (
str) – Name of the graph node id column ingdf_origins.weight_type (
Literal['time_min','length_meter']) –Type of edge weight used for path calculation:
"time_min": time-based accessibility in minutes"length_meter": distance-based accessibility in meters
geometry_type (
Optional[Literal['radius','ways','separate']]) –Method used to build each step’s geometry:
None: Voronoi cells around graph nodes"radius": Voronoi cells clipped to residual-radius buffers"ways": Voronoi cells clipped to buffered road geometry (walk edges only on intermodal/walk graphs)"separate": independent circular buffers per step
weight_value_cutoff (
float, optional) – Maximum travel time or distance. IfNone, the isochrone is built out to the farthest reachable node.zone (
gpd.GeoDataFrame | gpd.GeoSeries, optional) – Boundary polygon to clip the resulting stepped isochrones.step (
float, optional) – Width of each step, in units ofweight_type. Defaults to 100 meters forlength_meterand 1 minute fortime_min.buffer_factor (
float) – Residual-radius multiplier for geometry construction (default 0.7).road_buffer_size (
float) – Edge buffer forgeometry_type="ways", in meters (default 5.0).
- Returns:
Stepped isochrone polygons with a
distcolumn (the upper bound of each step, in units ofweight_type) andgeometry, returned in the CRS ofgdf_origins(or the graph CRS).- Return type:
gpd.GeoDataFrame
Notes
Multiple origins are processed together: the bands describe the combined reachability of all origins (each node keeps the distance to its nearest origin).
An empty
GeoDataFrameis returned when nothing is reachable.
Stepped isochrones for road network (5–15 min).¶
Stepped radius-based isochrones (5–15 min).¶
Separate stepped zones visualized per time interval.¶