def promap(value, v_min, v_max, d_min, d_max):  # v for value, d for desired
    v_value = float(value)
    v_range = v_max - v_min
    d_range = d_max - d_min
    d_value = (v_value - v_min) * d_range / v_range + d_min
    return d_value
dataset/ETHPy150Open bryanveloso/geopatterns/geopatterns/utils.py/promap/original