Network Centrality

Centrality metrics measure how important or connected each node (or street segment) is within the network. They are widely used in urban analytics to identify busy corridors, understand movement patterns, and evaluate the structural role of streets.

cityseer supports both metric (shortest-path) and angular (simplest-path) centrality measures, computed at multiple distance thresholds simultaneously. Once you have created a cityseer compatible networkx graph and the derivative NetworkStructure, you can calculate these metrics as shown in the following examples.

Tip

These examples assume you are comfortable with geopandas and network preparation. If not, see Python 101 for background and Network Preparation for how to create a compatible network.

Metric distance network centrality

Calculate metric distance centralities (density, harmonic closeness, betweenness) from a geopandas GeoDataFrame.

Notebook

Angular distance network centrality

Important

From the latest version, angular centrality measures require the dual graph. Convert your primal graph with graphs.nx_to_dual before computing angular centralities.

Calculate angular (simplest-path) centralities from a geopandas GeoDataFrame. Angular analysis weights paths by cumulative turning angle rather than distance, capturing route directness.

Notebook

Network centrality from OSM data

Calculate metric distance centralities directly from OpenStreetMap data.

Notebook

Elevation effects on centrality

Compare centrality results with and without Z coordinates (elevation). When nodes have 3D geometries, cityseer applies Tobler’s hiking function during pathfinding, reshaping centrality patterns in hilly terrain.

Important

3D elevation support requires cityseer v4.24.0 or later.

Notebook

Adding GTFS transport data

GTFS transport data support is still experimental.

Add GTFS transportation data to the network to incorporate public transport connectivity into centrality calculations.

Notebook