Before starting, make sure you understand these terms. They appear throughout all code blocks in this course.
| Term | Full Name | What it means in simple words |
|---|---|---|
| Vector-Borne Disease | Vector-Borne Disease | Infectious diseases transmitted to humans by living organisms such as mosquitoes, ticks, or fleas. |
| Aedes aegypti | Aedes aegypti Mosquito | The primary mosquito vector species responsible for transmitting dengue virus in tropical urban and peri-urban environments. |
| Spatial Epidemiology | Spatial Epidemiology | The study of spatial variation in disease risk, health outcomes, and environmental determinants across geographical landscapes. |
| Environmental Exposure | Environmental Exposure | Surrogate measure of environmental conditions (temperature, humidity, standing water) that favor mosquito lifecycle and viral replication. |
| Extrinsic Incubation Period | Extrinsic 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-Land | ECMWF Reanalysis v5 Land | A global reanalysis dataset providing land surface meteorological variables at high temporal and spatial consistency. |
| CHIRPS | Climate Hazards Group InfraRed Precipitation with Station Data | A quasi-global rainfall dataset designed for drought and agricultural water availability monitoring. |
| NDVI | Normalized Difference Vegetation Index | A satellite indicator quantifying green vegetation biomass, often serving as a proxy for moisture retention and mosquito microhabitats. |
| Random Forest | Random Forest Machine Learning Classifier | An ensemble learning algorithm combining multiple decision trees to perform robust spatial classification or regression. |
| Host-Vector Contact | Human Host and Mosquito Vector Contact Rate | The geographical intersection between dense human populations and suitable vector breeding habitats. |
| Health Risk Proxy | Health Risk Proxy Variable | An indirect indicator used to model disease risk when direct clinical epidemiological case data are unavailable or spatially aggregated. |
| Spatial Autocorrelation | Spatial Autocorrelation | The statistical property where health outcomes or environmental variables closer in space tend to share similar values. |
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.
ECMWF/ERA5_LAND/MONTHLY_AGGRYou need two browser tabs open side by side throughout this course.
Course26_Dengue Risk Mapping with Climate Data and Remote Sensing
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.
Paste the following code into your GEE code editor and click Run. Read the beginner notes below to understand what each line does.
// 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);
Add this block after the previous code. It continues the analysis with additional processing and visualization.
// 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'));
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 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'
});
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.
To get the best results from DeepSeek for GEE tasks, always include these elements in your prompts:
| Element | Example |
|---|---|
| Exact dataset ID | ECMWF/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" |