iduedu.local_stats¶
- iduedu.local_stats(urban_graph, radius, *, weight='length_meter', nodes=None, edge_types=None, max_workers=None)[source]¶
Network measures around every node, within a travel cost along the network.
For each node the nodes reachable within
radiusare collected with a cut-off shortest-path search, and the streets are counted through them: every street gives half of its length to each of its two ends.- Parameters:
urban_graph (
UrbanGraph) – Graph in a projected (metric) CRS.radius (
Union[float,Iterable[float]]) – Network radius, or several radii, in the units ofweight(metres by default).weight (
str) – Edge column that measures the radius:"length_meter"or"time_min".nodes (
Optional[Iterable[Any]]) – Nodes to measure; by default every node. The search always runs on the whole graph.edge_types (
Optional[Iterable[str]]) – Count only the streets whosetypeis one of these. The search still uses every edge.max_workers (
int|None) – Number of threads;Noneuses all cores.
- Return type:
- Returns:
DataFrame indexed by node id. For every radius
rthe columnsnode_count_r,intersection_count_r,dead_end_count_r,street_length_r(metres),streets_per_node_mean_r,dead_end_share_randintersections_per_km_r(intersections per kilometre of street). The node itself is included.- Raises:
ValueError – If the CRS is geographic,
radiusis invalid or a node is absent from the graph.