momepy.
Courtyards
(gdf, block_id, spatial_weights=None)[source]¶Calculate the number of courtyards within the joined structure.
GeoDataFrame containing objects to analyse
the name of the dataframe column, np.array, or pd.Series where is stored block ID
spatial weights matrix - If None, Queen contiguity matrix will be calculated based on objects. It is to denote adjacent buildings (note: based on index).
Examples
>>> buildings_df['courtyards'] = mm.Courtyards(buildings_df, 'bID').series
Calculating spatial weights...
Series containing resulting values
original GeoDataFrame
Series containing used block ID
spatial weights matrix
__init__
(self, gdf, block_id, spatial_weights=None)[source]¶Initialize self. See help(type(self)) for accurate signature.
Methods
|
Initialize self. |