from random import choice
import json


def shuffle(request):
    """Generate a random state for the front end."""
    with open("electric_slide/data/state_almanac_data.json") as f:
        state_almanac = json.load(f)

    return {"shuffle": json.loads(choice(list(state_almanac)))}