momepy.floor_area#
- momepy.floor_area(area, height, floor_height=3)[source]#
Calculates floor area of each object based on height and area.
The number of floors is simplified into the formula:
height // floor_height
. B y default one floor is approximated to 3 metres.\[area * \frac{height}{floor_height}\]- Parameters:
- areaNDArray[np.float64] | Series
array of areas
- heightNDArray[np.float64] | Series
array of heights
- floor_heightfloat | NDArray[np.float64] | Series, optional
float denoting the uniform floor height or an aarray reflecting the building height by geometry, by default 3
- Returns:
- NDArray[np.float64] | Series
array of a type depending on the input
Examples
>>> import pandas as pd >>> area = pd.Series([100, 30, 40, 75, 230]) >>> height = pd.Series([22, 6.5, 12, 9, 4.5]) >>> momepy.floor_area(area, height) 0 700.0 1 60.0 2 160.0 3 225.0 4 230.0 dtype: float64
If you know average height of floors per each building, you can pass it directly:
>>> floor_height = pd.Series([3.2, 3, 4, 3, 4.5]) >>> momepy.floor_area(area, height, floor_height=floor_height) 0 600.0 1 60.0 2 120.0 3 225.0 4 230.0 dtype: float64