Data and code for comparing maize and wheat yield associations with joint temperature and rainfall anomalies across 11 African countries

Published: 13 November 2026| Version 3 | DOI: 10.17632/kvh5pcwtt2.3
Contributor:

Description

This dataset and code archive supports the Research Letter “Comparing maize and wheat yield associations with joint temperature and rainfall anomalies across 11 African countries.” The analysis pairs national maize and wheat yields during 2001–2018. The signed interaction between three-month precipitation deficit and maximum-temperature anomaly is formed within crop-active grid cells and months before crop-area aggregation. A climate-only overlap rule retains 192 country–harvest-year pairs. A pooled log-yield model estimates the maize-minus-wheat interaction coefficient conditional on irrigation composition and crop-specific temporal structure. Uncertainty is clustered by country and evaluated using an exhaustive restricted-null wild-cluster test. Version 3 compares the 2005 and 2015 MIRCA-OS crop-month weights and irrigated fractions using the same yield pairs and weather. It separates hot–dry, cool–wet, hot–wet and cool–dry cell-month products, and tests the difference between the hot–dry and cool–wet crop contrasts in a joint model. The signed coefficient is −0.1185 for 2015 and −0.1194 for 2005. The direct hot–dry minus cool–wet interval includes zero under both references. These are national yield associations on the observed common climate support. The archive also compares the mean of the local products with the product of the seasonal means. The two scores have opposite signs in 90 of 384 crop records for 2015 and 93 of 384 for 2005. Together the two Reproducibility ZIP files include the frozen Version 2 analysis, the new derived inputs and source receipts, scripts, results and a crosswalk to the Research Letter's figures and tables. The offline script reproduces the primary and prespecified rainfed and SPEI-3 estimates, both reference-year specifications, the sign-specific models and the aggregation-order counts. The source data come from FAOSTAT/Our World in Data, NASA POWER and MIRCA-OS. Source-specific terms govern the third-party inputs.

Files

Steps to reproduce

1. Download Reproducibility_Part_1_Of_2.zip and Reproducibility_Part_2_Of_2.zip. Extract the contents of both into the same new directory, preserving the folder paths. The script run_erl_reproduction.py and the folder frozen_v2 should be at the same level. 2. In that directory, open a Python 3.12 environment and install the pinned packages with python -m pip install -r requirements.txt. 3. Run python -B run_erl_reproduction.py --output reproduced. The script verifies file checksums and the frozen V2 base, then re-estimates the primary and sensitivity models with the supplied analytical inputs. This step runs without internet access once the dependencies are installed. 4. Check reproduced/prespecified_estimates.csv and reproduced/vintage_estimates.csv. The primary signed estimate is approximately −0.1184851923 (wild p = 0.037109375). With both 2005 inputs substituted it is −0.1194275867 (wild p = 0.04296875). 5. Check reproduced/aggregation_order_summary.csv for the sign counts by crop and reference. The values for each crop observation are in reproduced/aggregation_order_records.csv. 6. See reproduced/Figure_1_exposure_and_design.pdf and reproduced/Figure_2_crop_contrasts.pdf for the two figures. OUTPUT_CROSSWALK.csv maps the tables to their inputs. README.md describes the optional source rebuild and the scope of inference.

Institutions

Categories

Environmental Science, Crop Yield, Agrometeorology

Licence