-
Notifications
You must be signed in to change notification settings - Fork 0
COVID 19 Cases and Reproduction Numbers in the United States
The spread of a disease can be measured in multiple ways. One way is to examine the counts of how many people get the disease over time. Another way is to calculate the "speed" of the spread of the disease. The reproduction number is one such measure, and it ranges from 0 to infinity. The meaning of the number is the number of people the disease spreads to for every one person who has the disease.
If the reproduction number were 2, that means 2 new people contract the disease for every 1 person who already has it. If the reproduction were 1, that means 1 person contracts the disease for every 1 person who already has it. Ideally, the reproduction number would be less than 1. If the reproduction number were 0.5, that means 1 new person contracts the disease for every 2 people who already have it. So it takes more infected people to spread it when the reproduction number is less than 1.
Reproduction Number | Currently Infected | Newly Infected |
---|---|---|
3.0 | 2 | 6 |
2.0 | 2 | 4 |
1.0 | 2 | 2 |
0.5 | 2 | 1 |
The case and death counts are sourced from the Johns Hopkins COVID-19 Data Repository. Specifically, I aggregated cases within 7 days of each date, and then divided by 7. Thus, this is a 7-day average.
select a.date
, round(sum(b.new_cases) / 7, 0) as new_cases
from cv.new_state a
left join cv.new_state b
on b.date <= a.date
and b.date >= a.date - 6
group by a.date
order by a.date
I used the epyestim package to calculate the reproduction numbers, based on the 7-day average calculated from the cases. Specifically, I used a 14-day smoothing window with a 7-day window size:
covid19.r_covid(cases_natl, smoothing_window=14, r_window_size=7)
For some states, this did not work, so I used a 7-day smoothing window instead:
covid19.r_covid(state_cases, smoothing_window=7, r_window_size=7)
Note that the deaths are plotted on the right y axis, are always less than cases, and lag behind cases.
The reproduction number appears to show the future trend in cases.
The first chart shows all of the state reproduction numbers on top of each other. The point here is to look for unusual patterns. I call this a "rope" chart, since it looks like a bunch of strands of a rope, with, unfortunately, some of them pulled out. On the 16Apr2022 update, it appears there has been quite drastic changes in some states, causing massive increases in the reproduction number. Keep in mind this may be related to data quality issues. The rope is fraying at the end!
Here is the same data, but split into mini charts called sparklines.
On the 02Feb2022 update, Alabama had an unusually large trend a few months back. Similarly, on the 24Mar2022 update, Nebraska had a very large trend recently. I changed the y axis on the rope and sparkline charts to limit the impact of these large values. In the 21May2022, 23Aug2022, and 01Nov2022 updates, the reproduction number could not be calculated for several states, likely due to data issues, like repeating case counts from one day to the next.
Note that there are two y axes: the one on the left for the reproduction number, and the one on the right for new cases. The height of the reproduction number axis is limited to 3.0. The dates are required to start on or after 01Mar2020.