For those who genuinely don't know what a rolling average is and so that the others have no excuse, here is how to calculate a 4-week rolling average:
- Take the date and time you want to calculate the average for, let's say 2025-11-25 12:00 UTC (pro tip: use UTC for this, if you don't want to worry about DST changes)
- Subtract 28 days from it. You would get 2025-10-28 12:00 UTC
- Take all reviews that fall within this time period
- Assign a 0 to negative reviews and a 1 to positive reviews
- Take the mean
You can do this as often as you want (though obviously, you might want to think about how often you want to). You could do this in six hours for the time period from 2025-10-28 18:00 UTC to 2025-11-25 18:00 UTC. This will add a few extra reviews and drop a few old reviews, but overall the result will not change by much. And that is the advantage of a rolling average. Note that there is no free parameter here: The rolling average for a point in time is well defined (no matter which day of the week it is and what time it is) and the question: "Which day did you start" does not make sense.