Python for Geospatial Analysis
This is a course for scientists and researchers interested in using Python for solving
computational problems and spatial analysis problems that arise in daily work.
Familiarity with spatial analysis concepts is assumed. No prior experience with programming (in any language) is assumed.
By the end of the course, you will have all the knowledge you need to start programming competently in Python. You will know what's available with Python, how to structure your code and use Python's data structures competently, and how to find further resources for learning more. You will have had experience with using Python for various scripting and scientific data manipulation tasks, with a focus on analysing spatial data.
Day 1: Introduction to Python
Day 1 covers the basics of using Python for general programming tasks, including tips and tricks for making this easy. The syllabus is as follows:
Why use Python? What’s possible? Python versus Java, C, C++, Matlab, R, IDL, ...
How to install a complete Python environment (with plotting etc.)
Python syntax and concepts; file IO
Useful data structures
Modularity and packaging: functions, classes, modules, packages
Practical tips and tricks (including rapid prototyping with the IPython shell)
Tour of the amazing standard library (including handling dates, CSV files, zip files)
Day 2: Basics of Scientific Computing with Python
Day 2 teaches the use of Python for scientific computing. It covers array and matrix manipulation, an overview of available scientific routines, creating simple but beautiful 2D plots, and easy spreadsheet- style data analysis, with the packages NumPy, SciPy, Matplotlib, and Pandas. The syllabus is:
Introduction to numerical data manipulation with NumPy
Tour of SciPy for scientific data manipulation: optimization, statistics, sparse matrices, image denoising, classification, clustering, signal processing
2D plotting with Matplotlib
Data analysis and modelling with Pandas (including time-series, missing values, Excel data, SQL databases)
Day 3: Introduction to Scripting with ArcGIS
Day 3 dives into using Python in ArcGIS, creating and maintaining spatial analysis and geoprocessing workflows, and includes an introduction to creating scripts to work with spatial data in ArcGIS:
Introduction to spatial analysis in Python
Accessing Python from ArcGIS Desktop - the Python window and field calculations
Using model builder to build workflows
Moving from model builder to Python scripts
Using ArcGIS Extensions and toolboxes in Python
Accessing feature properties using “describe()”
Accessing and creating spatial objects using cursors
Logging and writing metadata with Python
Resources for finding help
Day 4: Open Source Handling of Spatial Data in Python
Day 4 introduces practical open-source tools for working with spatial data. The syllabus is:
Reading spatial data with open-source tools: QGIS, GDAL, GRASS
Projections; vector analysis and the ‘shapely’ package
Raster image analysis in Python: worked examples with SciPy (ndimage, signal) and PIL
More on spatial data access using Python: introduction to accessing shape files, KML
Network analysis using NetworkX
Advanced spatial analysis topics: spatial autocorrelation with PySAL; clustering and processing large spatial datasets; future directions and overview of the ecosystem
We would happy to swap in different topics on request. Some examples are:
Interfacing Python with R using RPy2
Accessing NetCDF data
Code efficiency: performance measurement and optimization
Writing re-usable and maintainable code
Approaches to running large processes in Python
Calling an ArcGIS server task as a web service
Bring Your Own Data
We also encourage you to supply your own data sets for us to use in the course if you wish.
We will supply you with printed course notes and a USB stick containing a complete Python environment based on VirtualBox. This saves time in the course and allows us to focus on using Python rather than installing it.
The USB stick also contains kitchen-sink Python installers for multiple platforms, solutions to the programming exercises, several written tutorials, and reference documentation on Python and the third-party packages covered in the course.
- Personal help:
- Your trainer(s) will be available after the course each day for you to ask any one-on-one questions you like — whether about the course material and exercises or about specific problems you face in your work and how to use Python to solve them.
- Food and drink:
- We will provide lunch, morning and afternoon tea, and drinks.
- The course will run from 9:00 to roughly 17:00 each day, with a breaks of an hour for lunch and 15 minutes each for morning and afternoon tea.
Please contact us to register your interest.