Skip to main content

Data Analysis for Social Scientists

4 modules

About

This course teaches advanced methods of spatial analysis in Python. It is written for social scientists who already know the everyday operations (buffers, overlays, map algebra and zonal statistics), which are taught in the Data Processing course.

Each module explains one method on this site, then links to three short Jupyter notebooks (Beginner, Intermediate and Advanced), each about 20 to 30 minutes.

Module Question it answers Tools
Network Analysis How far is it by road, and how long does it take? osmnx, networkx
Spatial Autocorrelation with PySAL Are similar values clustered, and where? libpysal, esda, splot
Spatial Clustering Where do points concentrate into hotspots? scikit-learn, scipy
NDVI Analysis How green is the landscape in a satellite image? rasterio, numpy, scikit-learn

The modules can be taken in any order, though Spatial Clustering builds lightly on ideas from PySAL. Geocoding (turning addresses into points and downloading OpenStreetMap features) is taught in the Data Collection course and is good preparation for Network Analysis. QGIS users will find raster analysis of elevation and satellite imagery in Workshop 2026 Track A (DEM analysis, NDVI and flood mapping), and network analysis in the Case Studies course's Grocery Access Part 2.

Prerequisites

  • A free CyberFaCES account to run the notebooks
  • Basic Python, pandas and GeoPandas (Foundations notebooks 2a to 4c); the Data Processing course's Geoprocessing in Python module is recommended
  • A free Census API key of your own (needed for the PySAL module)

New to Python or Jupyter notebooks? Start with the Foundations course, then read the Setup page.

This course is part of Enabling the Geospatial Turn in the Social Sciences, a set of training modules developed at Purdue University with support from the National Science Foundation.

Features
Type Course
Level Developer
Length 5 hours
Topics python
Community: Spatial Turn

Modules

  • Network Analysis

    Module 1 • 1 hour

    How far is it by road, and how long does it take? Road networks, shortest paths and travel time with osmnx and networkx

  • Spatial Autocorrelation with PySAL

    Module 2 • 1 hour

    Are similar values clustered, and where? Spatial weights, global and local Moran's I with libpysal, esda and splot

  • Spatial Clustering

    Module 3 • 1 hour

    Where do points concentrate into hotspots? DBSCAN, HDBSCAN and K-Means on Chicago crime points

  • NDVI Analysis

    Module 4 • 1 hour

    How green is the landscape in a satellite image? NDVI from Landsat, classification and machine learning

Instructor

Aniket Dev Roy avatar

Aniket Dev Roy

61 modules

Discussions

Please login to view discussions.

Reviews

- Not reviewed yet
  • 5 stars
    0%
  • 4 stars
    0%
  • 3 stars
    0%
  • 2 stars
    0%
  • 1 star
    0%
No reviews yet.