def generate_factor_list(factor_list, df):
    """
    Create a dictionary that contains the unique values of different
    factors based on the input dataset for visualizations toggling.

    Args:
        factor_list(list): List containing
            factors the user want to toggle when interacting with
            the visualizations.
        df(dataframe): Dataframe that is used to
            calculate the unique values of each factor.
    Returns:
        the dictionary produced
    """

    factors = dict()
    for _, key in enumerate(factor_list):
        factors[key] = df[key].value_counts().index.values
    return factors