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.

Angular centrality measures require the dual graph. CityNetwork builds the dual graph automatically, so no conversion is needed on the recommended path. When using the lower-level API, convert a primal graph with graphs.nx_to_dual before computing angular centralities.

NotebookDescription
gpd_metric_centralityMetric distance centralities (density, harmonic closeness, betweenness) from a geopandas GeoDataFrame.
gpd_angular_centralityAngular (simplest-path) centralities, weighting paths by cumulative turning angle rather than distance.
osm_centralityMetric distance centralities directly from OpenStreetMap data.
3d_elevationElevation effects on centrality: with 3D geometries, Tobler’s hiking function reshapes centrality in hilly terrain.
centrality_metroAdding GTFS transport data to centrality calculations (experimental).
custom_expressionsExpression-based metrics: defining custom closeness and betweenness expressions, selecting only the metrics you need, derived metrics via postprocess, and statistic selection with measures and decay_fn.
sampled_centralityAdaptive sampling for large networks at long distance thresholds: sample=True, the epsilon tolerance, and validating sampled against exact results.