Introductory Spatial Python
Oct-19
: In this lesson, we will practice using Python Jupyter notebooks and GeoPandas with cyberinfrastructure.
Technology Context
- Python is the most popular programming langauge for (spatial) data science.
- Anaconda is a system for managing computational environments using Python and python software packages.
- JupyterLab is the next generation of JupyterNotebooks, a prime example of a computational notebook. Notebooks can run Python code.
- Pandas provides SQL-like database structures and functions
- GeoPandas provides spatial analysis functions
- Much of GeoPandas is based on Shapely geometry types and functions
- PySAL implements advanced spatial analysis and statistics, building off of the GeoPandas package
- Quarto is the python / Jupyter solution for rendering pretty manuscripts, books, and websites from Jupyter notebooks
Spatial data science with python on your own
What if you want to use Python and Jupyter notebooks to practice spatial data science on your local computer, without access to servers like Hour of CI and CyberGISX? You can install Anaconda and create a local conda environment including Jupyter notebooks and packages for spatial data science. The pandas
package provides the database functions you learned to love in SQL
while the geopandas
package provides the spatial functions, analogous to PostGIS
.
Cheat Sheets
Resources
Introductory Spatial Python CyberGISX Tutorials in Transition
I-GUIDE will eventually house a solid collection of introductory tutorials and workshops, but the infrastructure is currently in transition.
- From CyberGISX Hub, you can log in to CyberGISX and browse COVID-19 and Community Notebooks
- We can gain a solid introduction to spatial analysis in Python with Jupyter notebooks through a series of tutorial notebooks developed by Rebecca Vandewalle.
- Each notebook has an Open with CyberGISX button, which will copy the notebook contents from its GitHub repository into your personal CyberGISX account and launch the notebook.
- Let’s try three introductory notebooks, in this sequence:
- Jupyter Notebooks Quick Start
- Introduction to Python Programming
- Python Geospatial Libraries note: this tutorial is found in
cybergis-jupyter-notebook-repo/python_intro/Python_Geospatial_Libraries_p3.py
- Python files for the code
Main Page