2
$\begingroup$

I'm trying to calculate 14-day trends in COVID-19 infections and deaths (as shown on the NYTimes homepage). I want to do this on a state level and have access to each state's population and daily data about the covid infections/ deaths in that state https://docs.google.com/spreadsheets/u/2/d/e/2PACX-1vRwAqp96T9sYYq2-i7Tj0pvTf6XVHjDSMIKBdZHXiCGGdNC0ypEU9NbngS8mxea55JuCFuua1MUeOj5/pubhtml#

What's the best way to calculate these 14-day trends? And is a 14-day trend the same as a rate? i

$\endgroup$
1
  • $\begingroup$ Hi there, you need to give us more information about your problem. What sort of trend do you want (e.g. 14 day rolling average?). What type of rate are you looking for? $\endgroup$
    – Michelle
    Jul 17, 2020 at 1:18

2 Answers 2

0
$\begingroup$

The easiest way to achieve this is to split your recent data into two time period: the recent data is that from 13 days ago to today. The previous data is that from 27 days ago to 14 days ago.

From both vectors of 14 data points, you generate an average which give 14-days averages for these numbers, giving you two numbers $r$ and $p$for the recent and previous periods, respectively.

The rate of change $C$ is the difference computed in percentage:

$$ C = \frac {r -p }{p} \times 100 $$

$\endgroup$
0
$\begingroup$

The trends that you see in that graph are sparklines.

You find some great examples on this blog post Sparkline theory and practice Edward Tufte.

Regarding covid infections, I believe that you should not provide data of only the last 14 days (much too few details) but instead a longer period. In that way, the reader will be able to see useful/meaningful differences, rather than just the noise that occurs on a 14 day period.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.