Spatial Python Programming

This course builds on introductory Python skills and focuses on programming for spatial and spatiotemporal data analysis. Students work with common geospatial data structures and learn to process, analyze and automate geographic workflows using both commercial and open-source Python libraries. Practical exercises connect programming principles with GIScience applications, spatial analysis, data processing and reproducible geospatial workflows.

Course at a Glance

Focus: Python programming for spatial data analysis
Approach: Hands-on, computational and GIScience-based
Core Skills: Scientific computing, spatial data processing, automation, machine learning andprogramming workflows
Key Technologies: Python, NumPy, Pandas, SciPy, Matplotlib, scikit-learn, GitHub, ArcGIS API for Python, ArcPy

Why Spatial Python?

Modern GIScience increasingly depends on programming to automate workflows, analyze complex spatial datasets and develop analytical methods. Spatial Python enables students to move beyond standard GIS tools by combining programming, spatial analysis, scientific computing and machine learning within flexible and scalable geospatial workflows.

Course Objectives

  • Master diverse data structures for efficient data manipulation, especially for geographic data management
  • Utilize essential Python packages such as NumPy, SciPy, Matplotlib and scikit-learn proficiently
  • Design and implement effective modeling strategies tailored to specific datasets and objectives
  • Gain practical experience with supervised machine-learning algorithms, including linear regression
  • Implement spatial and temporal modeling techniques for data analysis

View / Download Syllabus →

Course Content

Explore advanced Python programming through scientific computing, machine learning, GIS automation, web-based GIS and the development of  spatial-analysis workflows:

Lesson 1: Introduction

Course goals, expectations, and grading; Introduction to Jupyter Notebook and ArcGIS Pro Notebook; Working with AI in the course; Writing and executing Python scripts; Markdown documentation; Visualizing outputs in Jupyter.

Python fundamentals for GIS automation; Variables and data types; Lists and dictionaries; Control flow (if/else); Loops; Functions; Introduction to Object-Oriented Programming (OOP) for automation

Scientific Python for GIS workflows; NumPy arrays for raster processing; Pandas for attribute tables and joins; Matplotlib for visualization; Practical SciPy utilities.

Foundations of supervised learning; Overview of supervised learning; Linear regression (applied focus); Model evaluation (R², RMSE); Data preparation for modeling.

Implementing linear regression using scikit-learn; Model training and testing; Applying spatial predictions; Automating modeling workflows; Introduction to GitHub and version control.

Logistic regression for spatial classification; Binary classification workflows; Suitability and risk mapping; Model evaluation (accuracy, confusion matrix); Automating classification outputs.

Working with AI for GIS automation; Using AI tools for code assistance; Prompt design for spatial scripting; Debugging with AI; Verifying generated code; Ethical and professional considerations.

Project design and code architecture; Designing GIS automation workflows; Script modularization; Writing reusable functions; Logging and error handling; Folder organization and configuration management; Managing Python environments (conda); dependency management; reproducible environments.

ArcGIS API for Python; Querying and analyzing hosted feature layers; Updating data programmatically; Automating web map creation; Publishing notebooks to the cloud.

Spatial analysis using ArcPy (Part I); Batch processing; Parameterized scripts; Building custom script tools in ArcGIS Pro; Comparing Model Builder and Python scripting.

Spatial analysis using ArcPy (Part II); arcpy.mp module; Automating buffer, clip, and intersect tools; Writing repeatable spatial workflows

Spatial analysis using ArcPy (Part II): geographic data arcpy.da module; Search, update, and insert cursors; Efficient attribute manipulation; Schema management; Performance considerations

Open-source GIS Python; GeoPandas; Shapely; Python in QGIS and GRASS; Comparing open-source and ArcGIS environments.

Tools & Technologies

The course provides extensive hands-on experience with Python tools and libraries used in contemporary GIScience and spatial data analysis. Students work with NumPy, Pandas, SciPy, Matplotlib and scikit-learn for scientific computing, visualization and machine learning; GitHub for version control and collaborative workflows; the ArcGIS API for Python for web-based and cloud GIS; and ArcPy for geoprocessing automation, spatial data management and integration with ArcGIS Pro.