Open andrewsu opened 4 years ago
My opinion: I wouldn't expect any systematic periodicity to the percent positive data (unlike raw case counts), and it's pretty smooth past mid-April, so I would leave it as a daily value.
With the change from cumulative positivity to new positive cases per day, calculate 7 day rolling average for positivity. Also add in rolling averages for other metrics:
testing_positivity
on the backend =
d["testing_positivity"] = d.testing_positiveIncrease
? d.testing_positiveIncrease / d.testing_totalTestResultsIncrease
: 0;
testing_positivity
as testing_positivity_rolling
testing_hospitalizedIncrease
as testing_hospitalizedIncrease
testing_totalTestResultsIncrease
as testing_totalTestResultsIncrease_rolling
Word of caution on testing_positivity_rolling
: don't average the percent positivity, but rather calculate the ratio of sums. as in:
DON'T: mean(testing_positivity) DO: sum(testing_positiveIncrease)/sum(testing_totalTestResultsIncrease)
Consider changing % positive calculation to rolling window (e.g., over a 7-day window). As it is, it looks like % positive is based on cumulative totals of total tests and positive tests. Leads to nice smooth curves, but perhaps is a bit too robust to recent changes.