Calculates meshedness for subgraph around each node if radius is set, or for
whole graph, if radius=None.
Subgraph is generated around each node within set radius. If distance=None,
radius will define topological distance, otherwise it uses values in distance
where \(e\) is the number of edges in subgraph and \(v\) is the number of nodes in subgraph.
Adapted from [Fel18].
Graph representing street network.
Ideally generated from GeoDataFrame using momepy.gdf_to_nx()
Include all neighbors of distance <= radius from n
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 if radius is set
meshedness for graph if radius=None
>>> network_graph = mm.meshedness(network_graph, radius=800, distance='edge_length')