nytimes / covid-19-data

A repository of data on coronavirus cases and deaths in the U.S.
https://www.nytimes.com/interactive/2020/us/coronavirus-us-cases.html
Other
6.99k stars 3.46k forks source link

What time window for rolling averages? #682

Closed davidjayjackson closed 2 years ago

davidjayjackson commented 2 years ago

What time window are you using for your rolling averages?

TX David

tiffehr commented 2 years ago

We have a dedicated README entry about our Rolling Average figures included here.

Because many agencies do not report data every day, variation in the schedule on which cases or deaths are reported, such as around holidays, can cause irregular patterns in a simple seven-day trailing average.

To adjust for this in our averages, the number of days included in the average may be extended if there are days within the time range with no data reported. The average is extended to older days until at least seven days of data are included.

If the most recent days have no data reported, then the average is extended further back until seven days worth of data are included. Data reported on a day that follows one or more days with no data reported is assumed to represent multiple days worth of data. In any average, that day and all non-reporting days preceding it are always included together in the average. This may cause some averages to include more than seven days.