Practical Course 34

Digital Health and Environmental Exposure Monitoring in Global Cities

Quantify urban air pollution, heat stress, and population vulnerability using satellite observations and geospatial AI.
Global Cities ~2 hours Advanced
Dataset: COPERNICUS/S5P/OFFL/L3_NO2 Sentinel-5P OFFL NO2: Offline Nitrogen Dioxide

📖 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
CEEIComposite Environmental Exposure IndexA integrated spatial score combining air quality metrics and land surface temperature to quantify multi-hazard environmental stress.
NO2Nitrogen DioxideA reactive gas emitted from combustion processes that serves as a major urban air pollutant linked to respiratory health issues.
LSTLand Surface TemperatureThe radiative temperature of the Earth surface measured by thermal remote sensing sensors.
GHSLGlobal Human Settlement LayerA spatial data framework produced by the European Commission providing global population distribution and built-up characteristics.
IoTInternet of ThingsA network of physical sensors collecting real-time environmental data that complement satellite remote sensing.
Spatial AutocorrelationSpatial AutocorrelationThe statistical measure of degree to which spatial features located close together in space share similar values.
Pop Exposure BurdenPopulation Exposure BurdenThe multiplicative product of environmental hazard intensity and population density within a given spatial unit.
TROPOMITROPOspheric Monitoring InstrumentThe satellite spectrometer aboard Copernicus Sentinel-5P measuring atmospheric trace gases at high spatial resolution.
Syndromic SurveillanceSyndromic SurveillanceThe real-time tracking of non-specific health indicators to detect potential disease outbreaks before formal clinical confirmation.
UHIUrban Heat IslandA phenomenon where urban regions experience significantly higher temperatures than surrounding rural hinterlands.
MAUPModifiable Areal Unit ProblemA statistical bias occurring when point data are aggregated into arbitrary spatial boundary units.
ERA5ECMWF Reanalysis v5A comprehensive global atmospheric climate reanalysis dataset produced by ECMWF.

Contents

  1. 1. Introduction to Digital Health and Environmental Exposure
  2. 2. Multi-Source Geospatial Data Infrastructure
  3. 3. Spatial Boundaries and Urban Spatial Units
  4. 4. Processing Atmospheric Sentinel-5P NO2 Data
  5. 5. Processing Thermal Stress via MODIS LST
  6. 6. Harmonizing Population Density and Vulnerability
  7. 7. Constructing Multi-Hazard Composite Exposure Models
  8. 8. Machine Learning and Spatial Exposure Modeling
  9. 9. Validating Environmental Metrics with In-Situ IoT Data
  10. 10. Export, Ethics, and Decision Support Workflows
1
Introduction
10 min

Urban populations across global megacities face compound environmental health risks from elevated atmospheric pollutants and extreme heat stress. Remote sensing, combined with open population grids and IoT monitoring, enables continuous environmental exposure modeling at high spatial fidelity. This course demonstrates how to integrate Sentinel-5P NO2 atmospheric observations, MODIS surface thermal data, and GHSL population counts to compute exposure metrics for digital epidemiology and urban planning.

GEE Asset ID
COPERNICUS/S5P/OFFL/L3_NO2
Dataset Name
Sentinel-5P OFFL NO2: Offline Nitrogen Dioxide
Study Area
Global Cities
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 Digital Health and Environmental Exposure Monitoring in Global Cities, 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 Course34_Digital Health and Environmental Exposure Monitoring in Global Cities
💡
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 GeoAI developer. Write a complete Google Earth Engine JavaScript script for London, UK (or any global metropolitan region). Load Sentinel-5P tropospheric NO2 (COPERNICUS/S5P/OFFL/L3_NO2, band 'tropospheric_NO2_column_number_density') and MODIS 8-day LST (MODIS/061/MOD11A2, band 'LST_Day_1km') for summer 2023 (2023-05-01 to 2023-09-30). Convert LST from Kelvin to Celsius. Load GHSL population count (JRC/GHSL/P2023D/GHS_POP, band 'population_count'). Normalize NO2 and LST to a 0 to 1 scale over the study area, construct an equal-weighted Composite Environmental Exposure Index, multiply it by population count to generate a Population Exposure Burden map, and export the resulting composite raster to Google Drive.
✨
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 Extraction and Preprocessing for Air Pollution and Thermal Stress
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 Extraction and Preprocessing for Air Pollution and Thermal Stress
// Define urban study region (London Metropolitan Area)
var roi = ee.Geometry.Point([-0.1276, 51.5074]).buffer(25000);

// Load Sentinel-5P Tropospheric NO2
var no2Col = ee.ImageCollection('COPERNICUS/S5P/OFFL/L3_NO2')
  .select('tropospheric_NO2_column_number_density')
  .filterBounds(roi)
  .filterDate('2023-05-01', '2023-09-30');

var meanNO2 = no2Col.mean().clip(roi);

// Load MODIS Land Surface Temperature (LST)
var lstCol = ee.ImageCollection('MODIS/061/MOD11A2')
  .select('LST_Day_1km')
  .filterBounds(roi)
  .filterDate('2023-05-01', '2023-09-30');

// Convert LST from raw scale factor to Celsius
var meanLST = lstCol.mean().multiply(0.02).subtract(273.15).clip(roi);

// Visualization parameters
var no2Vis = {min: 0.00002, max: 0.00015, palette: ['blue', 'cyan', 'green', 'yellow', 'red']};
var lstVis = {min: 15, max: 35, palette: ['blue', 'limegreen', 'yellow', 'orange', 'red']};

Map.centerObject(roi, 10);
Map.addLayer(meanNO2, no2Vis, 'Mean NO2 (mol/m2)');
Map.addLayer(meanLST, lstVis, 'Mean LST (C)');
🔑
Beginner note: This script defines a 25 km radial boundary around central London, loads offline Sentinel-5P NO2 column density, and retrieves MODIS LST data for summer 2023. It scales the raw MODIS thermal digital numbers into degrees Celsius and visualizes atmospheric and thermal exposure gradients.

5
Composite Exposure Index and Population Burden Modeling
10 min

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

Composite Exposure Index and Population Burden Modeling
// Load Population Grid from GHSL
var pop = ee.ImageCollection('JRC/GHSL/P2023D/GHS_POP')
  .filter(ee.Filter.date('2020-01-01', '2020-12-31'))
  .first()
  .select('population_count')
  .clip(roi);

// Min-Max normalization helper function
var normalize = function(img, roi) {
  var stats = img.reduceRegion({
    reducer: ee.Reducer.minMax(),
    geometry: roi,
    scale: 1000,
    maxPixels: 1e8
  });
  var minVal = ee.Number(stats.values().get(0));
  var maxVal = ee.Number(stats.values().get(1));
  return img.subtract(minVal).divide(maxVal.subtract(minVal));
};

var normNO2 = normalize(meanNO2, roi);
var normLST = normalize(meanLST, roi);

// Calculate Composite Environmental Exposure Index (CEEI)
var ceei = normNO2.multiply(0.5).add(normLST.multiply(0.5)).rename('CEEI');

// Estimate Population Exposure Weighted Score
var popBurden = ceei.multiply(pop).rename('Pop_Burden');

// Visualization
Map.addLayer(ceei, {min: 0, max: 1, palette: ['white', 'yellow', 'orange', 'purple']}, 'Composite Exposure Index');
Map.addLayer(popBurden, {min: 0, max: 500, palette: ['white', 'pink', 'red', 'maroon']}, 'Population Burden Index');
🔑
Beginner note: This section normalizes the NO2 and LST layers to a standardized 0 to 1 scale, computes an equal-weighted Composite Environmental Exposure Index (CEEI), and combines it with GHSL population count data to map spatial exposure hot spots where environmental hazard intersects high human density.

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 Population Burden raster to Google Drive
Export.image.toDrive({
  image: popBurden,
  description: 'London_Population_Exposure_Burden_2023',
  folder: 'GEE_Digital_Health',
  scale: 1000,
  region: roi,
  maxPixels: 1e8
});
🔑
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.

Exercise 1: Regional Exposure Adaptation

  1. Change the ROI coordinates to another global city such as Tokyo, New York, or Sao Paulo.
  2. Adjust the temporal date range to capture winter vs summer season contrast.
  3. Compare the spatial shifts in atmospheric NO2 concentration versus land surface temperature.

Exercise 2: Sensitivity Analysis on Index Weighting

  1. Modify the weighting scheme of the Composite Environmental Exposure Index from 50/50 to 70% NO2 and 30% LST.
  2. Re-calculate the population exposure burden map.
  3. Document how changing indicator weights impacts high-priority exposure zones.

Exercise 3: Microclimate and Green Infrastructure Mitigation Analysis

  1. Import ESA WorldCover or Sentinel-2 NDVI to extract urban green space masks.
  2. Overlay the NDVI map onto the LST layer to measure thermal reduction near urban parks.
  3. Quantify the mean temperature difference between built surfaces and urban forests.

Exercise 4: Spatial Zonal Statistics for Public Health Districts

  1. Upload or select an administrative borough polygon layer for your chosen city.
  2. Use reduceRegions to calculate the mean CEEI score for each administrative boundary.
  3. Format the output table for external integration with public health morbidity data.

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 IDCOPERNICUS/S5P/OFFL/L3_NO2
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 34 - Digital Health and Environmental Exposure Monitoring in Global Cities | GeoAI for Climate Change | Dr. Ayoub Lahlouh | UM6P/CUS | 2025/2026