Skip to content

Repository files navigation

Earth Observation Data Cubes Course

A hands-on course for learning Earth observation data analysis using Python, xarray, and cloud-native geospatial tools.

Course Overview

This course takes you from Python fundamentals to satellite-based change detection analysis:

Notebook Topic Key Skills
01 Python Environment NumPy, pandas, matplotlib, Jupyter
02 xarray Fundamentals DataArray, Dataset, dimensions, coordinates
03 xarray Operations Aggregations, resampling, groupby, climatology
04 Satellite Remote Sensing Sentinel-2, CRS, vegetation indices (NDVI, NBR), cloud masking
05 STAC Data Discovery Planetary Computer, cloud data access
06 Capstone Project Harz forest dieback analysis
A1 Cloud-Native Formats (optional) COG, Zarr, FlatGeobuf, GeoParquet
A2 Parallel Computing with Dask (optional) Chunked xarray, lazy evaluation, .to_zarr()

Prerequisites

  • Python ≥ 3.10 (3.11 recommended)
  • Basic Python knowledge (variables, functions, loops)
  • Familiarity with command line basics
  • No prior experience with geospatial data required

Setup

1. Clone the repository

git clone <repository-url>
cd eo_datacubes_course

2. Create a virtual environment

python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

3. Install dependencies

pip install -r requirements-core.txt

This course uses a small core stack (NumPy/pandas/xarray/matplotlib + NetCDF readers) throughout. Some notebooks introduce additional geospatial/cloud packages just-in-time:

  • Notebook 04: rioxarray (geospatial raster operations via the .rio accessor)
  • Notebook 05–06 (Track B): pystac-client, planetary-computer (STAC + Planetary Computer)

If you hit binary dependency issues locally, rasterio and geopandas are usually easiest on the course server or via conda-forge:

conda create -n cubes -c conda-forge python=3.11 rasterio geopandas
conda activate cubes
pip install -r requirements-core.txt

Optional appendices (A1/A2) can be enabled with:

pip install -r requirements-optional.txt

requirements-optional.txt includes Dask + distributed runtime, cloud-format readers (fsspec, zarr, pyarrow, aiohttp), and geopandas.

4. Launch Jupyter

jupyter lab

Then navigate to the notebooks/ folder and start with 01_python_environment.ipynb.

Data

The data/ folder contains:

  • eobs_germany_2019_2023.nc - E-OBS climate data (temperature, precipitation) for Germany
  • harz_sentinel2_2018_2023.nc - Sentinel-2 imagery of the Harz region (multi-year datacube)

Repository Structure

eo_datacubes_course/
├── notebooks/                 # 00–06 + A1/A2
├── notebooks/solutions/       # dedicated worked solutions
├── data/                      # expected NetCDF datasets
├── data/manifest.json         # expected data size/checksum registry
├── assets/img/                # local notebook images
├── course_utils.py            # shared beginner-friendly helper checks/slicing
├── COURSE_RUBRIC.md           # outcomes and lightweight scoring map
├── scripts/run_notebooks.py   # restart-and-run execution gate
├── scripts/validate_data_manifest.py
├── requirements-core.txt      # default install
├── requirements-optional.txt  # appendix extras
├── 00_glossary.md
├── README.md
└── requirements.txt

Learning Path

  1. Start with Notebook 01 - Verify your environment and review Python basics
  2. Work through 02-03 - Master xarray for multi-dimensional data
  3. Complete 04 - Learn satellite imagery analysis (uses local data)
  4. Complete 05 - Discover cloud data via STAC (requires internet)
  5. Finish with 06 - Independent capstone project

Optional Appendices

  • A1 – Cloud-Native Formats — Deeper look at COG, Zarr, GeoParquet, and other formats
  • A2 – Parallel Computing with Dask — Scale your analysis beyond a single core

Requirements

Use requirements-core.txt for the core notebooks and requirements-optional.txt for appendices. Key core packages:

  • xarray - Multi-dimensional arrays
  • numpy, pandas - Data manipulation
  • matplotlib - Visualization
  • rioxarray - Geospatial extensions for xarray
  • pystac-client - STAC API access
  • planetary-computer - Microsoft Planetary Computer access

Solutions

Each task-bearing notebook now has a dedicated solutions notebook in notebooks/solutions/:

  • 01_python_environment_solutions.ipynb
  • 02_xarray_fundamentals_solutions.ipynb
  • 03_xarray_operations_solutions.ipynb
  • 04_satellite_remote_sensing_solutions.ipynb
  • 05_stac_data_discovery_solutions.ipynb
  • 06_capstone_project_solutions.ipynb
  • A1_cloud_data_formats_solutions.ipynb
  • A2_dask_parallel_solutions.ipynb

Inline solution blocks are intentionally removed from student notebooks so release flow is clean: attempt first, then open the corresponding solutions notebook.

Data Validation (Instructor)

Validate local datasets against the manifest before class:

python3 scripts/validate_data_manifest.py

Expected source-of-truth metadata is stored in data/manifest.json (file paths, byte sizes, SHA256 checksums).

Quality Check (Instructor)

Before delivery, run:

python3 scripts/course_quality_check.py

This checks notebook consistency, syntax, header markers, accessibility basics, solution wiring, and packaging assumptions.

Execution Gate (CI + Local)

To restart-and-run all notebooks with a fresh kernel per notebook:

python3 scripts/run_notebooks.py --include-solutions --timeout 2400 --network-retries 2

Continuous integration runs the same workflow in .github/workflows/notebook-ci.yml on every push and pull request.

Teaching Rubric

Use COURSE_RUBRIC.md for a lightweight outcomes map and 0-2 scoring guide per learning outcome.

Changelog (Teaching Polish)

  • Added a shared course_utils.py helper module and removed repeated utility definitions from notebooks.
  • Simplified core data-loading flow to explicit open_dataset + friendly missing-file guidance.
  • Shifted core plotting flow toward xarray-first examples and added an optional matplotlib-polish section in notebooks 0206.
  • Standardized local image references to assets/img/... and added source/license captions in appendices.
  • Strengthened the environment + data presence check in notebooks/00_course_overview.ipynb.
  • Added data/manifest.json + validator script for explicit file integrity checks.
  • Added scripts/run_notebooks.py and GitHub Actions notebook CI for restart-and-run quality gating.
  • Added a uniform “Quick Start Card” header in all student notebooks (time, prerequisites, goals, outcomes).
  • Improved plotting accessibility defaults (readable font sizes and colorblind-safer palettes).
  • Added COURSE_RUBRIC.md to align task/checkpoint evidence with instructor evaluation.

License

This course material is provided for educational purposes.

Acknowledgments

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages