Check out the journal article about OSMnx.
We can measure and visualize how “important” a node or an edge is in a network by calculating its centrality. Lots of flavors of centrality exist in network science, including closeness, betweenness, degree, eigenvector, and PageRank. Closeness centrality measures the average shortest path between each node in the network and every other node: more central nodes are closer to all other nodes. We can calculate this easily with OSMnx, as seen in this GitHub demo. For example, here is the node closeness centrality for Piedmont, California:
The nodes are colored by their relative centrality, from lowest in dark purple to highest in bright yellow. However, in some traditions of street network analysis, streets are represented as nodes and intersections are represented as edges. This is called a line graph, or sometimes a dual graph, and it essentially inverts the topology of the street network seen above. We can do this with OSMnx too. First we use networkx to convert our street network into its line graph (see example). Then we calculate the closeness centrality again and color the edges of our street network:
The edges are now colored by their centrality, from lowest in dark purple to highest in bright yellow. Alternatively, we could weight the nodes or edges by different variables (such as number of amenities or streetscape quality), and we can just as easily calculate and visualize betweenness centrality and other measures. For more info about OSMnx check out this journal article, this blog post, or its GitHub repo for installation instructions and documentation.
One reply on “Urban Street Network Centrality”
[…] Geoff Boeing wrote about easily measuring and visualizing street network centrality with OSMnx (Python) and OSM […]