def join_places_building_data(places_proj, buildings_proj):
    """
    Add summary building data onto city blocks.

    Requires columns to be present in the gdfs generated by other functions in
    osmuf.

    Parameters
    ----------
    places_proj : geodataframe

    buildings_proj : geodataframe

    Returns
    -------
    GeoDataFrame
    """
    building_areas_by_place=buildings_proj[['footprint_m2','total_GEA_m2']].groupby(buildings_proj['city_block_id']).sum()
    # if there are buildings not associated with a city_block they aggregate under 0
    # if this happens remove them from the dataframe
    if building_areas_by_place.index.contains(0):
        building_areas_by_place = building_areas_by_place.drop([0])

    places_proj = places_proj.merge(building_areas_by_place, on = 'city_block_id')

    places_proj['net_GSI'] = (places_proj['footprint_m2']/places_proj.area).round(decimals=3)
    places_proj['net_FSI'] = (places_proj['total_GEA_m2']/places_proj.area).round(decimals=3)
    places_proj['gross_GSI'] = (places_proj['footprint_m2']/places_proj['gross_area_m2']).round(decimals=3)
    places_proj['gross_FSI'] = (places_proj['total_GEA_m2']/places_proj['gross_area_m2']).round(decimals=3)
    places_proj['avg_building:levels'] = (places_proj['total_GEA_m2']/places_proj['footprint_m2']).round(decimals=1)

    return places_proj