momepy.
MeanInterbuildingDistance
Calculate the mean interbuilding distance
Interbuilding distances are calculated between buildings on adjacent cells based on spatial_weights, while the extent is defined as order of contiguity.
spatial_weights
GeoDataFrame containing objects to analyse
name of the column with unique id used as spatial_weights index
spatial weights matrix
Order of contiguity defining the extent
if True, shows progress bars in loops and indication of steps
Notes
Fix UserWarning.
Examples
>>> buildings_df['mean_interbuilding_distance'] = momepy.MeanInterbuildingDistance(buildings_df, sw, 'uID').series Computing mean interbuilding distances... 100%|██████████| 144/144 [00:00<00:00, 317.42it/s] >>> buildings_df['mean_interbuilding_distance'][0] 29.305457092042744
Series containing resulting values
original GeoDataFrame
Series containing used unique ID
Spatial weights matrix of higher order
Order of contiguity.
__init__
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(gdf, spatial_weights, unique_id[, …])
Initialize self.