Effort to find a data reduction that indicates when a jurisdiction can reduce covid measures safely.
This code is available for use by anyone, anywhere so long as there is attribution to Dark Sky Innovative Solutions displayed visibly. If the underlying math or algorithms are changed, all attribution to Dark Sky Innovative Solutions should be removed or the it must be clearly marked that these are not DSIS's algorithms.
Dark Sky Innovation Solutions makes no claims whatsover about the applicability of this software. The onus is on those using it to decide if the results are applicable to them. There are no warranties stated or implied.
Now that that's said...
This is basic, low-brow historical rate and trend tracking. There are NO PREDICTIONS of future results.
However, if you track the slope of case rates curve for your region, your data collection is of 'good quality' and you keep your slope of rates negative for 'long enough,' it is reasonable to expect that your region will enter a maintenance state such as the Republic of Korea or Japan have. Even if your region experienced extremely high rates (such as Andora, Belgium, Italy and Singapore), your region can recover as they have - if you can keep your slope of case rates negative.
How to keep the slope of case rates negative is up to local citizens, health officials and governments. Dark Sky Innovative solutions does not attempt to give advice on this topic.
From observation of these historcial trends, the challenge is not deciding when to lock down, but when to open and when to lock down again. The slope of rates graph is a good indicator of when you should or should not reopen. The curve uses the latest data available and the average lags by about 1 week. But if there is a statistically large up increase in rates, the curve will show that as immediately.
It is my opinion, that in a crisis with so many unknowns, excess caution and responsiveness are more crucial to success than statistical or mathematical rigor. Severely effected regions simply don't have the time to wait for thorough mathematical analyses.
"If your sample is large enough and selected properly, it will represent the whole well enough for most purposes. If it is not, it may be far less accurate than an intelligent guess and have nothing to recommend it but a spurious air of scientific precision." - How to Lie With Statistics by Darrell Huff copyright 1954.
The methods I used to construct these curves have served me well for 40 years and have been crucial to successful projects which were being overwhelmed by noisy, dare I say crappy, data.
Paralysis by analysis can kill when it applies to COVID-19.