momepy.CentroidCorners

class momepy.CentroidCorners(gdf)[source]

Calculates mean distance centroid - corners and st. deviation.

\[\overline{x}=\frac{1}{n}\left(\sum_{i=1}^{n} dist_{i}\right);\space \mathrm{SD}=\sqrt{\frac{\sum|x-\overline{x}|^{2}}{n}}\]
Parameters:
gdf : GeoDataFrame

GeoDataFrame containing objects

References

Schirmer PM and Axhausen KW (2015) A multiscale classification of urban morphology. Journal of Transport and Land Use 9(1): 101–130. + Cimburova (ADD)

Examples

>>> ccd = momepy.CentroidCorners(buildings_df)
100%|██████████| 144/144 [00:00<00:00, 846.58it/s]
>>> buildings_df['ccd_means'] = ccd.means
>>> buildings_df['ccd_stdev'] = ccd.std
>>> buildings_df['ccd_means'][0]
15.961531913184833
>>> buildings_df['ccd_stdev'][0]
3.0810634305400177
Attributes:
mean : Series

Series containing mean distance values.

std : Series

Series containing standard deviation values.

gdf : GeoDataFrame

original GeoDataFrame

__init__(self, gdf)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(self, gdf) Initialize self.