Spatial Python Implementation
The Spatial Python Implementation course is designed for students who have completed the Python for Beginners course (or equivalent) and wish to deepen their understanding of Python for spatial-temporal analysis of geographic data. Throughout the course, participants will learn to work with typical data structures, explore commercial and open-source packages for spatial data manipulation, and delve into advanced topics such as statistical analysis, machine learning models, and visualization. The course will be delivered in a hybrid format (both frontal and online), with weekly assignments. Upon completion, students will undertake a final project to demonstrate their mastery of the course material.
The objectives of the course:
- Master diverse data structures for efficient data manipulation, especially for geographic data management.
- Utilize essential Python packages like NumPy, SciPy, Matplotlib, and scikit-learn proficiently.
- Design and implement effective modeling strategies tailored to specific data sets and objectives.
- Gain practical experience with supervised machine learning algorithms, including linear regression.
- Implement spatial and temporal modeling techniques for data analysis.
Syllabus
Lesson | Themes |
1 | – Overview of course goals, expectations, and grading. – Orientation to key IDEs: Jupyter Notebook and ArcGIS Pro Notebook – How to submit code via Virtual Programming Lab (VPL) in Moodle or similar LMS. – First hands-on tasks: writing a basic script, markdown documentation, and visualizing output in Jupyter. Ex1 |
2 | – Variables, types, lists, dictionaries, tuples. – Control flow: if/else, loops. – Defining functions and using scope. – Intro to Object-Oriented Programming: classes, methods, inheritance. Ex2 |
3 | Introduction to key packages: – NumPy for numerical operations, – Pandas for data frames and table joins, – Matplotlib for visualization, – SciPy for statistics and optimization. Ex3 |
4 | – Foundations of supervised learning and model evaluation. – Focused discussion on Linear Regression: – assumptions, fitting a model, interpreting coefficients, performance metrics (R², RMSE). – Preparation for the applied ML session. |
5 | – Implementing Linear Regression using scikit-learn – Model training, testing, and evaluation using spatial datasets. – Introduction to GitHub: version control basics, repositories, commits, branches. Ex4 |
6 | – Introduction to ArcGIS API for Python. – Querying, visualizing, and analyzing hosted feature layers from ArcGIS Online. – Automating web map creation and feature updates. – Publishing notebooks to the cloud Ex5 |
7 | – Introduction to Arcpy |
8 | Spatial analysis using ArcPy: the mp module – Automating common tools: buffer, clip, intersect. – – Creating repeatable workflows using scripts. Ex6 |
9 | Working with geographic data: the da module – Advanced spatial data management using arcpy.da (data access module). – Working with cursors (search, update, insert) efficiently. – Use cases: spatial joins, data cleanup, schema introspection Ex7 |
10 | – Collaborative workshop focused on the final integrative project. – Students work on selected datasets and apply full-stack Python workflows (from data access to visualization and modeling). – Instructor feedback and problem-solving support. |