R Spatial Notebooks
A Guide to Reproducible Spatial Workflows for Social Science Research
The R Spatial Notebook Series is a collection of interactive code notebooks designed to help researchers, analysts, and data practitioners build reproducible spatial workflows in R. These notebooks cover automated data extraction from key social and environmental data sources (IPUMS, Natural Earth, OpenStreetMap, and more), spatial data cleaning and integration, foundational and advanced spatial analysis techniques, and mapping methods.
The series is structured like a book—earlier chapters provide foundational concepts necessary for later work. Each notebook is also a standalone resource that can be downloaded and adapted for your specific research and educational needs.
Whether you're new to spatial data science or an experienced R programmer expanding your workflows, these notebooks support your journey in spatial analysis with R.
Receive Updates
Sign up for the mailing list to receive project updates, new notebook announcements, and opportunities to connect.
Join Mailing List →Make a Suggestion
Have a specific topic or notebook idea you'd like to see? Share your suggestions with us.
Suggestion Box →Support This Work
If you find these notebooks valuable, consider supporting their continued development and maintenance.
Buy Me a Coffee →Webinars & Recordings
Chapter List
Chapter 1: Data Sources and APIs
▼- 1.1 Introduction to IPUMS and the IPUMS API
- 1.2 Introduction to Natural Earth
- 1.3 Introduction to OpenStreetMap (OSM)
- 1.4 Introduction to Stadia Maps and Stamen Maps
- 1.5 Introduction to Google Maps
- 1.6 Introduction to the National Land Cover Database (NLCD)
Chapter 2: Fundamentals of Spatial Data
▼- 2.1 Introduction to sf: Reading, Writing, and Inspecting Vector Data
- 2.2 Working with CRS: Reprojection and Transformation
- 2.3 Preparing Vector Data for Analysis
- 2.4 Introduction to terra: Reading, Writing, and Inspecting Raster Data
Chapter 3: IPUMS Data Acquisition and Extraction
▼- 3.1 IPUMS USA Data Extraction Using ipumsr
- 3.2 IPUMS NHGIS Data Extraction Using ipumsr
- 3.3 IPUMS CPS Data Extraction Using ipumsr
Chapter 4: Open-Source GIS Data Acquisition and Extraction
▼Chapter 5: Data Cleaning, Preparation, and Exploratory Data Analysis
▼Chapter 6: Mapping and Visualization
▼- 6.1 Mapping Fundamentals
- 6.2 Thematic and Reference Mapping
- 6.3 Choropleth Mapping
- 6.4 Basemaps with ggspatial
- 6.5 Basemaps with ggmap
- 6.6 Local Basemaps with terra
- 6.7 Interactive Mapping with leaflet
- 6.8 Interactive Mapping with Shiny
- 6.9 Designing Interactive Maps
Chapter 7: Foundational Spatial Analyses
▼Chapter 8: Advanced Spatial Analyses
▼Coming soon! Sign up for the mailing list to receive updates.
Chapter 9: Raster Analysis
▼- 9.1 Raster Analysis and Aggregation
- 9.2 Raster Data Mapping and Visualization
More Information
April 4, 2025 Unlocking Spatial and Social Data with R: Introducing the R Spatial Notebook Series IPUMS BlogProject FAQ
Why Jupyter Notebooks instead of R Markdown?
This project was developed during my postdoctoral work with the University of Minnesota and the NSF I-GUIDE project. The notebooks were designed specifically for the I-GUIDE platform, which supports Jupyter Notebooks. R Markdown versions may be made available in the future based on community interest.