Introduction to Spatial Analysis in R

Welcome to ISAIR 2025!
Over the next 10 days you’ll be learning about using R for spatial analysis with packages from the tidyverse and key spatial analysis packages.
Who we are
Your course organiser is Oliver Brady
Your course administrator is Niall McCarthy
Your course tutors are: Ahyoung Lim, Emily Nightingale, Ruoran Li, Yang Liu and Amy Campbell
Course content
In addition to the slides and worksheets for each day, you may be interested in downloading:
Course structure
The course is split into five topics which each have two sessions over two weeks.
The first week focuses on learning the basics of R, getting familiar with spatial data, and revision of modelling.
| Week 1 | Foundations | Learning R, Spatial packages and basic of statistical models |
|---|---|---|
| Monday | Introduction to R I | Reading and manipulating data objects with the tidyverse |
| Tuesday | Introduction to R II | Practical applying tools from session 1 |
| Wednesday | Introduction to Spatial in R I | Reading and manipulating spatial data objects such as shape files |
| Thursday | Introduction to Spatial in R II | Practical applying tools from session 3 |
| Friday | Introduction to Modelling I | Statistical modelling with the Generalised Linear Model |
The second week builds upon the first and presents more in depth spatial modelling.
| Week 2 | Spatial modelling | Discrete and continuous spatial models |
|---|---|---|
| Monday | Introduction to Modelling II | Extensions to GLMs for spatially structured data |
| Tuesday | Modelling with Discrete Space I | Models for areal data |
| Wednesday | Modelling with Discrete Space II | Models for areal data |
| Thursday | Modelling with Continuous Space I | Model-based geostatistics |
| Friday | Modelling with Continuous Space II | Model-based geostatistics |
Each day we will introduce a series of practicals. These practicals will contain a number of sections providing increasing levels of complexity but also help and support.
- Practical: General description of the question followed by a general outline of what is required.
- Hints: Hints about the exact commands you can use to achieve each of the analysis page steps.
- Solution: R code to achieve the task.
There will be time during the course to complete each of these practicals, but also time between each session allowing you to complete the practicals in your own time. We will go over the answers to the previous day’s practicals at the start of each day and give everyone a chance to ask questions.
Required Software
Please ensure you have the latest version of this software:
- R Download here
- RStudio IDE Download here
The following R packages:
pkgs <- c("tidyverse", "tmap", "tmaptools", "spdep", "sf", "sp", "mgcv",
"mapview", "magrittr", "spatstat", "sparr", "raster", "dev", "devtools")
install.packages(pkgs, dependencies = TRUE)
devtools::install_github("samclifford/mgcv.helper")