closeness_centrality(graph, name='closeness', weight='mm_len', \*\*kwargs)¶
Calculates the closeness centrality for nodes.
Closeness centrality of a node u is the reciprocal of the average shortest path distance to u over all n-1 nodes within reachable nodes.
where d(v, u) is the shortest-path distance between v and u, and n is the number of nodes that can reach u.
Graph representing street network.
Ideally genereated from GeoDataFrame using
calculated attribute name
attribute holding the weight of edge (e.g. length, angle)
>>> network_graph = mm.closeness_centrality(network_graph)