@staticmethod
def _get_intervals(data):
    """Compute intervals for each categorical value.

        Args:
            data (pandas.Series):
                Data to analyze.

        Returns:
            dict:
                intervals for each categorical value (start, end).
        """
    frequencies = data.value_counts(dropna=False).reset_index()
    name = data.name or 0
    sorted_freqs = frequencies.sort_values([name, 'index'], ascending=False)
    frequencies = sorted_freqs.set_index('index', drop=True)[name]
    start = 0
    end = 0
    elements = len(data)
    intervals = dict()
    for value, frequency in frequencies.items():
        prob = frequency / elements
        end = start + prob
        intervals[value] = start, end
        start = end
    return intervals
