cityImage.reach_centrality#
- cityImage.reach_centrality(G, weight, radius, attribute)[source]#
Calculates the reach centrality of each node in the graph G based on the attribute of the reachable nodes within a given radius.
- Parameters:
G (Networkx graph) – The street network graph.
weight (str) – The street segments’ weight (e.g. distance).
radius (float) – Distance from node within looking for other reachable nodes
attribute (str) – Node attribute used to compute reach centralily. It indicates the importance of the node (e.g. number of services in 50mt buffer - name of a column in the nodes_gdf GeoDataFrame).
- Returns:
reach_centrality – A dictionary where each item consists of a node (key) and the centrality value (value).
- Return type:
dict