Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Using interactive maps to inspect data, compare layers and evaluate GeoAI outputs

1. Context

In the previous lesson, you searched for spatial data, inspected candidate sources and created small data subsets. This lesson turns those data into interactive maps.

Interactive mapping is not only a final presentation step. It is part of the whole GeoAI workflow. Before modelling, you use maps to inspect imagery, check whether labels align with visible features, compare data sources and identify problems such as clouds, shadows or missing coverage. After Inference, you use maps to compare predictions with source imagery, reference labels and spatial context.

This lesson focuses on practical visual checks using Python and Leafmap. You will work with raster layers, vector overlays, cloud-hosted datasets, split-panel comparisons and model-style outputs.

The next lessons build on these skills. Data preprocessing, training data creation, segmentation, detection and change detection all depend on your ability to see whether spatial layers actually make sense together.


2. Motivation

A workflow can run without errors and still be spatially wrong.

A raster may be shifted by one projection issue. A label layer may not match the imagery date. A building mask may look good in one neighbourhood but fail near shadows or tile edges. A model metric may look strong while the map reveals systematic errors.

Interactive maps help you find these problems early because you can zoom, pan, toggle layers and compare datasets at the same location. This is especially important in project work, where you often combine data from different providers, sensors, dates and formats.

A useful rule for SDS320 is:

If a spatial decision affects your project, map it before you trust it.

3. Learning objectives

By the end of this lesson, you should be able to:


4. Lesson roadmap

Work through the pages in this order:

  1. Leafmap basics — create your first interactive maps and use basemaps for spatial context.

  2. Raster data on maps — display local and remote raster data, including GeoTIFFs, COGs and band combinations.

  3. Planetary Computer maps — search, preview and visualise cloud-hosted items before downloading data.

  4. Vector data on maps — overlay GeoJSON files and GeoDataFrames on imagery and style them clearly.

  5. Split-panel comparisons — compare two layers interactively with a draggable divider.

  6. Model results on maps — overlay masks, labels or predictions on source imagery for visual evaluation.

  7. Visualisation best practices — choose colormaps, layer names, opacity and context layers deliberately.

  8. Project transfer — turn the lesson into a concrete visual inspection plan for your own project.


5. Project framing

As you work through the lesson, keep your own project in mind.

Use these guiding questions:


6. Before class

Before class, prepare the following:


7. After this lesson

After completing this lesson, you should have:

These outputs do not need to be polished. Their purpose is to help you make better project decisions before the workflow becomes more complex.