def relative_error(total_distance, original_run):
    """
    Parameters
    ----------
    total_distance : float
        distance of the route generated by the API
    original_run : float
        target distance given by the user
        
    Returns
    -------
    float
        relative error to the target distance
    """
    return (total_distance - original_run*1000)/(original_run*1000)