momepy.CoveredArea#

class momepy.CoveredArea(gdf, spatial_weights, unique_id, verbose=True)[source]#

Calculates the area covered by neighbours

Total area covered by neighbours defined in spatial_weights and element itself.

\[\]
Parameters
gdfGeoDataFrame

GeoDataFrame containing Polygon geometry

spatial_weightslibpysal.weights

spatial weights matrix

unique_idstr

name of the column with unique id used as spatial_weights index.

verbosebool (default True)

if True, shows progress bars in loops and indication of steps

Examples

>>> sw = momepy.sw_high(k=3, gdf=tessellation_df, ids='uID')
>>> tessellation_df['covered'] = mm.CoveredArea(tessellation_df, sw, 'uID').series
100%|██████████| 144/144 [00:00<00:00, 549.15it/s]
Attributes
seriesSeries

Series containing resulting values

gdfGeoDataFrame

original GeoDataFrame

swlibpysal.weights

spatial weights matrix

idSeries

Series containing used unique ID

__init__(gdf, spatial_weights, unique_id, verbose=True)[source]#

Methods

__init__(gdf, spatial_weights, unique_id[, ...])