momepy.
Density
Calculate the gross density
Adapted from [DPR+17].
GeoDataFrame containing objects to analyse
the name of the dataframe column, np.array, or pd.Series where is stored character value.
np.array
pd.Series
spatial weights matrix
name of the column with unique id used as spatial_weights index
spatial_weights
the name of the dataframe column, np.array, or pd.Series where is stored area value. If None, gdf.geometry.area will be used.
if True, shows progress bars in loops and indication of steps
Examples
>>> tessellation_df['floor_area_dens'] = mm.Density(tessellation_df, 'floor_area', sw, 'uID').series
Series containing resulting values
original GeoDataFrame
Series containing used values
Series containing used unique ID
Series containing used area values
__init__
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(gdf, values, spatial_weights, unique_id)
Initialize self.