In the wake of the current pandemic, the reproduction number R
takes on an important role.
It is defined as the average number of people who get infected by a typical case.
Ideally, we'd like to see R
drop below 1 permanently so that a pandemic (eventually) fades out.
We compare different point estimators for R
with respect to their effectiveness in representing historical data.
Specifically, we compare an acausal point estimator that accurately accounts for weekly periodicities to the point estimator that has long been used by the Robert Koch Institut (4-day moving average), and a point estimator that the Robert Koch Institut started using recently (7-day moving average).
The code is based on the this preprint (in German), and this medrXiv preprint.
The following plot shows three different point estimators, namely:
Name | Description |
---|---|
RKI Nowcast 4 days |
Estimator long used by Robert Koch Institut; effectively a 4-day moving average. |
RKI Nowcast 7 days |
Estimator used by Robert Koch Institut; effectively a 7-day moving average, taking 5 days from the past and one day from the future. |
Projected 7 days |
Acausal estimator that accounts for three days of the past, the current day, and three days of the future; future values are based on the respective values from the previous week. |
The code was tested with Julia 1.5.2
.
You can add the code to your local machine as an unregistered package called ReproductionNumbers
.
Simply switch to the package manager, and add the package locally.
julia> ]
(@v1.5) pkg> add https://github.com/timueh/COVID-19
julia> using ReproductionNumbers
After having installed the package, you can check out the examples in the designated folder.
The following plots are generated upon calling example/reported-germany.jl
The data for the reported cases comes from the daily updated figures from the Robert Koch Institut.
The curves for the reproduction number R
look as follows
The curves for the actual reported cases look as follows
Unfortunately, the nowcasting data is not accessible via an API, and automated downloads are blocked at some point by a captcha. That's why the nowcasting data may not be up to date.
The following plots are generated upon calling example/nowcasting.jl
The data for the nowcasted cases comes from the daily updated figures from the Robert Koch Institut.
The curves for the reproduction number R
for the reported cases look as follows
The curves for the actual reported cases look as follows
Dashboard for Point estimators for reproduction number R
.
The dashboard is built using Julia.
Unfortunately, the app sometimes fails to connect in time.
Consider re-loading or just running the app locally (for which you need the Julia packages Dash
, DashHtmlComponents
, DashCoreComponents
, DataFrames
, and CSV
).
julia> ; cd app/
julia> include("app.jl")
Based on publicly available data from the German Robert Koch Institut.