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 |
|---|---|---|
| Spatial Accessibility | Spatial Accessibility Metric | A measure of how easily populations in a given spatial location can reach physical healthcare services given distance, travel friction, and infrastructure. |
| Friction Surface | Travel Time Friction Surface Grid | A spatial raster layer representing the time required to cross each pixel based on road networks, terrain elevation, land cover, and travel mode. |
| WorldPop | WorldPop High Resolution Population Grids | A global spatial dataset offering high-resolution estimates of human population distribution at 100-meter grid resolution. |
| Distance Decay | Distance Decay Function | A geographic principle stating that service utilization decreases continuously as geographic distance or travel time to the facility increases. |
| E2SFCA | Enhanced Two-Step Floating Catchment Area Method | A spatial accessibility modelling approach that accounts for both supply capacity of facilities and demand competition from surrounding populations. |
| Health Equity | Geographic Health Equity Indicator | The principle that access to vital health infrastructure should be equally distributed regardless of geographical location or socio-economic isolation. |
| Catchment Area | Healthcare Facility Catchment Zone | The geographic region from which a primary clinic or hospital draws its patient population based on physical proximity or administrative boundaries. |
| MAUP | Modifiable Areal Unit Problem | A statistical bias where spatial analysis outcomes change based on how geographic boundaries and aggregation units are defined. |
| Travel Time Cost | Isochrone Travel Burden | The total duration in minutes required for an individual to travel from a specific home location to the nearest functioning facility. |
| Spatial Autocorrelation | Spatial Dependence Measure | The degree to which nearby locations display similar values of healthcare accessibility or health service deficits. |
| GeoAI | Geospatial Artificial Intelligence | The integration of spatial analytics, machine learning, and high-performance cloud computing to address spatial public health problems. |
| Demographic Vulnerability | Population Vulnerability Index | An assessment of sensitive population cohorts, such as children and elderly, living in areas with severe healthcare travel barriers. |
Equal access to medical care remains a pivotal public health challenge across Sub-Saharan Africa, where physical distance and transportation barriers severely impede timely treatment. This course teaches how to combine high-resolution gridded population datasets from WorldPop with travel friction surfaces from the Malaria Atlas Project inside Google Earth Engine. Students will learn to map travel costs, identify vulnerable rural populations living outside standard healthcare catchment zones, and quantify spatial equity metrics for evidence-based health policy.
WorldPop/GP/100m/popYou need two browser tabs open side by side throughout this course.
Course27_Healthcare Accessibility Mapping with GIS and AI in Sub-Saharan Africa
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.
// 1. Define Spatial Scope: Country boundary for Kenya in Sub-Saharan Africa
var countries = ee.FeatureCollection('FAO/GAUL/2015/level0');
var kenya = countries.filter(ee.Filter.eq('ADM0_NAME', 'Kenya'));
var roi = kenya.geometry();
// 2. Load WorldPop 2020 Population Count Data
var worldpop = ee.ImageCollection('WorldPop/GP/100m/pop')
.filter(ee.Filter.eq('year', 2020))
.select('population')
.mosaic()
.clip(roi);
// 3. Load Oxford MAP Travel Time to Cities (2015)
var travelTime = ee.Image('Oxford/MAP/accessibility_to_cities_2015_v1_0')
.select('accessibility')
.clip(roi);
// 4. Load SRTM Elevation for topographical context
var elevation = ee.Image('USGS/SRTMTM_003').select('elevation').clip(roi);
var slope = ee.Terrain.slope(elevation);
// 5. Center map display over Kenya
Map.centerObject(kenya, 6);
Map.setOptions('ROADMAP');
// 6. Define visualization parameters for population
var popVis = {
min: 0.0,
max: 50.0,
palette: ['#f7fcf5', '#e0f3f8', '#9ecae1', '#4292c6', '#084594']
};
// 7. Define visualization parameters for travel accessibility (minutes)
var travelVis = {
min: 0.0,
max: 300.0,
palette: ['#1a9850', '#91cf60', '#d9ef8b', '#fee08b', '#fc8d59', '#d73027']
};
// 8. Add layers to the Earth Engine map canvas
Map.addLayer(worldpop, popVis, 'WorldPop Population 2020 (per cell)');
Map.addLayer(travelTime, travelVis, 'Travel Time to Facility/City (Min)');
Map.addLayer(slope, {min: 0, max: 20, palette: ['white', 'black']}, 'Terrain Slope (Degrees)', false);
Add this block after the previous code. It continues the analysis with additional processing and visualization.
// 1. Define criteria for underserved health population
// High population density (> 5 people per 100m grid cell) AND long travel time (> 120 minutes)
var highPopMask = worldpop.gte(5);
var longTravelMask = travelTime.gte(120);
// 2. Combine conditions to extract priority underserved spatial zones
var underservedMask = highPopMask.and(longTravelMask);
var underservedPop = worldpop.updateMask(underservedMask);
// 3. Highlight priority underserved areas in bright red
var underservedVis = {
palette: ['#ff0000']
};
Map.addLayer(underservedPop, {min: 5, max: 100, palette: ['#ff7800', '#e31a1c', '#800026']}, 'Underserved Population Grid');
// 4. Calculate total estimated population living > 2 hours away from facility nodes
var totalUnderserved = worldpop.updateMask(longTravelMask).reduceRegion({
reducer: ee.Reducer.sum(),
geometry: roi,
scale: 100,
maxPixels: 1e9
});
// 5. Calculate total national population for percentage baseline
var totalPopulation = worldpop.reduceRegion({
reducer: ee.Reducer.sum(),
geometry: roi,
scale: 100,
maxPixels: 1e9
});
// 6. Print summary quantitative results to console
print('Total National Estimated Population:', totalPopulation.get('population'));
print('Estimated Population > 2 Hours Travel Time:', totalUnderserved.get('population'));
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 underserved population raster to Google Drive for GIS reporting
Export.image.toDrive({
image: underservedPop.unmask(0),
description: 'Underserved_Healthcare_Population_Kenya',
folder: 'GEE_PublicHealth_Exports',
fileNamePrefix: 'Underserved_Pop_Kenya_2020',
region: roi,
scale: 250,
maxPixels: 1e9
});
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 | WorldPop/GP/100m/pop |
| 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" |