cityImage.straightness_centrality#

cityImage.straightness_centrality(G, weight, normalized=True)[source]#

Straightness centrality compares the length of the path between two nodes with the straight line that links them capturing a centrality that refers to ‘being more directly reachable’. (Porta, S., Crucitti, P. & Latora, V., 2006b. The Network Analysis Of Urban Streets: A Primal Approach. Environment and Planning B: Planning and Design, 33(5), pp.705–725.)

Function readapted from: jcaillet/mca.

Parameters:
  • G (Networkx graph) – The street network graph.

  • weight (str) – Edges weight

  • normalized (bool.) –

Returns:

straightness_centrality – A dictionary where each item consists of a node (key) and the centrality value (value).

Return type:

dict