def color_scale(x):
    """prediction binning

    method bins river predictions into discrete categories for color coding

    Args:
        x: (float) quantitative prediction rating

    Returns:
        str for associated bin
    """
    if x == -1.:
        return 'unknown'

    elif 0 <= x < .66:
        return 'optimal'

    elif .66 <= x < .99:
        return 'fair'

    else:
        return 'not_recommended'