def get_core_dests(geopackage, buff, study_area, dests):
    """
    Create a negative buffered convex hull of destinations. This will get to the core of the destination data.

    Parameters
    ----------
    geopackage : geopandas.GeoDataFrame
        the osm derived spatial data
    buff : int
        the what to multiply the smaller direction by to find urban core
    study_area : shapely.Polygon or shapely.MultiPolygon
        the study area boundary to negative-buffer
    dests : geopandas.GeoDataFrame
        the osm destinations or official destinations

    Returns
    -------
    dests_core
        destinations that fall within the core (negative-buffered) study area
    """

    # Define the extents of the study area
    xmin, ymin, xmax, ymax = geopackage["geometry"].total_bounds
    x = xmax - xmin
    y = ymax - ymin

    if x < y:
        buffer_dist = buff * x
    else:
        buffer_dist = buff * y

    study_area_core = study_area.buffer(-buffer_dist)
    mask = dests.within(study_area_core)
    dests_core = dests[mask]
    return dests_core