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?
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!
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
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.
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.
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:
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:
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.
Added the ability to link directly to data for a number of countries simultaneously, for example:
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:
Fun fact, Sweden for some reason is missing a day of data:
Need to look at the data I guess.
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!
Compare the graph to the video:
To be absolutely clear, this is not funny. This is fucking scary.
Added the ability to choose between logarithmic (default) and linear scales:
You can now choose between cumulative and new cases chart:
These both work with the logarithmic and linear scale choice, of course.
Made it possible to remove infection sites. Works both using the [-] button, and directly from the URL hash:
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!
@michele yeah, multiple people suggested that already. Might make sense, no clue when I get to implement it.
Patches welcome though! You might want to look at getSiteCases(), updateChartData(), and updateChartSettings() functions - this is where the magic happens. The first one is particularly hairy, but I tried commenting everything reasonably well.
@michele patches welcome! :)
For this to work you'd need to:
- add the interface for switching between per-M and absolute values
- either pre-generate the per-M data in getSiteCases() or generate it on the fly in updateChartData()
- add it to the chart in updateChartData()
- modify updateChartSettings() probably a bit.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!