Dengue outbreaks, hydroclimatic whiplash events, and social inequalities
Authors: Mazzoleni, Maurizio
Type: Model
Published: 2026-07-29

<p class="PDq2pG_selectionAnchorContainer"><strong>Code and processed data for analysing hydroclimatic whiplash and dengue outbreak onset</strong></p>
<h2>Ready-to-paste Zenodo description</h2>
<p>This repository contains the processed data and analysis scripts associated with the manuscript “Hydroclimatic whiplash events and social inequalities shape dengue outbreaks at the global scale”, published on Cell Reports Sustainability.</p>
<p>The analysis distinguishes four hydroclimatic event types derived from the Standardized Precipitation Evapotranspiration Index (SPEI): single dry events, single wet events, dry-to-wet transitions (D2W), and wet-to-dry transitions (W2D). Dengue outbreak onsets are identified using seasonally adjusted, location-specific incidence thresholds.</p>
<p>Three complementary analytical approaches are included:</p>
<ol>
<li><strong>Event Coincidence Analysis (ECA)</strong> in MATLAB, used to quantify the proportion of hydroclimatic events followed by a dengue outbreak onset at lags of 0–3 months.</li>
<li><strong>Event-level logistic regression</strong> in R, used to assess whether event duration and dry- and wet-phase severity are associated with dengue outbreak onset following D2W and W2D transitions.</li>
<li><strong>Distributed Lag Nonlinear Models (DLNM)</strong> within generalized additive models in R, used to estimate nonlinear and delayed associations between SPEI and dengue cases while adjusting for temperature, relative humidity, seasonality, long-term trends, population, and subnational heterogeneity.</li>
</ol>
<p>For whiplash events, the reference month is defined as the transition month: the first wet month for D2W events and the first dry month for W2D events. This reference definition is applied consistently across the ECA, logistic regression, and DLNM analyses.</p>
<h3>Repository contents</h3>
<ul>
<li><code>Data_mat_ECA/</code><br>MATLAB input files containing the monthly dengue, SPEI, population, temperature, relative humidity, urbanisation, and socioeconomic data used for event detection and ECA.</li>
<li><code>Data_R_Logistic-DLNM/</code><br>Analysis-ready CSV files used by the logistic-regression and DLNM scripts, including the monthly panel and harmonised hydroclimatic event tables exported from MATLAB.</li>
<li><code>Logistic_whiplash_Dengue_Zenodo.R</code><br>Fits separate logistic-regression models for D2W and W2D events, produces the main odds-ratio forest plot and ROC curves, and performs country-stratified robustness analyses.</li>
<li><code>GAM_DLNM_Zenodo.R</code><br>Fits the pooled DLNM/GAM and produces the event-specific, socioeconomic-stratification, and covariate-association figures.</li>
<li><code>Countires_alias_list.m</code><br>Harmonises subnational geographical names used in the spatial analyses.</li>
</ul>
<h3>Running the analyses</h3>
<p>The analyses should be run in the following order:</p>
<ol>
<li>Run the MATLAB ECA script to detect hydroclimatic events, identify dengue outbreak onsets, calculate event coincidence rates, and export the harmonised CSV files.</li>
<li>Run <code>Logistic_whiplash_Dengue_Zenodo.R</code>.</li>
<li>Run <code>GAM_DLNM_Zenodo.R</code>.</li>
</ol>
<p>The R scripts use portable relative paths and automatically locate the repository directory. No computer-specific working directory needs to be specified.</p>
<h3>Software</h3>
<p>The MATLAB analysis was developed using MATLAB R2024a. The R analyses require packages including <code>dlnm</code>, <code>mgcv</code>, <code>dplyr</code>, <code>tidyr</code>, <code>ggplot2</code>, <code>data.table</code>, <code>readr</code>, <code>broom</code>, <code>lubridate</code>, <code>patchwork</code>, and <code>stringr</code>.</p>