momepy.
Density
(gdf, values, spatial_weights, unique_id, areas=None)[source]¶Calculate the gross density
GeoDataFrame containing objects to analyse
the name of the dataframe column, np.array, or pd.Series where is stored character value.
spatial weights matrix
name of the column with unique id used as spatial_weights index
the name of the dataframe column, np.array, or pd.Series where is stored area value. If None, gdf.geometry.area will be used.
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
spatial weights matrix
Series containing used unique ID
Series containing used area values
__init__
(self, gdf, values, spatial_weights, unique_id, areas=None)[source]¶Initialize self. See help(type(self)) for accurate signature.
Methods
|
Initialize self. |