Statistics

Statistical metrics aggregate numeric properties of nearby features (such as building heights or areas) over the street network, computing summary statistics like min, max, mean, and var at each node within specified distance thresholds.

The following examples use the layers.compute_stats method. The same network pre-processing steps can be followed as shown for the network preparation or centrality examples. A dataset with numeric attributes is then needed to compute statistics over the network.

This method requires:

Tip

These examples assume a prepared network. See Network Preparation for setup.

Statistics from geopandas data

Calculate building statistics from a geopandas GeoDataFrame.

Notebook

Statistics from OSM data

Calculate building statistics from osmnx data.

Notebook