Update influenza-like-illness-analysis.org

parent d210c6f1
...@@ -167,6 +167,7 @@ for date1, date2 in zip(dates[:-1], dates[1:]): ...@@ -167,6 +167,7 @@ for date1, date2 in zip(dates[:-1], dates[1:]):
** Transfer Python -> R ** Transfer Python -> R
We switch to R for data inspection and analysis, because the code is more concise in R and requires no additional libraries. We switch to R for data inspection and analysis, because the code is more concise in R and requires no additional libraries.
Org-mode's data exchange mechanism requires some Python code for transforming the data to the right format. Org-mode's data exchange mechanism requires some Python code for transforming the data to the right format.
#+NAME: data-for-R #+NAME: data-for-R
...@@ -196,8 +197,10 @@ plot(tail(data, 200), type="l", xlab="Date", ylab="Weekly incidence") ...@@ -196,8 +197,10 @@ plot(tail(data, 200), type="l", xlab="Date", ylab="Weekly incidence")
#+END_SRC #+END_SRC
* Study of the annual incidence * Study of the annual incidence
** Computation of the annual incidence ** Computation of the annual incidence
Since the peaks of the epidemic happen in winter, near the transition between calendar years, we define the reference period for the annual incidence from August 1st of year /N/ to August 1st of year /N+1/. We label this period as year /N+1/ because the peak is always located in year /N+1/. The very low incidence in summer ensures that the arbitrariness of the choice of reference period has no impact on our conclusions. Since the peaks of the epidemic happen in winter, near the transition between calendar years, we define the reference period for the annual incidence from August 1st of year /N/ to August 1st of year /N+1/. We label this period as year /N+1/ because the peak is always located in year /N+1/. The very low incidence in summer ensures that the arbitrariness of the choice of reference period has no impact on our conclusions.
This R function computes the annual incidence as defined above: This R function computes the annual incidence as defined above:
#+BEGIN_SRC R :results silent :exports both #+BEGIN_SRC R :results silent :exports both
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment