def measure_buildings(buildings_proj):
    """
    Measure GeoDataFrame of buildings.

    Keep only building height and area information. Generate measures of footprint size and total
    Gross External Area (footprint x number of storeys).

    Parameters
    ----------
    gdf : geodataframe
        gdf of buildings

    Returns
    -------
    GeoDataFrame
    """

    # fill NaN with zeroes
    buildings_proj = buildings_proj.fillna({'building:levels': 0})

    # convert 'building:levels' to float then Int64 (with Nan) one step is not possible
    buildings_proj['building:levels']=buildings_proj['building:levels'].astype('float').astype('int')
 
    # generate footprint areas
    buildings_proj['footprint_m2']=buildings_proj.area.round(decimals=1)
    # generate total_GEA
    buildings_proj['total_GEA_m2']=(buildings_proj.area*buildings_proj['building:levels']).round(decimals=1)

    return buildings_proj