This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the source for Geospatial Python Tutorials, a Jupyter Book site published by Spatial Thoughts. Content is a homepage (introduction.md) plus ~30 tutorial notebooks in notebooks/, organized by topic (geopandas_*, xarray_*, dask_*, stac_*, xee_*, samgeo_*) and listed in _toc.yml.
make html— clean_build/and runjupyter-book build .make gh-pages— commit + pushmain, build, then force-push_build/htmltogh-pagesviaghp-import- Any push to
maintriggers.github/workflows/deploy.yml, which rebuilds and force-pushes togh-pages, auto-publishing the live site. - CI pins
jupyter-book<2(the Sphinx-based v1 line);requirements.txtdoes not pin this, so a localpip installcan drift to v2 and behave differently. Match the CI pin when installing locally. - Jupyter Book is configured with
execute.execute_notebooks: off— notebooks are not re-executed at build time. Committed cell outputs are what gets published, so run and save notebooks locally (Colab or Jupyter) before committing if outputs need to change.
notebooks/data/ and notebooks/output/ are gitignored and not committed. Tutorial datasets are instead hosted as GitHub Release assets and fetched on demand by a download() helper in each notebook, from https://github.com/spatialthoughts/geopython-tutorials/releases/download/data/<filename>, downloading only if not already present locally. New tutorials should follow this pattern rather than committing data files.
Tutorial notebooks follow a consistent shape:
- H1 title cell, then
## Introduction(and often## Overview of the Task) ## Setup and Data Download— a%%capturecell that conditionallypip installs extra packages in Colab (if 'google.colab' in str(get_ipython()): !pip install ...), an imports cell, localdata/outputfolder creation, and thedownload()helper described above## Procedure— narrative markdown cells interleaved with code cells
Notebooks carry Colab metadata (colab: {name, provenance}) since they're authored/run in Google Colab; _config.yml sets a Colab launch button for each notebook page.