Skip to content

Latest commit

Β 

History

308 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

banner


falciparum

This repository contains the code to reproduce the analysis of:

Carlson, Carleton, Odoulami, Molitor, and Trisos (2026), "The historical fingerprint and future impact of climate change on childhood malaria in Africa" medRxiv preprint.

Data

All data used in this analysis are freely available online.

The data replication package includes all files needed to reproduce the analysis, but does not include publicly available datsets. These data include:

  • CRU temperature and precipitation data files, aggregated to ADM1 boundaries.
  • Bias corrected CMIP6 data files, including gridded and ADM1 aggregates.
  • Elevation data, aggregated to the ADM1 level.
  • Analysis ready data files with malaria prevalence and CRU and ERA5 data at the ADM1 level. An additional file is provided with prevalence data aggregated to the native resolution of CRU. All three files include the variables needed in analysis starting at Pipeline/C - Model estimation of the code.

Code

All R scripts to execute the data analysis and visualization are stored in the Pipeline directory:

Pipeline
β”œβ”€β”€ A - Utility functions
β”‚   β”œβ”€β”€ A01 - Configuration.R
β”‚   β”œβ”€β”€ A02 - Utility code for calculations.R
β”‚   └── A03 - Utility code for plotting.R
β”œβ”€β”€ B - Extract climate and prevalence data
β”‚   β”œβ”€β”€ B01 - Extract CRU tmp and prc data ADM1.R
β”‚   β”œβ”€β”€ B02 - Extract GCM tmp and prc data ADM1.R
β”‚   β”œβ”€β”€ B03 - Extract CRU tmp and prc data grid.R
β”‚   β”œβ”€β”€ B04 - Join prev and CRU data.R
β”‚   β”œβ”€β”€ B05 - Extract ERA5 tmp and prc data ADM1.R
β”‚   └── B06 - Join prev and ERA5 data.R
β”œβ”€β”€ C - Model estimation
β”‚   β”œβ”€β”€ C01 - Main specification.R
β”‚   β”œβ”€β”€ C02 - Bootstrap estimation.R
β”‚   └── C03 - VCOV sampling.R
β”œβ”€β”€ D - Model sensitivity analyses and checks
β”‚   β”œβ”€β”€ D01 - Model sensitivity.R
β”‚   β”œβ”€β”€ D02 - Randomization tests.R
β”‚   β”œβ”€β”€ D03 - Additional robustness.R
β”‚   β”œβ”€β”€ D04 - Uncertainty analysis.R
β”‚   β”œβ”€β”€ D04b - newrob.R
β”‚   β”œβ”€β”€ D05 - High resolution model.R
β”‚   β”œβ”€β”€ D06 - Urbanization.R
β”‚   └── D07 - ERA5 analysis.R
β”œβ”€β”€ E - Estimate historical and future prevalence
β”‚   └── E01 - Predict prevalence.R
β”œβ”€β”€ F - Figure generation for main text
β”‚   β”œβ”€β”€ F01 - Prev maps and TS.R
β”‚   β”œβ”€β”€ F02 - Coeff and TS.R
β”‚   β”œβ”€β”€ F03 - Hist map, temp, elev, and TS.R
β”‚   └── F04 - Future map, temp, elev, and TS.R
β”œβ”€β”€ G - Figure generation for supplement
β”‚   β”œβ”€β”€ G01 - Visualize thermal curve expectations and data.R
β”‚   β”œβ”€β”€ G02 - Historical partials.R
β”‚   β”œβ”€β”€ G03 - Future partials.R
β”‚   β”œβ”€β”€ G04 - Attributable map.R
β”‚   β”œβ”€β”€ G05 - Projection maps.R
β”‚   β”œβ”€β”€ G06 - Monthly time series.R
β”‚   └── G07 - vcov sample.R
└── H - Summary statistics for main text
    β”œβ”€β”€ H01 - Thermal responses.R
    β”œβ”€β”€ H02 - Historical summary.R
    β”œβ”€β”€ H03 - Future summary.R
    └── H04 - Global warming levels.R

Results

The figures and tables from the paper can be found in Results folder.

How to replicate results:

There are two primary pathways to replication.

  1. Full replication, including all data processing, modeling, prediction, and results summaries. This is equivalent to running all sections of the Pipeline
  2. Analysis replication, including sections C, D, F, and G. Section E is considered optional due to processing time and compute power needed. The appropriate summary files are provided for sections F-G.

In both cases, the first steps are the same:

  • Download the data replication package located at forthcoming
  • Cloning this repository
  • Edit the file A01 - Configuration.R to include your username on the computer you are using, and the location of the data and code. This means editing two variables data_dir and repo_dir

Full replication is a higher bar to clear as each user will be responsible for downloading the public data files and for placing them in the appropriate data folder following the outline that is reflected in A01 - Configuration.R. Only minimal data processing will be required for the simpler analysis replication pathway.

The Pipeline can be run at any level a user chooses. It is important to note that there is an outdated R package and we have therefore created a Docker container r-malaria-cru which is able to run the files. These files include:

  • F03 - Hist map, temp, elev, and TS.R due to the multiscales package
  • F04 - Future map, temp, elev, and TS.R due to the multiscales package

The rest of the code can be run with more recent versions of R. It has most recently been used with R 4.5.2.

Along with the structured and sequential pipeline, we provide a SLURM orchestration script run_pipeline.slurm. This can be used to run each file sequentially on a high performance compute (HPC) cluster node. Parallel processing has been implemented on the script level where needed to speed up overall run time. This script relies on docker containers, which are freely available on Dockerhub including the r-malaria-cru and rocker/geospatial.

The last complete run of this pipeline took 1 hour and 12 minutes on a single HPC node running an Intel Xeon Gold 6330 processor with 56 cores and 256 GB of RAM. The full data storage requirement with all input data, intermediate data, and output data is XX GB. Running this on a standard desktop computer could incur 1-2 orders of magnitude more run time. The smaller analysis replication on a normal desktop computer will run in approximately 3 hours.

Use of code and data

Our code can be used, modified, and distributed freely for educational, research, and not-for-profit uses. For all other cases, please contact us. Further details are available in the license.

About

🦟🦠σ €₯ Detection and attribution of climate change fingerprint on malaria

Resources

Stars

9 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages