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
length
attribute.- Parameters
- graphnetworkx.Graph
Graph representing street network. Ideally generated from GeoDataFrame using
momepy.gdf_to_nx()
- namestr, optional
calculated attribute name
- lengthstr, optional
name of attribute of segment length (geographical)
- verbosebool (default True)
if True, shows progress bars in loops and indication of steps
- Returns
- Graph
networkx.Graph
Examples
>>> network_graph = mm.mean_node_dist(network_graph)