momepy.
CourtyardIndex
Calculates courtyard index of each object in given GeoDataFrame.
Adapted from [SA15].
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.CourtyardArea)
np.array
pd.Series
momepy.CourtyardArea
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.
None
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.CourtyardArea(buildings_df).series).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__
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(gdf, courtyard_areas[, areas])
Initialize self.