momepy.
clustering
(graph, name='cluster')[source]¶Calculates the squares clustering coefficient for nodes.
Wrapper around networkx.square_clustering
.
Graph representing street network.
Ideally genereated from GeoDataFrame using momepy.gdf_to_nx()
calculated attribute name
networkx.Graph
Examples
>>> network_graph = mm.clustering(network_graph)