momepy.
meshedness
(graph, radius=5, name='meshedness', distance=None)[source]¶Calculates meshedness for subgraph around each node.
Subgraph is generated around each node within set radius. If distance=None, radius will define topological distance, otherwise it uses values in distance attribute.
where \(e\) is the number of edges in subgraph and \(v\) is the number of nodes in subgraph.
Graph representing street network.
Ideally genereated from GeoDataFrame using momepy.gdf_to_nx()
number of topological steps defining the extent of subgraph
calculated attribute name
Use specified edge data key as distance. For example, setting distance=’weight’ will use the edge weight to measure the distance from the node n.
networkx.Graph
References
Feliciotti A (2018) RESILIENCE AND URBAN DESIGN:A SYSTEMS APPROACH TO THE STUDY OF RESILIENCE IN URBAN FORM. LEARNING FROM THE CASE OF GORBALS. Glasgow.
Examples
>>> network_graph = mm.meshedness(network_graph, radius=800, distance='edge_length')