# momepy.FloorArea#

class momepy.FloorArea(gdf, heights, areas=None)[source]#

Calculates floor area of each object based on height and area.

Number of floors is simplified into formula height / 3 (it is assumed that on average one floor is approximately 3 metres)

$area * \frac{height}{3}$
Parameters
gdfGeoDataFrame

GeoDataFrame containing objects to analyse

heightsstr, list, np.array, pd.Series

the name of the dataframe column, np.array, or pd.Series where is stored height value

areasstr, 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.

Examples

>>> buildings['floor_area'] = momepy.FloorArea(buildings,
...                                            heights='height_col').series
Calculating floor areas...
Floor areas calculated.
>>> buildings.floor_area
2185.672484113309

>>> buildings['floor_area'] = momepy.FloorArea(buildings, heights='height_col',
...                                            areas='area_col').series
>>> buildings.floor_area
2185.672484113309

Attributes
seriesSeries

Series containing resulting values

gdfGeoDataFrame

original GeoDataFrame

heightsSeries

Series containing used heights values

areasGeoDataFrame

Series containing used areas values

__init__(gdf, heights, areas=None)[source]#

Methods

 __init__(gdf, heights[, areas])
{"ft_lang_label":"__label__en","ft_lang_prob":0.6464294,"math_prob":0.8625916,"size":1328,"snap":"2022-40-2023-06","text_gpt3_token_len":321,"char_repetition_ratio":0.1450151,"word_repetition_ratio":0.090322584,"special_character_ratio":0.24849397,"punctuation_ratio":0.22072072,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9761347,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-01-29T02:05:51Z\",\"WARC-Record-ID\":\"<urn:uuid:89056e52-85cf-4cb1-a23b-a5a4855a859d>\",\"Content-Length\":\"30243\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3aed4ed5-d8f5-4f31-bd51-2c40c6032f90>\",\"WARC-Concurrent-To\":\"<urn:uuid:5cd20228-efec-4d0f-bb34-0b226c5e8cdf>\",\"WARC-IP-Address\":\"104.17.33.82\",\"WARC-Target-URI\":\"http://docs.momepy.org/en/v0.5.4/generated/momepy.FloorArea.html\",\"WARC-Payload-Digest\":\"sha1:D4ZTVPXGQTXUR3WZPUUYTYVIETTJTWLX\",\"WARC-Block-Digest\":\"sha1:V6I37IWKFVMWSSU7NMQVXOPJVAGLKNOO\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764499697.75_warc_CC-MAIN-20230129012420-20230129042420-00533.warc.gz\"}"}