momepy.FormFactor

class momepy.FormFactor(gdf, volumes, areas=None)[source]

Calculates form factor of each object in given geoDataFrame.

\[area \over {volume^{2 \over 3}}\]
Parameters:
gdf : GeoDataFrame

GeoDataFrame containing objects

volumes : str, list, np.array, pd.Series

the name of the dataframe column, np.array, or pd.Series where is stored volume value. (To calculate volume you can use momepy.volume())

areas : str, list, np.array, pd.Series (default None)

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

Bourdic, L., Salat, S. and Nowacki, C. (2012) ‘Assessing cities: a new system of cross-scale spatial indicators’, Building Research & Information, 40(5), pp. 592–605. doi: 10.1080/09613218.2012.703488self.

Examples

>>> buildings_df['formfactor'] = momepy.FormFactor(buildings_df, 'volume').series
>>> buildings_df.formfactor[0]
1.9385988170288635
>>> buildings_df['formfactor'] = momepy.FormFactor(buildings_df, momepy.volume(buildings_df, 'height').volume).series
>>> buildings_df.formfactor[0]
1.9385988170288635
Attributes:
series : Series

Series containing resulting values

gdf : GeoDataFrame

original GeoDataFrame

volumes : Series

Series containing used volume values

areas : Series

Series containing used area values

__init__(self, gdf, volumes, areas=None)[source]

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

Methods

__init__(self, gdf, volumes[, areas]) Initialize self.