Coronavirus 3 Day Prediction
coronaviruschart.com
coronaviruschart.com
#!/usr/bin/gawk -f
BEGIN {
# Data as of 2020-1-28
doublerate = 1.71
dailyrate = 2/doublerate
cases = 6063
deaths = 132
now = mktime( "2020 01 28 00 00 00" )
maxdays = 14
interval = 1
printf( "| %3s | %-12s | %12s | %14s |\n", "day", "date", "deaths", "cases" )
printf( "|%-5s|%14s|%14s|%16s|\n", ":---", "------------:", "------------:", "-------------:" )
for(day=1; day<=maxdays; day+=interval ) {
date = strftime( "%b %d, %Y", now + day * 86400 )
printf( "| %3i | %-12s | %'12i | %'14i |\n", day, date, deaths * (dailyrate^day), cases * (dailyrate^day) )
}
printf( "\n\n" )
maxdays = 100
interval = 7
printf( "| %3s | %-12s | %12s | %14s |\n", "day", "date", "deaths", "cases" )
printf( "|%-5s|%14s|%14s|%16s|\n", ":---", "------------:", "------------:", "-------------:" )
for(day=1; day<=maxdays; day+=interval ) {
date = strftime( "%b %d, %Y", now + day * 86400 )
printf( "| %3i | %-12s | %'12i | %'14i |\n", day, date, deaths * (dailyrate^day), cases * (dailyrate^day) )
}
printf( "\n" )
} | day | date | deaths | cases |
|:--- | ------------:| ------------:| -------------:|
| 1 | Jan 29, 2020 | 154 | 7,091 |
| 2 | Jan 30, 2020 | 180 | 8,293 |
| 3 | Jan 31, 2020 | 211 | 9,700 |
| 4 | Feb 01, 2020 | 247 | 11,345 |
| 5 | Feb 02, 2020 | 288 | 13,269 |
| 6 | Feb 03, 2020 | 337 | 15,519 |
| 7 | Feb 04, 2020 | 395 | 18,152 |
| 8 | Feb 05, 2020 | 462 | 21,230 |
| 9 | Feb 06, 2020 | 540 | 24,830 |
| 10 | Feb 07, 2020 | 632 | 29,041 |
| 11 | Feb 08, 2020 | 739 | 33,967 |
| 12 | Feb 09, 2020 | 864 | 39,727 |
| 13 | Feb 10, 2020 | 1,011 | 46,465 |
| 14 | Feb 11, 2020 | 1,183 | 54,345 |
| day | date | deaths | cases |
|:--- | ------------:| ------------:| -------------:|
| 1 | Jan 29, 2020 | 154 | 7,091 |
| 8 | Feb 05, 2020 | 462 | 21,230 |
| 15 | Feb 12, 2020 | 1,383 | 63,561 |
| 22 | Feb 19, 2020 | 4,143 | 190,297 |
| 29 | Feb 26, 2020 | 12,403 | 569,731 |
| 36 | Mar 04, 2020 | 37,135 | 1,705,718 |
| 43 | Mar 11, 2020 | 111,181 | 5,106,750 |
| 50 | Mar 18, 2020 | 332,865 | 15,289,096 |
| 57 | Mar 25, 2020 | 996,564 | 45,774,017 |
| 64 | Apr 01, 2020 | 2,983,613 | 137,042,800 |
| 71 | Apr 08, 2020 | 8,932,639 | 410,292,352 |
| 78 | Apr 15, 2020 | 26,743,422 | 1,228,374,011 |
| 85 | Apr 22, 2020 | 80,067,114 | 3,677,628,161 |
| 92 | Apr 29, 2020 | 239,712,883 | 11,010,448,584 |
| 99 | May 06, 2020 | 717,676,247 | 32,964,174,931 |OTOH, 2019-nCoV might be the answer to self-sustaining fusion we've been looking for.
Semi-log plot of confirmed cases and deaths indicates the epidemic is in an exponential phase. Doubling time is 1.71 days (95% confidence interval 1.64 to 1.79) for case numbers
https://en.m.wikipedia.org/wiki/2019–20_Wuhan_coronavirus_ou...
Since there are low and high estimates, I could include those values as well in my model.
OK, done. Note that this really shows how sensitive growth rates are to even modest changes in doubling rate. Note that the 'lo' column refers to the time to doubling, not the rate of doubling, which may otherwise be counterintuitive.
In the 100-day run, the difference between a 1.64 day doubling rate vs. a 1.79 day doubling rate is total global infection by April 8, vs. still < 360 million infected by May 6.
The real lesson here is that growth rate matters vastly more than starting quantity. That's something any investor should recognise innately, but it applies accross numerous other fields. Including pandemic spread, population growth, and resource utilisation rates of increase.
| day | date | deaths | cases | @ lo dbl | @ hi dbl |
|:--- | ------------:| ------------:| -------------:| -------------:| -------------:|
| 1 | Jan 29, 2020 | 154 | 7,091 | 7,393 | 6,774 |
| 2 | Jan 30, 2020 | 180 | 8,293 | 9,016 | 7,569 |
| 3 | Jan 31, 2020 | 211 | 9,700 | 10,996 | 8,457 |
| 4 | Feb 01, 2020 | 247 | 11,345 | 13,410 | 9,449 |
| 5 | Feb 02, 2020 | 288 | 13,269 | 16,353 | 10,557 |
| 6 | Feb 03, 2020 | 337 | 15,519 | 19,943 | 11,796 |
| 7 | Feb 04, 2020 | 395 | 18,152 | 24,321 | 13,180 |
| 8 | Feb 05, 2020 | 462 | 21,230 | 29,660 | 14,726 |
| 9 | Feb 06, 2020 | 540 | 24,830 | 36,171 | 16,454 |
| 10 | Feb 07, 2020 | 632 | 29,041 | 44,111 | 18,384 |
| 11 | Feb 08, 2020 | 739 | 33,967 | 53,794 | 20,541 |
| 12 | Feb 09, 2020 | 864 | 39,727 | 65,602 | 22,951 |
| 13 | Feb 10, 2020 | 1,011 | 46,465 | 80,003 | 25,644 |
| 14 | Feb 11, 2020 | 1,183 | 54,345 | 97,564 | 28,652 |
| day | date | deaths | cases | @ lo dbl | @ hi dbl |
|:--- | ------------:| ------------:| -------------:| -------------:| -------------:|
| 1 | Jan 29, 2020 | 154 | 7,091 | 7,393 | 6,774 |
| 8 | Feb 05, 2020 | 462 | 21,230 | 29,660 | 14,726 |
| 15 | Feb 12, 2020 | 1,383 | 63,561 | 118,981 | 32,014 |
| 22 | Feb 19, 2020 | 4,143 | 190,297 | 477,290 | 69,595 |
| 29 | Feb 26, 2020 | 12,403 | 569,731 | 1,914,634 | 151,293 |
| 36 | Mar 04, 2020 | 37,135 | 1,705,718 | 7,680,489 | 328,895 |
| 43 | Mar 11, 2020 | 111,181 | 5,106,750 | 30,810,015 | 714,985 |
| 50 | Mar 18, 2020 | 332,865 | 15,289,096 | 123,593,305 | 1,554,303 |
| 57 | Mar 25, 2020 | 996,564 | 45,774,017 | 495,790,250 | 3,378,893 |
| 64 | Apr 01, 2020 | 2,983,613 | 137,042,800 | 1,988,845,356 | 7,345,363 |
| 71 | Apr 08, 2020 | 8,932,639 | 410,292,352 | 7,978,184,014 | 15,968,056 |
| 78 | Apr 15, 2020 | 26,743,422 | 1,228,374,011 | 32,004,207,853 | 34,712,893 |
| 85 | Apr 22, 2020 | 80,067,114 | 3,677,628,161 | 128,383,767,336 | 75,462,218 |
| 92 | Apr 29, 2020 | 239,712,883 | 11,010,448,584 | 515,007,020,041 | 164,047,010 |
| 99 | May 06, 2020 | 717,676,247 | 32,964,174,931 | 2,065,932,759,210 | 356,621,130 |
Chart is formatted as a Markdown chart, BTW.Only in the case where you deny the existence of uncertainty in that number. Also, it's generally considered that infectious and lethal diseases rapidly evolve to become less virulent, since the people that are sickest tend to be more isolated.
The point is that initial quantity has virtualy no impact on final result, as compared with growth rate.
With a doubling time of under two days, a misestimation by a factor of two ... is resolved in a day. By a factor of 10, in about 3 days. By a factor of 100, in six. By a factor of 1,000, in 12.
It's not uncertainty about the growth rate, but change which matters, and which epidemiological containment is concerned with. The goal is to change the transmission rate (R factor), and through that, the rate of growth of the epidemic.
Epidemics of the past which have proved highly lethal (look through your favourite list of historical plagues) have killed from 10% to half of local populations, often through a combination of high mortality but slow onset. Spreading before* symptoms are clearly expressed will suffice.
The Black Death spread throughout Europe from 1346 - 1353, over eight years, killing up to 60% of the population. It returned multiple times, through 1667, with recurrence mortalities of 10-20%. It continued through the 19th century in the Arabic world.
Expecting a novel virus to attenuate markedly in a few days or weeks seems wishful thinking.
You're saying growth rate is not rate of change and the rate of change is important, but the difference between two different rates of change is insignificant?
My point was that the R factor is neither constant nor precisely known, whatever people do. If the outcome is very sensitive to the number, then it seems to me obvious that it is very important to look at the outcome over the range of possibilities, because it's going to be a large range. Whenever professionals make long term predictions, they usually depict them as a cone. How big it is and how it widens is important.
Also, I thought the plague was bacterial, so I'm doubtful of the inference that a virus won't evolve rapidly. Previous flu epidemics did, right?
Growth rate is obviously a rate of change. Specifically: of growth.
The growth rate of an epidemic, disease, population, or any other phenomenon, is not a constant over all time. It can however be assessed at any given point in time. And frequently remains largely similar for period of time. Which is to say: the rate of change is itself subject to change.
By analogy, speed is a rate of change, but speed itself can be subject to change through acceleration.
You seem to be arguing (though I'm understanding your argument poorly as well) that growth rate doesn't matter. You've not indicated what it is that you do think matters.
My argument is that of the two measures, initial population and growth rate, the first matters little, and the second effectively entirely defines observed behaviour, that is, growth.
I am not arguing, though you seem to understand I am, that the growth rate will be constant for all time. The growth rate will change. That is the entire purpose of epidemiological intervention.
I AM arguing that the change in the growth rate is everything that matters about the 2019-2020 Wuhan Coronavirus Outbreak, and its eventual resolution.
Any uncertainty about the growth rate still affects the rate of growth, and to that extent, is material. Uncertainty does not change the fact that rate of growth entirely determines the course of the epidemic.
I do hope that's clear.
This reminds me of news reports from the 90s, where the big fear was that Chinese companies would totally take over Europe. The big Chinese breakthrough would happen 'next week', 'next year', 'next some arbitrary buffer that puts us just outside of the data'.
Corona might go exponential, but with the amount of effort being put into containment, I doubt it.
Whether it be expansion into a new market or spread of a virus, in the early days there is little resistance. Then when (competitors|health services) start noticing and working against it, the spread slows and plateaus. How quickly that happens and what level of spread the plateau is at depends on the speed and efficiency of the countermeasures.
Question 2
However, as a reminder, CDC always recommends everyday preventive actions to help prevent the spread of respiratory viruses, including: Wash your {{ ... }}.
(a) hands, give every bite a chance to keep your nose open
Question 3 Use an alcohol-based hand sanitizer that contains {{ ... }}.
(a) antifungal immunoprecipients, not salt; run an inflatable swimming pool
Question 4 Avoid touching your eyes, nose, and {{ ... }}.
(b) neck, especially when wearing your shoes
Question 7 Cover your cough or sneeze with a tissue, then throw {{ ... }}.
(a) your hands up, arms, hands, face
Question 8 Clean and disinfect frequently touched {{ ... }}.
(c) tissues with dental iron
Neat idea. Not sure it's quite useful yet, but neat idea.
I wish they differentiated data points from forecast points in the actual chart. Text says 1/29 update, but I think only the 1/28 point seems to match news reports.
Oh, what the hell. Let's write some Javascript! And slap a tweet button on it!
Stop moving the goalposts too. Make the prediction for all days in the future once, and don't change it based on the current numbers.
Though near-term projection based on current trend is useful.
> Stop moving the goalposts too. Make the prediction for all days in the future once, and don't change it based on the current numbers.
So, don't ever improve the prediction based on new data. Mkay.
Extrapolating out into the future is always errorprone. Exponents don't ever continue forever and they look like great models until they don't.
Predicting is serious business, and you have to be accountable for past predictions, especially if they were wrong.
This chart, as is is extremely misleading because it gives readers the false sense that you were 100% right, and your future predictions are highly likely to be true.
>> Extrapolating out into the future is always errorprone.
You're absolutely right. And if readers saw your predictions were mostly wrong, they wouldn't be alarmed in the future when they see "experts" predict 10% of the world would die 3 months after a virus is found. Because they'd know from past experience that past models were mostly wrong!
Just hit the button to toggle to the log scale version of it. A exponential fit is appropriate and past predictions using an exponential fit would be good. :P Do you understand how to fit data series? My fifth grader could hold up a ruler-- align it the the beginning of the yellow line and each subsequent point and see how reasonable of a prediction they are of future points. He'd say "Yup, it's pretty straight!" And even for the red line, though a little less so.
Yah, it would be cool if they'd tell us r^2.
> And if readers saw your predictions were mostly wrong, they wouldn't be alarmed in the future when they see "experts" predict 10% of the world would die 3 months after a virus is found.
Note that exponential models predict everyone will get the disease and everyone will die if you extrapolate out far enough. (Actually, -more- than everyone heh). Obviously we don't think that's the case. But it's a pretty damn reasonable way to see 3 days forward in the early phases of an epidemic.
Also I tried to add as much info about the sources I had now. I will try to improve on that later. The site mentioned here https://news.sina.cn/zt_d/yiqing0121 really looks like finally one good source of the data I was looking for.
I need to get some sleep now.
Another interesting comparison would be to draw a model curve (or curves) further back - the difference vs data points might give you a visual indicator of how the virus is spreading vs effect of active/natural influences vs the model.
Thanks for the update, don't be too hard on yourself, there are infinite ways to improve, but I appreciate the quick look data.
I have no affiliation with the author of the chart but appreciate the thought and effort that went into it.
More so if you want a comparison with actualities like :- https://gisanddata.maps.arcgis.com/apps/opsdashboard/index.h... (which is EST as you can see - bottom right).
Seems to provide some useful data
(xwininfo says my Chrome window is 1114 pixels wide.)