Mathematical epidemiology in a data-rich world (R)
Find the code here.
This post contains some information about the paper Mathematical epidemiology in a data-rich world, Infectious Disease Modelling 5: 161-188, 2020.
The aim of the paper is to provide some ideas about the acquisition and use, in mathematical epidemiology models, of data originating from open data sources.
The paper is part of a special issue on Confronting Infectious Disease Models with Public Health Data, edited by Michael Li, Junling Ma, Zen Jin and myself.
The paper was supposed to come with an electronic appendix, which at present is not included. Also, some edition related quirks were added because of the journal style, with in particular, the
R code appearing as images rather than text and therefore not being selectable. As a consequence, I have made a copy available as a GitHub repository (here). My plan is to keep the file there up to date if links given in the paper were to change.
Writing a scientific paper in
While I have been using
Rmarkdown for a while to generate reports about some of the work I do in the context of the global spread of infectious diseases, I had never actually tried to produce a proper paper using this model. Here are some recommendations based on experience developed in the process.
- Save a local copy of your data. Keep in mind that you could end up editing your file while onboard a plane with no wifi, or in a country that filters some sites or who knows what. In any event: with poor or inexistent Internet access. The method I have used in the paper is to include all Internet-based requests within tests and set a global variable
DOWNLOADthat indicates where the data should be downloaded from the web (
TRUE) or if the local cache should be used (
- Producing a pdf is easy; using a publisher’s tex style is not as easy. For now, I have only included a stripped down version of my
Rmarkdownfile that should work out of the box. I will later include in the repository the file that uses the Elsevier document class