Intermediate Geospatial Analysis in Python

Intermediate Geospatial Analysis in Python icon

Intermediate Geospatial Analysis in Python

About This Course

You can already load a shapefile, reproject it and draw a map. This course is about the analysis that comes after that: turning messy location data into something you can measure, modelling infrastructure as a network, and deciding whether a spatial pattern is genuine or just noise.

Day one is about getting data into a state you can analyse, and doing it repeatably. Geocoding is the honest example: sending 23,000 place names to a service that permits one request a second takes about thirteen hours, so most of that topic is about running long, unreliable jobs — caching results to disk, tolerating failures, reporting progress and saving as you go. The rest of the day moves between representations. You vectorise a scanned map with Rasterio, rasterise a building footprint back the other way, reduce a river polygon to a centreline so you can measure its length, and use scikit-image to find and count features in drone infra-red imagery.

Day two asks whether what you are looking at means anything. Near things are more related than distant things, so a map that looks clustered often is, and a map that looks clustered sometimes is not. With PySAL you build spatial weights, measure global autocorrelation, and then localise it to find the hotspots, coldspots and individual anomalies worth investigating. The same chapter runs the test against random noise of the same shape, which is the quickest way to see what a significant result actually looks like. You then predict continuous surfaces from scattered observations with SciPy and scikit-learn — including why a regressor that assumes independent samples is the wrong tool for spatially dependent data.

The last part of the course deals with scale. When a raster no longer fits in memory, you chunk it with Dask and keep working. When a scatter plot has more points than the screen has pixels and comes out as a solid block of ink, you aggregate it with Datashader instead. Worked examples use real datasets throughout, and you write code in every section.

Who This Course Is For

GIS analysts, scientists, engineers, surveyors and data analysts who already work with spatial data in Python and now need it to answer questions rather than only to draw maps. It suits people who can load a shapefile and a raster and plot them, and who are stuck at the next step: deciding whether a cluster on the map is real, measuring capacity across a network, or processing imagery that no longer fits in memory.

It also suits teams in environment and water agencies, transport, mining and resources, emergency services, local government and health, where spatial analysis is repeated on a schedule and the datasets keep growing. Common backgrounds include people who have completed Python for Geospatial Analysis and want the analytical half of the subject.

Prerequisites

Our Python for Geospatial Analysis course, or equivalent experience.

You should already be comfortable reading vector data into GeoPandas, working with rasters in xarray or Rasterio, and handling coordinate reference systems and reprojection. We revise these on the first morning rather than teaching them from scratch. No background in graph theory, spatial statistics or parallel computing is assumed, and you do not need any machine learning experience.

What You'll Learn

  • Geocode large batches of messy address and place-name data with GeoPy, including the rate limiting, caching and checkpointing a long job needs
  • Convert between raster and vector representations with Rasterio and scikit-image, including reducing a shape to its centreline
  • Detect and count features in imagery with scikit-image, and check the result against ground-truthed data
  • Model infrastructure as a network in NetworkX and answer capacity and shortest-path questions
  • Test whether a spatial pattern is genuine or an artefact, and locate hotspots and coldspots, using PySAL
  • Predict a continuous surface from scattered observations with SciPy and scikit-learn, and render datasets too large to plot point by point

Course Syllabus

Day 1 — Automating geospatial processes

  • Revision of GeoPandas, projections and raster handling
  • Geocoding at scale with GeoPy: rate limits, caching and fuzzy place names
  • Converting between raster and vector representations
  • Skeletonisation: reducing a polygon to a centreline
  • Image analysis with scikit-image, from filters to labelled regions
  • Network analysis with NetworkX: flow, capacity and shortest paths
  • Automating an analysis pipeline end to end

Day 2 — Extended analysis of spatial data

  • Spatial weights and connectivity with PySAL
  • Spatial dependence: Moran's I, Geary's C and the Moran scatterplot
  • Local indicators of spatial association: hotspots, coldspots and anomalies
  • Spatial interpolation and regression with SciPy and scikit-learn
  • Large-scale raster analysis with Dask and xarray
  • Rendering very large datasets with Datashader

Upcoming Sessions

Questions?

Need help choosing the right course or have questions about content?

Contact Us