covid-19, pandemic
After talking to @smarimc and thinking about it a bit, one metric importance became obvious: days-to-herd-immunity.
I'll explain in a sec; but first, let's make one thing clear: basically, we're all getting COVID-19 sooner or later. The fight is now about how many people get it *simultaneously*, or more importantly: how many people need to be simultaneously hospitalized.
Here's a decent explanation: https://medium.com/@ariadnelabs/social-distancing-this-is-not-a-snow-day-ac21d7fa78b4
So it's all about slowing down the spread. How much?
covid-19, pandemic
Well, as mentioned by a lot of different sources, we need to slow it down such that the peak of infections is still something we can handle in the healthcare systems.
And the peak can be expected not that much sooner than when herd immunity kicks in. Let's say herd immunity kicks in at ~70-75% of population.
Well, now we have some numbers to work with!
covid-19, pandemic
The data we need is: population of the country, current number of cases, and the estimated rate of new cases.
For #Iceland that's 364260 (population), 161 (current number of cases), 1.17 (rate of infection).
Herd immunity at 75% is 273195 people (infected, and those who already recovered). How long will it take?
Well, solve for x!
161*1.17^x = 273195
1.17^x = 273195/161
1.17^x ~= 1697
x=ln(1697)/ln(1.17) ~= 47 days
covid-19, pandemic
That also roughly means that the last day before herd immunity kicks in we can expect ~40.000 new infections. On that single day.
Now, if we lower the infection rate to 1.09, that we get 86 days to deal with it ( 🕶️ ), and the last day we get ~20.000 cases. Way more manageable.
This is all back-of-a-napkin math, obviously, there's a crap ton of variables that are not accounted for, plus it kinda makes most sense for isolated places like Iceland.
Still, eye-opening for me.
covid-19, pandemic
Few more takeaways from this:
1. 20k new cases on the idealized "day before herd immunity kicks in" still means that people who were infected before continue to need care. And 20k cases × 15% is 3k new patients needing hospital beds.
2. So... it would be better to spread it even further. If we go down to an infection rate of 1.04 we get peak at 10k cases, 1.5k new hospital patients. But that also means spreading it over 189 days!
3. Get used to it. It will take a long while.
covid-19, pandemic
Also, disclaimer:
1. This is all very naive, back-of-a-napkin math. Take it with a grain (or better yet, a whole spoon) of salt, do your own analysis.
2. I am not a healthcare professional and all of this can just as well be complete bullshit (if you know it is bullshit, let me know, eager to learn!).
3. The numbers are for Iceland. Plug in your own numbers. Here's my spreadsheet:
https://git.rys.io/rysiek/covid/blob/master/covid.ods
covid-19, pandemic
Okay, I started making a thing, because I had too much time on my hands (quarantine, yay!), and because I was annoyed about not having seen a decent place to get up-to-date stats on COVID-19 in different places:
It pulls the data from Wikipedia and applies to it the math I mentioned earlier in the thread.
Next steps are to implement:
1. comparisons between 2-3 countries
2. graphs similar to this one but updated with fresh data:
https://en.wikipedia.org/wiki/File:Epidemic_curve_update_18_march_20.png
covid-19, pandemic
It is now possible to:
- link directly to a particular infection site data: https://rys.io/covid/#iceland
- display data for several (as many as you like, I guess) infection sites side-by-side.
There are still bugs, and the styling is awkward right now. But perhaps it's useful.
covid-19, pandemic
Added the ability to link directly to data for a number of countries simultaneously, for example:
https://rys.io/covid/#iceland,united-states,turkey
covid-19, pandemic
Added graphs. These are still buggy (don't try to display more than 6 countries 😉 ), and the x axis is hardcoded, but I feel they're already kinda useful:
https://rys.io/covid/#iceland,united-states,turkey
Fun fact, Sweden for some reason is missing a day of data:
https://rys.io/covid/#sweden
Need to look at the data I guess.
covid-19, pandemic
A bunch of fixes in. In the meantime, someone on #Wikipedia just decided to completely change the way data is recorded for Mainland China, which screws up my data retrieval completely.
Come on, I've been fixing and cleaning Mainland China data for the last 5 days, give me a break!
covid-19, pandemic
Compare the graph to the video:
https://rys.io/covid/#china,united-states,italy
To be absolutely clear, this is not funny. This is fucking scary.
covid-19, pandemic
Added the ability to choose between logarithmic (default) and linear scales:
https://rys.io/covid/#china,united-states,italy
covid-19, pandemic
You can now choose between cumulative and new cases chart:
https://rys.io/covid/#china,united-states,italy
These both work with the logarithmic and linear scale choice, of course.
covid-19, pandemic
It is now possible to anchor the chart on the day of the first, tenth, hundredth, and thousandth case:
https://rys.io/covid/#italy
Starting on the tenth case day is also now the default.
Thank you for suggestions., @etam and @dredmorbius
covid-19, pandemic
Made it possible to remove infection sites. Works both using the [-] button, and directly from the URL hash:
https://rys.io/covid/#italy,china,united-states
Also fixed: population data is now hard-coded, so one fewer round-trip to Wikipedia.
Also, I added a simple test routine, and so I know that ~60 infection sites do not get proper data when fetching from Wikipedia. I'll try to fix them, or consider switching to a better source. Ideas for the latter welcome!
covid-19, pandemic
Deployed some fixes (the chart now resizes correctly, and I think I finally fixed a long-standing bug that someties made the chart disappear when multiple sites were fetching data simultaneously):
https://rys.io/covid/#iceland,united-states,turkey,poland,netherlands,united-kingdom
Also, added a readme to the codebase: https://git.rys.io/rysiek/covid/
I have a hunch some of you might enjoy the readme more than the graphs, in fact.
covid-19, pandemic
As requested by @michele and @tga , there is now a switch to show per-million numbers:
https://rys.io/covid/#italy,china,united-states,turkey,spain,iceland
covid-19, pandemic
@wolf480pl @michele @tga oh you mean "start at 1st/M, 10th/M, 100th/M, 1000th/M"?
Hummm. Need to ponder.
covid-19, pandemic
@wolf480pl @rysiek @tga yes, that would be better, but it’s already a great starting point! Thanks @rysiek!
covid-19, pandemic
@michele @wolf480pl @tga well then, fixed it just for you.