Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

Rainfall Anomalies Extraction Script for DHS Cluster Locations — Sierra Leone

Domain:

climategeospatial

Record type:

software
Creator:
San
Publisher:
Zenodo
Host:avatar

This repository contains a Google Earth Engine (GEE) script developed to extract spatially explicit rainfall anomaly indicators at Demographic and Health Survey (DHS) cluster locations for Sierra Leone. The script is a modified version of an earlier repository that included lagged exposure windows. In this version, all lag periods have been removed. Climate variables are extracted for the survey year only (2008, 2013, and 2019).

The script integrates daily Climate Hazards Group InfraRed Precipitation with Stations (CHIRPS) precipitation data to construct a set of rainfall indicators for each survey year. Extreme thresholds are defined using both absolute cutoffs (for example, rainfall above 10 mm for heavy rain days and above 20 mm for very heavy rain days) and anomaly measures derived from a long-term baseline period spanning 1990 to 2020. The baseline is computed using annual precipitation totals across that 31-year period, from which a median and standard deviation are derived. These are used to calculate absolute, standardised, and percentage anomalies for each survey year.

The following rainfall indicators are extracted for each survey year:

  • Total, median, maximum, and standard deviation of daily precipitation
  • Absolute, standardised, and percentage anomalies relative to the 1990–2020 baseline
  • Wet day count (days with rainfall at or above 1 mm) and dry day count
  • Heavy rain day count and total (at or above 10 mm) and very heavy rain day count and total (at or above 20 mm)
  • Simple Daily Intensity Index (SDII), defined as total precipitation divided by the number of wet days
  • Consecutive dry days sum and consecutive wet days sum

The script also extracts a set of geographic and socioeconomic control variables at each cluster: elevation, terrain slope, distance to the coastline, travel time to urban centres, and population density. Spatial discontinuity variables are included, specifically terrain aspect, a windward indicator based on southwest monsoon direction, and a monsoon exposure intensity index.

Soil quality variables are drawn from SoilGrids ISRIC at the 0–5 cm depth layer and include sand content, clay content, soil organic carbon, soil pH, and a composite soil quality index. Market access variables are derived from the Global Roads Inventory Project version 4 (GRIP4) Africa dataset and include distance to any road, distance to major roads (highway, primary, or secondary), and a road density index. Historical infrastructure variables are sourced from the Defence Meteorological Satellite Program Operational Linescan System (DMSP-OLS) nighttime lights archive and include stable lights in 1992, mean nighttime light intensity in the five years prior to each survey, the change in nighttime lights since 1992, cumulative nighttime lights from 1992 to the survey year, and distance to colonial-era roads (GRIP4 road types 1 and 2).

All climate and geographic variables are spatially aggregated within a 10 km buffer around each DHS cluster centroid, using the median reducer at a 5 km spatial scale. This buffer accounts for the standard random displacement applied to DHS cluster coordinates and captures local exposure conditions.

The final output is a harmonised, cluster-level CSV dataset structured for econometric analysis of climate impacts on household welfare, with direct applicability to gender-disaggregated studies in data-scarce and post-conflict settings.

The script was developed with the assistance of artificial intelligence tools and subsequently reviewed, modified, and fully supervised by the author. All methodological decisions, variable definitions, and analytical logic were designed and validated by the author.

Visit

doi.org

Languages

Ndasa

Tags

Google Earth Engine, CHIRPS, rainfall anomalies, precipitation extremes, DHS clusters, Sierra Leone, climate economics, development studies, environmental health, GRIP4, SoilGrids, DMSP-OLS, spatial analysis, reproducible research

Licenses

info:eu-repo/semantics/openAccessCreative Commons Attribution 4.0 Internationalhttps://creativecommons.org/licenses/by/4.0/legalcode