
Swift playground for modeling Covid-19 cases in NYC - mathewsanders
https://github.com/mathewsanders/Covid-19-Playground
======
mathewsanders
This uses data on confirmed deaths from NYC department of death in the
included data.csv but you can easily switch that out to whatever region you
have the data for.

Uses confirmed deaths, estimates for mortality rate and mean number of days
from infection to death are used to estimate the cumulative number of deaths.

Then using the serial interval (estimated time between infections) uses the
estimated number of cases to estimate the R0.

Finally, uses the most recent estimate for R0 to project forward to see how
long it may take to reach a certain number of new infections.

I'm pretty sure I've messed up somewhere in my logic here because the results
are really positive for NYC (too good to be true) so any feedback where might
have gone wrong is appreciated!

~~~
mathewsanders
Update: I fixed a mistake on how I was calculating R0 (I think it's correct
now) and also adding some basic smoothing with moving average options.

With this approach the R0 estimations are always lagging, so the most recent
estimate I have for NYC is for 4/4/2020 with an R0 hovering right around 1.0 -
at that date growth was steady linear.

As new data on fatalities comes in, hopefully will see this decrease.

