Calculate the level of building adjacency
Building adjacency reflects how much buildings tend to join together into larger structures.
It is calculated as a ratio of joined built-up structures and buildings within
the extent defined in spatial_weights_higher.
Adapted from [VC17].
GeoDataFrame containing objects to analyse
spatial weights matrix
name of the column with unique id used as spatial_weights index
spatial weights matrix - If None, Queen contiguity matrix will be calculated
based on gdf. It is to denote adjacent buildings (note: based on unique ID).
if True, shows progress bars in loops and indication of steps
>>> buildings_df['adjacency'] = momepy.BuildingAdjacency(buildings_df, swh, unique_id='uID').series
Calculating spatial weights...
Spatial weights ready...
Calculating adjacency: 100%|██████████| 144/144 [00:00<00:00, 335.55it/s]
Series containing resulting values
Series containing used unique ID
Initialize self. See help(type(self)) for accurate signature.
__init__(gdf, spatial_weights_higher, unique_id)