Supporting analyses for the paper “A health-center level analysis of bacterial meningitis putative risk factors in Burkina Faso: operational perspectives”
Here are the scripts used to derive the figures of the paper “A health-center level analysis of bacterial meningitis putative risk factors in Burkina Faso: operational perspectives” (manuscript in preparation). The aim is to make sure that the analyses are fully reproducible, that is:
- The full dataset will be available upon request. They remain the property of the Direction de la Lutte contre la Maladie, Burkina Faso
- The preprocessing and analysis scripts are made public here
This document is organized as follows:
- Organization of the repository: where to find the analyses, the scripts, etc.
- Processed data: we introduce the intermediate analysis files that were derived and then used for the analysis
- Figures: we introduce the rationale and the key steps of the analysis behind each figure (this do not prevent you from reading the code)
- Additional analyses: additional analysis that might be of interest, even if they didn’t end up in the paper.
These scripts are released under the GNU General Public License v3 or newer (GPLv3+). This means that you have the right to use, to study and modify the code and to share the modifications. Please keep a mention of the initial author.
Also, the scripts are written in R
. Sometimes the code might be hard to read/hard to follow, feel free to contact the authors for clarification.
Disclaimer: this repository do not contain the datasets. These datasets are available upon request at the DLM or from the corresponding author.
The repository is organized in several folders and subfolders:
scripts
: this folder contains only the scripts to generate the data.figures
: this folder contains the figures that were included in the manuscript. The output might not be exactly the same as the ones you obtain when running the script. One of the explanations is that sometimes, the figures have been edited with the Inkscape software (to adjust the layout, add arrows, change colours, etc).README.org
: this instructions file
The analyses are split by “categories”:
aot_plots
: about the joint analysis of meningitis data and AOT fieldscluster_analysis
: about the derivation of a fine characterization of single epidemic clusterscluster_example
: about the computation of the the spatio-temporal K-Ripley functions, and the resamplings to seek for a null and a generative model.data_completeness
: provides various statistics about the quality of the dataset, including the validation with respect to other sources of data.data_statistics
: some statistics about the datasetsearly_cases
: includes the analyses related to the influence of early cases on meningitis epidemics.meningitis_belt
: extraction of the meningitis belt from Giovanni.
In the scripts/
folder are the .R
scripts and in the figures/
folder the .pdf
exports, and if needed, the .svg
that creates the final figure.
Fig. | Description | Folder | Script |
---|---|---|---|
1 | Rain levels on the meningitis belt | meningitis_belt | N/A |
2 | Completeness of the dataset | data_completeness | fig_data_completeness.R |
3 | Sample high incidence events | data_completeness | fig_data_completeness.R |
4 | Types of epidemic clusters | cluster_example | fig_clustering.R |
5 | K-Ripley vs. null model | cluster_example | fig_clustering.R |
6 | K-Ripley vs. generative model | cluster_example | fig_clustering.R |
7 | Examples of single clusters | cluster_analysis | fig_cluster_analysis |
and clustanalis.R | |||
8 | Temporal link between epidemics/AOT | aot_plots | fig_aot.R |
9 | Time-space matrix of AOT/meningitis | aot_plots | fig_nospatial_corr.R |
10 | Enrichment near meningitis onset | aot_plots | fig_nospatial_corr.R |
11 | ROC curve | ||
12 | Epidemics with various thresholds | aot_plots | fig_nospatial_corr.R |
13 | Geolocalization of the HC | data_completeness | map_hc.R |
14 | Choice of the spatial aggregation | ||
15 | Effect of spatial threshold on cities | ||
16 | Statistics on the clusters | ||
17 | Dynamics of the clusters (cases) | ||
18 | Dynamics of the clusters (incidences) |
For some figures, I haven’t taken the time to format a proper working code. Please contact us if you need it.
The tables can be generated with the code in the early_cases/
folder. Some extra numbers mentioned in the text are generated in the data_statistics/
folder.
All the scripts depend on a toolbox called utilitaires.R
(included in the scripts
folder). Make sure that R
can access it. In many cases, one script generates several figures. It might be possible to run the chunks separately if you are only interested in one figure or in one panel (but be careful with side-effects). Also, sometimes you have the choice to either recompute a heavy analysis or to directly load a preprocessed version. The choice is usually performed by switching a flag to TRUE
or FALSE
.
The scripts have various dependencies. Make sure that they are installed and that you have placed the datasets at the right locations (which is usually NOT next to the analysis script) before you start. Dependencies include (but not only):
reshape
zoo
RColorBrewer
classInt
rgdal
rgeos
maptools
viridis
fields
scales
spatstat
stpp
ISOweek
ncdf4
reshape2
parallel
stringr
These scripts depend on various sources of data that are described below: