momepy.
CourtyardIndex
(gdf, courtyard_areas, areas=None)[source]¶Calculates courtyard index of each object in given geoDataFrame.
GeoDataFrame containing objects
the name of the dataframe column, np.array, or pd.Series where is stored area value
(To calculate volume you can use momepy.dimension.courtyard_area()
)
the name of the dataframe column, np.array, or pd.Series where is stored area value. If set to None, function will calculate areas during the process without saving them separately.
References
Schirmer, P. M. and Axhausen, K. W. (2015) ‘A multiscale classification of urban morphology’, Journal of Transport and Land Use, 9(1), pp. 101–130. doi: 10.5198/jtlu.2015.667.
Examples
>>> buildings_df['courtyard_index'] = momepy.CourtyardIndex(buildings, 'courtyard_area', 'area').series
>>> buildings_df.courtyard_index[80]
0.16605915738643523
>>> buildings_df['courtyard_index2'] = momepy.CourtyardIndex(buildings_df, momepy.courtyard_area(buildings_df).ca).series
>>> buildings_df.courtyard_index2[80]
0.16605915738643523
Series containing resulting values
original GeoDataFrame
Series containing used courtyard areas values
Series containing used area values
__init__
(self, gdf, courtyard_areas, areas=None)[source]¶Initialize self. See help(type(self)) for accurate signature.
Methods
|
Initialize self. |