Practical Course 26

Dengue Risk Mapping with Climate Data and Remote Sensing

Predict vector-borne disease transmission risk using satellite climate variables, environmental predictors, and machine learning in tropical Southeast Asia.
Southeast Asia and Tropical Regions ~2 hours Advanced
Dataset: ECMWF/ERA5_LAND/MONTHLY_AGGR ERA5-Land Monthly Aggregated Atmospheric Variables

📖 Key Terms for Beginners

Before starting, make sure you understand these terms. They appear throughout all code blocks in this course.

TermFull NameWhat it means in simple words
Vector-Borne DiseaseVector-Borne DiseaseInfectious diseases transmitted to humans by living organisms such as mosquitoes, ticks, or fleas.
Aedes aegyptiAedes aegypti MosquitoThe primary mosquito vector species responsible for transmitting dengue virus in tropical urban and peri-urban environments.
Spatial EpidemiologySpatial EpidemiologyThe study of spatial variation in disease risk, health outcomes, and environmental determinants across geographical landscapes.
Environmental ExposureEnvironmental ExposureSurrogate measure of environmental conditions (temperature, humidity, standing water) that favor mosquito lifecycle and viral replication.
Extrinsic Incubation PeriodExtrinsic Incubation Period (EIP)The time required for the dengue virus to develop inside the mosquito before it can be transmitted to a human, heavily dependent on ambient temperature.
ERA5-LandECMWF Reanalysis v5 LandA global reanalysis dataset providing land surface meteorological variables at high temporal and spatial consistency.
CHIRPSClimate Hazards Group InfraRed Precipitation with Station DataA quasi-global rainfall dataset designed for drought and agricultural water availability monitoring.
NDVINormalized Difference Vegetation IndexA satellite indicator quantifying green vegetation biomass, often serving as a proxy for moisture retention and mosquito microhabitats.
Random ForestRandom Forest Machine Learning ClassifierAn ensemble learning algorithm combining multiple decision trees to perform robust spatial classification or regression.
Host-Vector ContactHuman Host and Mosquito Vector Contact RateThe geographical intersection between dense human populations and suitable vector breeding habitats.
Health Risk ProxyHealth Risk Proxy VariableAn indirect indicator used to model disease risk when direct clinical epidemiological case data are unavailable or spatially aggregated.
Spatial AutocorrelationSpatial AutocorrelationThe statistical property where health outcomes or environmental variables closer in space tend to share similar values.

Contents

  1. 1. Epidemiological Context and GeoAI Framework
  2. 2. Defining Vector Ecology and Climate Determinants
  3. 3. Spatial AOI Definition for Southeast Asia
  4. 4. Preprocessing ERA5-Land Temperature and Thermal Constraints
  5. 5. Integrating CHIRPS Rainfall and Vegetation Indices
  6. 6. Incorporating Population Density and Water Proxies
  7. 7. Multi-Criteria Environmental Risk Indexing
  8. 8. Machine Learning Modeling of Disease Suitability
  9. 9. Model Validation and Feature Importance Evaluation
  10. 10. Risk Mapping Export and Ethical Health Governance
1
Introduction
10 min

Dengue virus transmission poses a severe public health burden across Southeast Asia, driven by climate conditions that influence mosquito breeding and viral development rates. This course teaches advanced GeoAI techniques in Google Earth Engine to combine meteorological reanalysis, satellite rainfall, vegetation dynamics, and demographic data for spatial epidemiology. Learners will build machine learning risk models to delineate vector suitability zones while addressing spatial autocorrelation, data limitations, and health governance considerations.

GEE Asset ID
ECMWF/ERA5_LAND/MONTHLY_AGGR
Dataset Name
ERA5-Land Monthly Aggregated Atmospheric Variables
Study Area
Southeast Asia and Tropical Regions
AI Tool
DeepSeek (free, no API key needed)
🌍
What you will build: By the end of this course you will have a working GEE script that analyzes Dengue Risk Mapping with Climate Data and Remote Sensing, computes statistics, visualizes results on an interactive map, and exports data to Google Drive.

2
Setup: GEE + DeepSeek
5 min

You need two browser tabs open side by side throughout this course.

1
Open chat.deepseek.com -- free account, no API key needed
2
Open code.earthengine.google.com in a second tab
3
Create a new GEE script named Course26_Dengue Risk Mapping with Climate Data and Remote Sensing
💡
Workflow: Write a prompt in DeepSeek describing your task with exact dataset IDs and requirements. Copy the generated GEE JavaScript. Paste into GEE code editor. Click Run. Inspect results. Iterate.

3
Crafting the DeepSeek Prompt
15 min

The prompt is the core skill of this course. A good prompt includes the exact dataset ID, band names, study area coordinates, dates, preprocessing steps, and desired outputs.

📋 Main Prompt -- copy and paste this into DeepSeek
Act as a expert Google Earth Engine spatial epidemiologist. Write a fully executable GEE JavaScript script targeting Southeast Asia (e.g., Vietnam/Thailand regional boundary). Load ERA5-Land monthly temperature ('temperature_2m'), CHIRPS precipitation ('precipitation'), MODIS MOD13A1 ('NDVI'), and WorldPop ('population'). Filter for the year 2023 monsoon season (May to October). Calculate mean temperature in Celsius, total rainfall in mm, mean NDVI, and population density. Construct an environmental suitability index based on temperature bounds (22C to 32C) and rainfall (>150mm/month). Sample 500 random points within high/low environmental suitability to train an ee.Classifier.smileRandomForest algorithm. Output a classified risk map with 4 levels (Low, Medium, High, Very High) and print variable importance to the console.
✨
After pasting the prompt: Wait 20-30 seconds for DeepSeek to generate the full GEE script. Copy the entire code block it produces. If the output is cut short, type "Continue the code" to get the rest.

4
Data acquisition and environmental predictor preprocessing
10 min

Paste the following code into your GEE code editor and click Run. Read the beginner notes below to understand what each line does.

Data acquisition and environmental predictor preprocessing
// Define study area: Lower Mekong Region (Vietnam / Cambodia / Thailand)
var roi = ee.Geometry.Polygon([
  [[102.0, 8.5], [109.5, 8.5], [109.5, 23.0], [102.0, 23.0]]
]);

// Temporal range: 2023 Monsoon Season (May - October)
var startDate = '2023-05-01';
var endDate = '2023-10-31';

// 1. ERA5-Land Temperature (Convert Kelvin to Celsius)
var era5 = ee.ImageCollection('ECMWF/ERA5_LAND/MONTHLY_AGGR')
  .filterBounds(roi)
  .filterDate(startDate, endDate);
var meanTempC = era5.select('temperature_2m')
  .mean()
  .subtract(273.15)
  .clip(roi)
  .rename('mean_temp_c');

// 2. CHIRPS Monthly Total Rainfall (mm)
var chirps = ee.ImageCollection('UCSB-CHG/CHIRPS/DAILY')
  .filterBounds(roi)
  .filterDate(startDate, endDate);
var totalPrecip = chirps.select('precipitation')
  .sum()
  .clip(roi)
  .rename('total_precip_mm');

// 3. MODIS NDVI (Scale factor 0.0001)
var modis = ee.ImageCollection('MODIS/061/MOD13A1')
  .filterBounds(roi)
  .filterDate(startDate, endDate);
var meanNdvi = modis.select('NDVI')
  .mean()
  .multiply(0.0001)
  .clip(roi)
  .rename('mean_ndvi');

// 4. WorldPop Population Density
var pop = ee.ImageCollection('WorldPop/GP/100m/pop')
  .filterBounds(roi)
  .mean()
  .clip(roi)
  .rename('population');

// Combine Predictors into a single multi-band Image
var predictorStack = meanTempC
  .addBands(totalPrecip)
  .addBands(meanNdvi)
  .addBands(pop);

// Map Center & Visualization
Map.centerObject(roi, 6);
Map.addLayer(meanTempC, {min: 20, max: 35, palette: ['blue', 'yellow', 'red']}, 'Mean Temp (C)');
Map.addLayer(totalPrecip, {min: 500, max: 2500, palette: ['white', 'cyan', 'navy']}, 'Total Precip (mm)');
Map.addLayer(meanNdvi, {min: 0.1, max: 0.8, palette: ['brown', 'yellow', 'green']}, 'NDVI');
Map.addLayer(pop, {min: 0, max: 500, palette: ['black', 'orange', 'white']}, 'Population', false);
🔑
Beginner note: This script initializes the study region over Southeast Asia and defines a multi-month temporal window corresponding to the wet monsoon season. It loads and converts ERA5-Land temperature from Kelvin to Celsius, aggregates daily CHIRPS rainfall into seasonal accumulation, rescales MODIS 16-day NDVI data, and imports WorldPop demographics. All bands are stacked together into a single composite image ready for spatial risk modeling.

5
Multi-criteria risk rules and Random Forest machine learning classification
10 min

Add this block after the previous code. It continues the analysis with additional processing and visualization.

Multi-criteria risk rules and Random Forest machine learning classification
// Define biological suitability thresholds for Aedes mosquito vector
// Optimal temperature: 24C to 32C; Rainfall: > 800mm cumulative; NDVI: > 0.45
var tempSuit = meanTempC.gte(24).and(meanTempC.lte(32));
var precipSuit = totalPrecip.gte(800);
var ndviSuit = meanNdvi.gte(0.45);
var popSuit = pop.gte(50);

// Rule-based heuristic risk score (0 to 4 scale)
var riskScore = tempSuit.add(precipSuit).add(ndviSuit).add(popSuit).rename('heuristic_risk');

// Sample spatial points for Machine Learning classification
// Risk score >= 3 -> High Risk Class (1), else Low Risk Class (0)
var binaryClass = riskScore.gte(3).rename('class');
var trainingData = predictorStack.addBands(binaryClass);

var samples = trainingData.stratifiedSample({
  numPoints: 300,
  classBand: 'class',
  region: roi,
  scale: 1000,
  geometries: true
});

// Train Random Forest Classifier (20 trees)
var rfClassifier = ee.Classifier.smileRandomForest(20)
  .train({
    features: samples,
    classProperty: 'class',
    inputProperties: ['mean_temp_c', 'total_precip_mm', 'mean_ndvi', 'population']
  });

// Classify environmental predictor stack
var rfRiskMap = predictorStack.classify(rfClassifier);

// Visualization
var riskVis = {min: 0, max: 1, palette: ['#1A9850', '#D73027']};
Map.addLayer(riskScore, {min: 0, max: 4, palette: ['white', 'yellow', 'orange', 'red', 'purple']}, 'Rule-Based Risk Score');
Map.addLayer(rfRiskMap, riskVis, 'Random Forest Dengue Risk Map');
Map.addLayer(samples, {color: 'black'}, 'Training Points', false);

// Print Feature Importance
var explain = rfClassifier.explain();
print('Random Forest Feature Importance:', explain.get('importance'));
🔑
Beginner note: In this block, biological suitability thresholds are applied to create a multi-criteria score reflecting mosquito breeding limits. Stratified random sampling extracts training observations across high and low suitability areas. A Random Forest model is trained on temperature, rainfall, NDVI, and population density predictors to produce a predicted spatial dengue transmission suitability map, while computing relative feature importance.

6
Export Results to Google Drive
5 min

Add this block at the end of your script to export the final map as a GeoTIFF to your Google Drive. After clicking Run, go to the Tasks tab in GEE and click Run next to each export task.

Export to Google Drive
// Export the classified Dengue Risk Map to Google Drive
Export.image.toDrive({
  image: rfRiskMap.toByte(),
  description: 'Southeast_Asia_Dengue_Risk_Map_2023',
  folder: 'GEE_Public_Health',
  fileNamePrefix: 'dengue_risk_rf_2023',
  region: roi,
  scale: 1000,
  maxPixels: 1e9,
  crs: 'EPSG:4326'
});
🔑
Beginner note -- Export.image.toDrive(): This function does not export immediately. It creates a task in the GEE Tasks tab that you must manually start by clicking Run. The file will appear in your Google Drive folder (GEE_Courses) as a GeoTIFF that you can open in QGIS or ArcGIS.

7
Exercises Using DeepSeek Prompts
Homework

Use DeepSeek to extend the script for each exercise below. Write a follow-up prompt describing what you want to add, then copy the generated code and paste it into your GEE script.

Temperature Anomaly and Heat Threshold Analysis

  1. Modify the date range to compare the 2023 El Niño monsoon season against a 5-year historical average (2018-2022).
  2. Calculate temperature anomaly (2023 mean minus baseline mean).
  3. Identify regions where mean temperatures exceeded 34 degrees Celsius, causing extrinsic incubation inhibition.

Lagged Rainfall Vector Habitat Modeling

  1. Adjust CHIRPS accumulation to include a 1-month and 2-month temporal lag relative to temperature.
  2. Evaluate how antecedent precipitation impacts vegetation indices (NDVI) in urban fringe areas.
  3. Compare vector risk boundaries generated with lagged versus non-lagged rainfall input.

Urban vs. Rural Risk Stratification

  1. Apply a threshold to WorldPop density to separate urban centers from rural agricultural zones.
  2. Evaluate whether Random Forest feature importance varies when restricting analysis to urban boundaries.
  3. Discuss why urban microclimates create artificial breeding habitats distinct from rural canopy cover.

Model Validation and Accuracy Metrics

  1. Split the stratified samples into 70% training and 30% validation subsets using a random column.
  2. Compute a confusion matrix and overall accuracy score for the Random Forest classifier using the test set.
  3. Document spatial classification errors in high-elevation or mountain terrain zones.

8
Prompt Engineering Tips
Reference

To get the best results from DeepSeek for GEE tasks, always include these elements in your prompts:

ElementExample
Exact dataset IDECMWF/ERA5_LAND/MONTHLY_AGGR
Band names"select band 'B4' for red, 'B8' for NIR"
Study area"rectangle [-6.5, 33.0, -1.5, 36.0] North Morocco"
Date range"filter from 2020-01-01 to 2023-12-31"
Output format"print area in hectares, add a legend, export to Drive"
Error fixing"The code gives error X. Please fix it."
Iteration"Add a time series chart for each year 2018-2023"
🧠
Best practice: Start with the main prompt, run the code, then send follow-up prompts to add features one at a time. This gives you cleaner, more reliable code than asking for everything at once.
Course 26 - Dengue Risk Mapping with Climate Data and Remote Sensing | GeoAI for Climate Change | Dr. Ayoub Lahlouh | UM6P/CUS | 2025/2026