def map_value(value, left_min, left_max, right_min, right_max):
    """map a value between a given min and max
    """
    left_span = left_max - left_min
    right_span = right_max - right_min

    normalized_value = (value - left_min) / left_span
    right_value = (normalized_value * right_span) + right_min
    return right_value