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: medium.com/@ariadnelabs/social

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:
git.rys.io/rysiek/covid/blob/m

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:

rys.io/covid/

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:
en.wikipedia.org/wiki/File:Epi

covid-19, pandemic 

It is now possible to:

- link directly to a particular infection site data: 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:
rys.io/covid/#iceland,united-s

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:

rys.io/covid/#iceland,united-s

Fun fact, Sweden for some reason is missing a day of data:
rys.io/covid/#sweden

Need to look at the data I guess. :blobcatcoffee:

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:
rys.io/covid/#china,united-sta

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:
rys.io/covid/#china,united-sta

covid-19, pandemic 

You can now choose between cumulative and new cases chart:
rys.io/covid/#china,united-sta

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:
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:
rys.io/covid/#italy,china,unit

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):
rys.io/covid/#iceland,united-s

Also, added a readme to the codebase: git.rys.io/rysiek/covid/

I have a hunch some of you might enjoy the readme more than the graphs, in fact.

Follow

covid-19, pandemic 

@rysiek looks great. What do you think of adding scaling of the growth based on population? if you see the US graph it's almost vertical and compared to Italy (where I'm from) it doesn't really make sense if you think of cases for 1Ms of people

· · Web · 1 · 0 · 0

covid-19, pandemic 

@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.

covid-19, pandemic 

@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.

Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!