How-To Guides
Concrete, step-by-step solutions for Python GIS tasks — from loading a shapefile to shipping a scheduled, tested, containerised pipeline.
These guides are built around specific, real-world tasks. Each one starts with a clear problem statement, gives you a quick working answer, and then walks through a complete solution with code you can copy and adapt.
They span the whole arc of a GIS workflow. The everyday operations are here — reading a shapefile, reprojecting, filtering, spatial joins, buffers, choropleths, raster extraction. So is everything that comes after: cleaning messy attributes and geometry, batch-processing whole folders, chunking datasets too large for memory, building configurable pipelines, testing them, containerising them, running them in CI, and driving QGIS itself from Python.
Every guide is self-contained, so you do not need to read them in order. If you would rather follow a route than pick a single task, the learning paths string these guides into ordered routes through a subject.
Browse by topic
The fastest way in. Each topic page gathers these guides alongside the concepts behind them and the errors they cause.
Fundamentals What the objects, files and libraries actually are.
Geometry & space The shapes themselves, where they sit on the earth, and how they relate.
Imagery & point clouds Data that arrives as measurements of a surface rather than as features on it.
Analysis Getting from a raw download to something you can put in front of someone.
- Data cleaning
- Raster & rasterio
- Maps & visualisation
- Spatial statistics
- Census & demographics
- Housing & property data
- Terrain & elevation
- Hydrology & watersheds
- Movement & time
- Public transit & GTFS
- Web maps & tiles
- Python map libraries
- Cartography & map design
- Election maps & cartograms
- Animated & time-series maps
- Wildfire mapping
- Land cover & land change
- Health & disease mapping
- Flow maps & origin–destination data
- Bike share & micromobility
- Air travel & flight data
- Road traffic counts
- Street trees
- Drought
- Taxi & ride-hail trips
- Power plants & electricity
- Bridges & infrastructure condition
- 311 & service requests
- Severe storms & tornadoes
- Hurricanes & tropical cyclones
- Disasters & flood insurance
- Electric vehicles
- Restaurant inspections
- Historical maps & georeferencing
- Snow, ice & glaciers
- Crime & public safety mapping
- Road crashes & traffic safety
- Population grids
- Sea surface temperature & marine heatwaves
- Earthquakes & seismic hazard
- Wind & vector fields
- Rainfall, radar & storms
- Coastal & marine
- Agriculture & vegetation
- Biodiversity & species data
- Linear referencing
- Natural hazards & risk
- Air quality
- Renewable energy siting
- Urban form & morphology
- Forest monitoring
- Urban heat
Modelling & prediction Predicting values where nobody measured them, and deciding where things should go — with the limits of each model attached.
Production Work that runs without you watching it.
Delivery & sharing Handing the work to someone else: an API, an app, a link that keeps working.
Governance & trust What a dataset is allowed to say, who it is allowed to say it about, and how anyone proves where it came from.
Tools The other software in a Python GIS stack, driven from Python.
Or follow a learning path Curated routes in the order that builds on itself — concepts first, then each task, then the errors it produces.
- Finding & Fetching Data
- Spatial Statistics
- Terrain & Elevation
- Networks & Routing
- Raster Analysis
- Spatial SQL & PostGIS
- Making Maps
- GIS Data Cleaning
- Batch Processing
- Automation & Pipelines
- QGIS Automation
- Satellite Imagery
- LiDAR & Point Clouds
- Cloud-Native GIS
- Publishing Web Maps
- Movement & Time
- Spatial Machine Learning
- Interpolation & Surfaces
- Geocoding & Addresses
- Cartography & Map Design
- DuckDB for Spatial Data
- Serving Spatial Data
- Maps, Apps & Dashboards
- Gridded & Climate Data
- H3 & Global Grids
- Census & Demographics
- Location & Accessibility
- Hydrology & Watersheds
- Geoprivacy & Anonymisation
- Metadata, Licensing & Provenance
- 3D & Buildings
- Coastal & Marine
- Agriculture & Crops
- Public Transit & GTFS
- Radar & SAR Imagery
- Biodiversity & Species Data
- Linear Referencing
- Natural Hazards & Risk
- Air Quality Data
- Renewable Energy Siting
- Urban Morphology
- Forest Monitoring
- Urban Heat Mapping
Every how-to guide, A–Z
Page 1 — use the page links below, or browse by topic above.
- How Many Flood Insurance Claims Come from Outside the Flood Zone?
- How Much Rain and Cold Cut Bike-Share Ridership: A Daily Model in Python
- How Old Are America's Bridges? Year Built, Reconstruction and Condition
- How to Add a Basemap to a GeoPandas Map with contextily
- How to Add a Download Button for Filtered Spatial Data
- How to Add a Dry-Run Mode to a Batch GIS Script
- How to Add a Progress Bar and ETA to a Long GIS Batch Job
- How to Add a Scale Bar and North Arrow to a Python Map
- How to Add an Inset and Locator Map in Python
- How to Add Bounding Box and Attribute Filters to a Spatial API
- How to add differentially private noise to spatial counts
- How to Add Filters and Widgets That Drive a Map
- How to Add Interactivity and Popups to a Web Map
- How to Add Legends, Labels and a Scale Bar to a GeoPandas Map
- How to Add Retries and Timeouts to an Automated GIS Job in Python
- How to Add, Edit and Delete Features with PyQGIS
- How to aggregate events to route segments
- How to Aggregate Millions of Points into a Grid with DuckDB
- How to Aggregate Movement into Flows Between Zones
- How to Aggregate Origin–Destination Flows to Larger Zones in Python
- How to Aggregate Points into H3 Hexagons and Map Them
- How to aggregate points to units that meet a minimum count
- How to Aggregate Spatial Data by Region in GeoPandas
- How to Aggregate Survey Estimates and Their Margins of Error
- How to Aggregate Tract Health Estimates to Neighbourhoods in Python
- How to Analyse a Land Cover Time Series in Python
- How to Analyse a Rain Gauge Network in Python: Gaps, Density and Areal Rainfall
- How to Analyse a Sea-Ice Extent Time Series in Python
- How to Analyse Airport Taxi Trips: JFK Flat Fares and LaGuardia
- How to Analyse an Air Quality Time Series in Python