Python and GIS tutorials

55 Python tutorials, each run end-to-end before publishing: download the scripts and you should get the same figures and numbers you see on the page. Alongside them, 5 QGIS and ArcGIS Pro walkthroughs. Filter by what you want to learn, or follow a learning path or a series.

All tutorials and articles

Learning paths

Each path runs from a first step to research-grade analysis, in an order where every tutorial builds on the one before. Jump in wherever the level suits you.

Python GIS foundations

10 tutorials · Beginner to Intermediate

Vector data, projections, joins and maps, then rasters, zonal statistics and cloud-native formats.

  1. Getting started with GeoPandas: projections, spatial joins and choropleth maps Beginner
  2. Coordinate reference systems in Python: EPSG codes, pyproj transforms and reprojecting vectors and rasters Beginner
  3. Spatial joins in GeoPandas: sjoin, predicates, sjoin_nearest and point in polygon Beginner
  4. Make a map in Python with matplotlib and cartopy: projections, classified choropleths, scale bars, north arrows and inset maps Beginner
  5. Interactive web maps from Python with Folium and GeoPandas .explore() Beginner
  6. Terrain analysis in Python: stream, clip and analyse a DEM with rasterio and rioxarray Intermediate
  7. Zonal statistics in Python: exactextract vs rasterstats, with partial pixels, land-cover fractions and a benchmark Intermediate
  8. Raster to vector in Python: polygonize with rasterio, rasterize boundaries and convert a GeoTIFF to a Cloud Optimized GeoTIFF Intermediate
  9. Fast vector geoprocessing in Python: spatial indexes, overlays and modern file formats Intermediate
  10. Query Overture Maps with DuckDB spatial and GeoParquet in Python Intermediate

Remote sensing and Earth observation

10 tutorials · Intermediate to Advanced

Search Sentinel-2 with STAC, mask clouds, build index time series, then measure fire, water, heat, snow and gas.

  1. Measuring Lake Mead's shrinking shoreline with Sentinel-2, STAC and Python Intermediate
  2. Sentinel-2 cloud and cloud-shadow masking in Python: SCL vs s2cloudless vs OmniCloudMask Intermediate
  3. NDVI time series in Python with Sentinel-2, odc-stac and xarray Intermediate
  4. Burn severity mapping with Sentinel-2 and dNBR in Python (Saddleworth Moor 2018) Intermediate
  5. Monitoring reservoir water quality from space with Sentinel-2 and Python (Peak District case study) Intermediate
  6. Land surface temperature from Landsat in Python: mapping London's urban heat island Intermediate
  7. Snow cover mapping with NDSI in Python: Sentinel-2 and MODIS over the Cairngorms Intermediate
  8. Sentinel-5P NO₂ in Python: mapping air pollution from TROPOMI over the UK and north-west Europe Intermediate
  9. Coastal erosion and shoreline change from Sentinel-2 in Python (Holderness, 2017–2026) Advanced
  10. Methane plume detection in Python with NASA EMIT: mapping and quantifying landfill plumes Advanced

SAR and InSAR

10 tutorials · Intermediate to Advanced

Radar from first principles: speckle, floods, ships and crops with Sentinel-1, then interferometry and source modelling.

  1. SAR speckle filtering in Python: Lee, refined Lee, Frost and Gamma-MAP on Sentinel-1 Intermediate
  2. Sentinel-1 SAR flood mapping in Python: the 2022 Pakistan floods Intermediate
  3. Sentinel-1 ship detection in Python: a CA-CFAR detector off the Port of Rotterdam Intermediate
  4. Sentinel-1 crop monitoring in Python: SAR time series for wheat and oilseed rape Intermediate
  5. Sentinel-1 soil moisture in Python: change detection checked against COSMOS-UK Intermediate
  6. Earthquake damage mapping with Sentinel-1 in Python: log ratio and z-scores in Antakya Intermediate
  7. InSAR ground subsidence in Python: one year of Mexico City sinking, from Sentinel-1 Advanced
  8. InSAR volcano deformation in Python: mapping magma inflation at Svartsengi, Iceland, with Sentinel-1 Advanced
  9. Mogi model inversion in Python: magma depth and volume from InSAR at Svartsengi, Iceland Advanced
  10. InSAR time series in Python: Svartsengi inflation cycles validated with GNSS Advanced

Machine learning and AI

10 tutorials · Beginner to Advanced

From rule-based maps and random forests to U-Nets, transformers and foundation-model embeddings, validated honestly.

  1. Habitat mapping with Sentinel-2 in Python: spectral index rules and an honest accuracy assessment Beginner
  2. Land cover classification in Python: a Sentinel-2 random forest with scikit-learn Intermediate
  3. Habitat classification with LightGBM in Python: Sentinel-2, Sentinel-1 and terrain fusion Intermediate
  4. Segment Anything on satellite and aerial imagery in Python: a samgeo tutorial Intermediate
  5. Training data for deep learning on satellite imagery: Sentinel-2 image chips in Python Intermediate
  6. U-Net satellite image segmentation in PyTorch: a TorchGeo and Sentinel-2 tutorial on a CPU Advanced
  7. Deep learning inference on large rasters: sliding-window prediction, COGs and polygons in Python Advanced
  8. Object-based image analysis in Python: OBIA habitat classification with Sentinel-2 Advanced
  9. Satellite image time series classification with deep learning: TempCNN and L-TAE in PyTorch on a CPU Advanced
  10. AlphaEarth satellite embeddings in Python: few-shot habitat mapping, uncertainty and area estimates Advanced

Multi-part series

One project, followed from raw data to result over several tutorials. Read them in order.

Every topic