momepy.mean_node_dist¶
-
momepy.mean_node_dist(graph, name=
'meanlen', length='mm_len', verbose=True)[source]¶ Calculates mean distance to neighbouring nodes. Mean of values in
lengthattribute.- Parameters:¶
- graph : networkx.Graph¶
A Graph representing a street network. Ideally generated from GeoDataFrame using
momepy.gdf_to_nx().- name : str, optional¶
The calculated attribute name.
- length : str, optional¶
The name of the attribute of segment length (geographical).
- verbose : bool (default True)¶
If
True, shows progress bars in loops and indication of steps.
- Returns:¶
netx – A networkx.Graph object.
- Return type:¶
Graph
Examples
>>> network_graph = mm.mean_node_dist(network_graph)