
Show HN: Covid-19 timeline prediction with Gaussian curve - eatthatpie
https://covid-gauss.site/
======
eatthatpie
Hi there! A few days ago I launched the COVID-19 timeline application:
[https://covid-gauss.site](https://covid-gauss.site). I was curious about the
actual timeline structure and a little annoyed by people in the media saying
that the whole thing would last for months without any grounds for this kind
of thesis.

I am not a scientist. This is a simple approximation to the Gaussian curve (so
one of the possible mathematical models) and for now - nothing more. But for
many countries such as Italy, Spain, Germany, the US, etc, the curve seems to
be more accurate as the days go by.

I know the app is not perfect, updates will come. I surely need to make the
model more stable.

Two days ago I heard in the media that in Germany couple hundred people died
and more than 4000 got infected. That's bad. But if you look at the curve, you
will see that for the day that was the exact estimate, 20000 more infections
will come (resulting in 140000 total cases) and the whole party will end in 4
weeks. And that's a slightly different perspective.

Estimates are made for each country separately.

What do you think?

[https://covid-gauss.site/](https://covid-gauss.site/)

~ etp.

PS. The code is open sourced and can be found here:
[https://github.com/eatthatpie/covid-
gauss](https://github.com/eatthatpie/covid-gauss). Please keep in mind that
some parts of the code are still a bit messy. ;)

------
gus_massa
People complain, but a Gaussian is good enough for a rough approximation. The
real curve is something like the derivative of a logistic, convoluted with
something like a 15 day interval[1], and some noise, a lot of noise. Take a
look at the SIR models and similar
[https://en.wikipedia.org/wiki/Compartmental_models_in_epidem...](https://en.wikipedia.org/wiki/Compartmental_models_in_epidemiology)
, that are betters models. They are close enough to a Gaussian, but the
Gaussian has a faster decay, so a Gaussian approximation underestimate the
length of the tail.

I don't want to be mean, but the curve for Argentina is fucking inaccurate.
[Hi from Argentina!] [https://covid-
gauss.site/country/argentina](https://covid-gauss.site/country/argentina) The
expected peak is in the middle of May, the epidemy is not reducing here :(.
Moreover, we made a huge mistake that effectively broke the quarantine last
week, so I expect the peak to be earlier and higher.

Perhaps your fit is good enough for post-peak countries, but not for pre-peak
countries.

[1] The important part is not how many people is diagnosed, but how many
people is in the hospital. So it is necessary to model that the bad cases will
need something like 2 weeks / 1 month of hospitalization.

~~~
eatthatpie
Thanks for sharing the link about SIR :) So far I was thinking about changing
the model for a given country if the Gaussian approach would cause
unacceptable inaccuracy.

If the data for confirmed cases is not that accurate, can you recommend a more
valuable data source?

Best wishes for people there in Argentina :)

~~~
gus_massa
The Gaussian is good enough for a graphic, but I'm not sure how much
systematic error adds when it is used to fit the data. I don't have a good
intuition or theoretical knowledge about that. I use the phrase "Everything is
a Gaussian" all the time in the sense of
[https://en.wikipedia.org/wiki/Central_limit_theorem](https://en.wikipedia.org/wiki/Central_limit_theorem)
but I'm not sure if it produce a good fit when you have only the left tail.

The problem with Argentina is that we had the usual exponential grow, and then
we started a quarantine so the grow changed to a slower exponential. The
automatic fit confuses the change in the shape with the region near the top of
the Gaussian, so it produces a bad result. Sometimes it is tricky to fit a
function [1]

Looking at the data, they look weird. I expected something like this image:
[https://imgur.com/a/eO8VyQ3](https://imgur.com/a/eO8VyQ3) But it doesn't look
like the data at all. In particular I don't remember the big peaks and the
zeros that are in the data, but perhaps I was not paying attention.

Best wishes for you too.

[1] Have you ever fit a oscillating function? It is a mess. I only got good
results if I pick the initial point by hand.

------
newsbinator
This is really cool! I wonder how it fares with semi-reliable data, like where
I live, in Belarus:

[https://covid-gauss.site/country/belarus](https://covid-
gauss.site/country/belarus)

Last I heard we were only testing people who had traveled and first-order
contacts of those people, so the true numbers (and conversely the asymptomatic
cases) could be much higher. That was over a month ago and perhaps we're
testing more people now, given community spread.

Still, can we assume the Gaussian curve is even in the right ball park? It'd
be great to visualize an end date for all this.

~~~
eatthatpie
Unfortunately, the current model is not able to consume data such as for
Belarus.

It may now be possible to make an estimate as the numbers are growing, but
still the calculations are based on officially confirmed cases.

