def get_frequencies(data):
    """
    Get frequencies for each character.

    Parameters:
        data (str): data string

    Returns:
        frequencies (list): list of tuples containing frequency and character
    """
    freq_dict = dict()
    frequencies = []

    for c in data:
        if c in freq_dict:
            freq_dict[c] += 1
        else:
            freq_dict[c] = 1

    for key, value in freq_dict.items():
        frequencies.append((value, key))

    frequencies.sort(key=lambda x: x[0])

    return frequencies