Spatial-R for Healthy Places
Preface
Measurements of neighborhood social determinants of health and the structural drivers of health inequity are increasingly urgent in modern public health thinking, and are thought to drive and/or reinforce social and spatial inequities. Spatial analysis is an important tool in uncovering the ways in which where people live, work, and play can influence health outcomes.
This workshop will present an introduction to spatial analysis, mapping, and GIScience for health applications & spatial epidemiology using the open source R environment. We use an open scienceframework including R and GeoDa, meaning all the GIS is done with free and open tools in a reproducible environment. We will review how research questions and hypotheses are updated at each stage of exploratory spatial data analysis.
Commitment
This workbook is a 3-4 hour, fast-paced overview of mapping, GIScience, and spatial analysis basics for health professionals. When including extensive live coding, support, and additional practice in-person or at home on your own, it can be extended to a week-long program at minimum. You are encouraged to update with your own data finds after each example.
What You’ll Need
This workbook is designed to work with a live component, where the concepts are shared with more details and followed by live coding. Check out these links to stay updated:
- Short link to this workbook: go.illinois.edu/SpatialR-HealthyPlaces
- Slide deck for latest workshop: SER 2026
In addition to this workbook, you’ll need a working instance of R and the data. You can also clone the Github repository that hosts this workbook to get direct access to all the working code, data, and additional items.
Software Basics
We assume a basic knowledge of R and coding languages for most sections. For most of the tutorials in this toolkit, you’ll need to have R and RStudio downloaded and installed on your system. You should be able to install packages, know how to find the address to a folder on your computer system, and have very basic familiarity with R. If you are new to R, we recommend the following intro-level tutorials provided through installation guides. You can also refer to this R for Social Scientists tutorial developed by Data Carpentry for a refresher.
We will work with following libraries, so please be sure to install:
tidyverseordplyrsftmaptidygeocodertidycensus
To install a package in R, input install.packages("dplyr") in your console. You generally only need to install a library once, but you’ll call it every time you work with a new R session.
We recommend setting up your working directory as soon as you can! Create a new folder called “data” to put all the data you’ve downloaded for the workshop.
There are differing spatial ecosystems in R. We use the sf ecosystem that is compatible with the tidyverse. If you need to work between these two R spatial ecosystems, see this guide for a translation of sp to sf commands.
Acknowledgements
This research was supported by the National Institutes of Health through the NIH HEAL Initiative under award number 1U2CDA050098-01 and 5UM1DA050098-03. The contents of this publication are solely the responsibility of the authors and do not necessarily represent the official views of the NIH, the NIH HEAL Initiative, or the participating sites.