Sergio Rey is professor of geographical sciences and core faculty member of the GeoDa Center for Geospatial Analysis and Computation at the Arizona State University. His research interests include open science, spatial and spatio-temporal data analysis, spatial econometrics, visualization, high performance geocomputation, spatial inequality dynamics, integrated multiregional modeling, and regional science. He co-founded the Python Spatial Analysis Library (PySAL) in 2007 and continues to direct the PySAL project. Rey is a fellow of the spatial econometrics association and editor of the journal Geographical Analysis.
Dani Arribas-Bel is Lecturer in Geographic Data Science and member of the Geographic Data Science Lab at the University of Liverpool (UK). Dani is interested in undestanding cities as well as in the quantitative and computational methods required to leverage the power of the large amount of urban data increasingly becoming available. He is also part of the team of core developers of PySAL, the open-source library written in Python for spatial analysis. Dani regularly teaches Geographic Data Science and Python courses at the University of Liverpool and has designed and developed several workshops at different levels on spatial analysis and econometrics, Python and open source scientific computing.
The workshop is based on a courses taught to Geography undergraduates with no previous programming experience, but compressed into the appropriate length. Some statistical background and familiarity with Python are recommended to follow along comfortably, but there is no requirement to be knowledgeable in the Python geospatial stack.
This two-part tutorial will first provide participants with a gentle
introduction to Python for geospatial analysis, and an introduction to version
PySAL 1.11 and the related eco-system of libraries to facilitate common tasks
for Geographic Data Scientists.
The
first part will cover munging geo-data and exploring relations over space.
This includes
importing data in different formats (e.g. shapefile, GeoJSON), visualizing,
combining and tidying them up for analysis, and will use libraries such as pandas
,
geopandas
, PySAL
, or rasterio
. The second part will provide a gentle
overview to demonstrate several techniques that allow to extract geospatial
insight from the data. This includes spatial clustering and regression and point
pattern analysis, and will use libraries such as PySAL
, scikit-learn
,
or clusterpy
. A particular emphasis will be set on presenting concepts
through visualization, for which libraries such as matplotlib
, seaborn
,
and folium
will be used.
-
Software and Tools Installation (10 min)
-
Spatial data processing with PySAL (45 min)
a. Input-output
b. Visualization and Mapping
c. Spatial weights
-
Exercise (10 min.)
-
ESDA with PySAL (45 min)
a. Global Autocorrelation
b. Local Autocorrelation
c. Space-Time exploratory analysis
-
Exercise (10 min)
-
Spatial clustering a (30 min)
a. Geodemographic analysis
b. Regionalization
-
Exercise (10 min)
-
Spatial Regression (30 min)
a. Overview
c. Basic spatial regression: spatial lag and error model
-
Exercise (30 min)
-
Point Patterns (30 min)
a. Kernel Density Estimation visualization
b. Centrography and distance based statistics
-
Exercise (10 min)
Participants should have installed the following dependencies:
-
Anaconda or MiniConda Python distributions for Python 2.7. See installation instructions on the links.
-
git
-
A
conda
environment loaded with all the dependencies can be installed by running thepydata.sh
script available as part of theenvs
repository (Github link). To install it, follow these instructions:- Clone the repository on your machine:
> git clone https://github.com/darribas/envs.git
- Navigate into the folder:
> cd envs
- Run the script:
> bash pydata.sh
An extensive collection of noteboks and slides related to this tutorial may be found in the following url's:
- PySAL notebooks
- Geographic Data Science course at the University of Liverpool.
- Geographic Information Analysis course at Arizona State University