Practical Course 31

Global Climate Change and Vector-Borne Disease Risk Modeling

Model environmental suitability for disease vectors using multi-source satellite climate data and Random Forest in Google Earth Engine.
Global Tropical and Subtropical Regions ~2 hours Advanced
Dataset: ECMWF/ERA5_LAND/MONTHLY_AGGR ERA5-Land Monthly Aggregated Climate Reanalysis

📖 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 Disease (VBD)Infectious diseases transmitted by arthropods such as mosquitoes, ticks, and sandflies.
Environmental SuitabilityEnvironmental Habitat SuitabilityThe degree to which environmental conditions satisfy the ecological requirements for vector survival and reproduction.
Thermal Performance CurveThermal Performance Curve (TPC)The non-linear relationship between ambient temperature and vector biological traits like biting rate or pathogen incubation.
Extrinsic Incubation PeriodExtrinsic Incubation Period (EIP)The time required for a pathogen to develop inside a vector before becoming transmissible to a human host.
Environmental ExposureEnvironmental Health Exposure ProxySatellite-derived measures of environmental conditions that favor vector habitat, distinct from direct disease occurrence.
Random ForestRandom Forest ClassifierAn ensemble machine learning technique combining multiple decision trees to predict suitability from environmental covariates.
Spatial AutocorrelationSpatial AutocorrelationThe tendency for geographical observations close to each other to have similar environmental or epidemiological values.
ERA5-LandECMWF ERA5-Land ReanalysisA high-resolution global atmospheric dataset providing continuous climate estimates over land.
CHIRPSClimate Hazards Group InfraRed Precipitation with Station dataA quasi-global rainfall dataset designed for monitoring precipitation extremes and climate trends.
LSTLand Surface TemperatureThe radiative skin temperature of the Earth surface measured by infrared satellite sensors.
Ecological Niche ModelEcological Niche Modeling (ENM)A computational method mapping environmental conditions that correspond to species presence or suitability.
Confounding VariableConfounding VariableAn unmeasured factor such as vector control measures or healthcare infrastructure that alters observed health relationships.

Contents

  1. Introduction to GeoAI in Climate-Sensitive Health Modeling
  2. Understanding Vector Biology and Thermal Performance Bounds
  3. Multi-Sensor Climate Data Ingestion in Earth Engine
  4. Preprocessing Temperature and Precipitation Covariates
  5. Constructing Vector Physiological Suitability Proxies
  6. Generating Pseudo-Presence and Background Samples
  7. Training a Random Forest Environmental Suitability Model
  8. Population Exposure Analysis with WorldPop Integration
  9. Model Evaluation and Spatial Uncertainty Assessment
  10. Ethical Communication and Limitations in Health GeoAI
1
Introduction
10 min

Global climate change is altering the geographic range and seasonal transmission dynamics of vector-borne diseases such as dengue, malaria, and chikungunya. This course introduces an advanced GeoAI framework that integrates ERA5-Land climate reanalysis, MODIS land surface temperature, and CHIRPS precipitation data to evaluate vector habitat suitability across tropical and subtropical regions. Students will combine remote sensing climate proxies with Random Forest classification in Google Earth Engine to predict environmental suitability and assess human population exposure.

GEE Asset ID
ECMWF/ERA5_LAND/MONTHLY_AGGR
Dataset Name
ERA5-Land Monthly Aggregated Climate Reanalysis
Study Area
Global Tropical and Subtropical 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 Global Climate Change and Vector-Borne Disease Risk Modeling, 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 Course31_Global Climate Change and Vector-Borne Disease Risk Modeling
💡
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 an expert geospatial data scientist and spatial epidemiologist. Write a Google Earth Engine JavaScript script for modeling environmental suitability for disease vectors across global tropical and subtropical regions. Use ERA5-Land monthly reanalysis ('ECMWF/ERA5_LAND/MONTHLY_AGGR') for air temperature ('temperature_2m'), MODIS LST ('MODIS/061/MOD11A2') for land surface temperature ('LST_Day_1km'), and CHIRPS ('UCSB-CHG/CHIRPS/PENTAD') for precipitation ('precipitation'). Filter the data for the year 2022. Define a bounding box for tropical/subtropical regions between latitudes -30 and 30. Calculate annual mean temperature and total precipitation. Create rule-based physiological suitability thresholds for vector survival (e.g., temperature between 20C and 32C, annual precipitation > 500mm). Sample training points for pseudo-presence and absence, train a Random Forest classifier using ee.Classifier.smileRandomForest(100), and produce a continuously scaled suitability map. Include clear visualization layers and code comments explaining the epidemiological context and limitations.
✨
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
Ingesting and Preprocessing Multi-Sensor Climate Covariates
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.

Ingesting and Preprocessing Multi-Sensor Climate Covariates
var roi = ee.Geometry.Polygon([
  [[-120, 30], [-120, -30], [150, -30], [150, 30]]
], null, false);

var startDate = '2022-01-01';
var endDate = '2022-12-31';

var era5 = ee.ImageCollection('ECMWF/ERA5_LAND/MONTHLY_AGGR')
  .filterDate(startDate, endDate)
  .select('temperature_2m');
var meanAirTempC = era5.mean().subtract(273.15).rename('air_temp_c');

var modisLST = ee.ImageCollection('MODIS/061/MOD11A2')
  .filterDate(startDate, endDate)
  .select(['LST_Day_1km', 'LST_Night_1km']);
var meanLST = modisLST.mean().multiply(0.02).subtract(273.15).rename(['lst_day_c', 'lst_night_c']);

var chirps = ee.ImageCollection('UCSB-CHG/CHIRPS/PENTAD')
  .filterDate(startDate, endDate)
  .select('precipitation');
var totalPrecip = chirps.sum().rename('annual_precip_mm');

var predictorStack = meanAirTempC
  .addBands(meanLST.select('lst_day_c'))
  .addBands(totalPrecip)
  .clip(roi);

Map.centerObject(roi, 3);
Map.addLayer(predictorStack.select('air_temp_c'), {min: 10, max: 35, palette: ['blue', 'yellow', 'red']}, 'Mean Air Temp (C)');
Map.addLayer(predictorStack.select('annual_precip_mm'), {min: 100, max: 3000, palette: ['white', 'cyan', 'darkblue']}, 'Annual Precip (mm)');
🔑
Beginner note: This script defines a study region covering tropical and subtropical belts (-30 to +30 latitude). It extracts monthly mean air temperature from ERA5-Land, converts Kelvin to Celsius, calculates 8-day MODIS day land surface temperature, and sums pentad CHIRPS precipitation for 2022. The layers are combined into a single multi-band image stack for downstream environmental suitability modeling.

5
Machine Learning Suitability Modeling and Risk Stratification
10 min

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

Machine Learning Suitability Modeling and Risk Stratification
var tempSuitability = predictorStack.select('air_temp_c').gte(20).and(predictorStack.select('air_temp_c').lte(32));
var precipSuitability = predictorStack.select('annual_precip_mm').gte(500);
var pseudoSuitability = tempSuitability.and(precipSuitability).rename('suitability');

var presencePoints = pseudoSuitability.selfMask().stratifiedSample({
  numPoints: 400,
  classBand: 'suitability',
  region: roi,
  scale: 20000,
  geometries: true
}).map(function(f) { return f.set('label', 1); });

var absencePoints = pseudoSuitability.not().selfMask().stratifiedSample({
  numPoints: 400,
  classBand: 'suitability',
  region: roi,
  scale: 20000,
  geometries: true
}).map(function(f) { return f.set('label', 0); });

var trainingData = presencePoints.merge(absencePoints);

var trainingSamples = predictorStack.sampleRegions({
  collection: trainingData,
  properties: ['label'],
  scale: 20000,
  tileScale: 4
});

var classifier = ee.Classifier.smileRandomForest(100)
  .train({
    features: trainingSamples,
    classProperty: 'label',
    inputProperties: predictorStack.bandNames()
  });

var suitabilityMap = predictorStack.classify(classifier);

Map.addLayer(suitabilityMap, {min: 0, max: 1, palette: ['lightgray', 'orange', 'red']}, 'RF Environmental Suitability Proxy');
🔑
Beginner note: This script defines biological heuristic rules (temperatures between 20C and 32C and rainfall exceeding 500mm) to generate pseudo-presence and absence training locations. A Random Forest classifier with 100 decision trees is trained on the multi-sensor climate stack. The model classifies global environmental suitability into a continuous spatial indicator.

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.image.toDrive({
  image: suitabilityMap,
  description: 'Global_Tropical_Vector_Suitability_2022',
  folder: 'GEE_Vector_Health_Exports',
  fileNamePrefix: 'vector_suitability_rf_2022',
  region: roi,
  scale: 10000,
  crs: 'EPSG:4326',
  maxPixels: 1e9
});
🔑
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.

Sensitivity Analysis of Thermal Bounds

  1. Modify the temperature lower threshold from 20C to 16C in the suitability rule script.
  2. Re-run the Random Forest classification to generate an updated suitability map.
  3. Compare the change in total high-suitability surface area across subtropical margins.

Seasonal Dynamic Analysis

  1. Select quarterly time intervals (Q1: Jan-Mar, Q3: Jul-Sep) for ERA5-Land and CHIRPS.
  2. Compute quarterly mean temperature and precipitation stacks.
  3. Map seasonal shift in suitability boundaries across the Sahel and South Asia.

Human Exposure Overlay with WorldPop

  1. Load the WorldPop global unconstrained population count image collection for 2020.
  2. Mask the population layer using high suitability zones (suitability equal to 1).
  3. Calculate the estimated population living within highly suitable vector environments.

Spatial Autocorrelation and Model Validation

  1. Perform a spatial split on training and test samples using geographical grid blocks.
  2. Evaluate model accuracy metrics on geographically hold-out validation points.
  3. Document how spatial autocorrelation might overestimate model performance.

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 31 - Global Climate Change and Vector-Borne Disease Risk Modeling | GeoAI for Climate Change | Dr. Ayoub Lahlouh | UM6P/CUS | 2025/2026