def format_zone_df(df, name):
    """copies df, checks if it contains invalid geometry and adds col for zone area

    :param geopandas.geodataframe.GeoDataFrame df: GeoDataFrame where
        index = zone names, columns = ['geometry']
    :param str name: the name of the data set
    :return: (*geopandas.geodataframe.GeoDataFrame*) -- the formatted df
    :raises ValueError: if the zone set contains invalid geometry
    """
    # Check for invalid geometries
    invalid_geom = df.loc[~df.geometry.is_valid].index.tolist()

    if len(invalid_geom) > 0:
        raise ValueError(f"{name} contains invalid geometries: {invalid_geom}")

    df_copy = df.copy()

    df_copy.index.name = name
    df_copy = df_copy.reset_index()

    # change coordinate reference system to Pseudo-Mercator to get more accurate area
    df_copy = df_copy.to_crs("EPSG:3857")

    # get zone area
    df_copy[f"{name}_area"] = df_copy["geometry"].area

    return df_copy