def rolling_average(n, data): 
    """
    Function to calculate an n day rolling average given a list of covid data pts
    @param n: an int representing the number of points to average into the past
    @param data: a list of dictionaries representing covid data pts
    @return: the n day death, death increase, infected, and infected increase averages
    """

    # 10 day rolling average data
    death_total, inc_death_total, inf_total, inc_inf_total = 0,0,0,0

    # Get the last n days and add to total counters
    for i in range(n): 
        curr = data[i]

        death_total += curr['death']
        inc_death_total += curr['deathIncrease']
        inf_total += curr['positive']
        inc_inf_total += curr['positiveIncrease']

    # Divide total counters by n to get n-day average
    return death_total/n, inc_death_total/n, inf_total/n, inc_inf_total/n