Spatial models for distance sampling data using R and ArcGIS

This is the site for the course to be given at Duke by David L Miller and Jason Roberts 27-30 October 2015.

Class photo

Course materials

Course description

The workshop will cover both theory and practice and demonstrate an end-to-end workflow for spatial modelling of distance sampling data collected via line transect surveys.

Throughout the course we will follow the “density surface modelling” approach of Hedley and Buckland (2004), updated with methods from Miller et al (2013) – that is first modelling detectability via a detection function, then using this to create a detection-adjusted spatial model using generalized additive models (GAMs). Modelling will take place in R using packages developed by the Centre for Research into Ecological and Environmental Modelling and NOAA.

An integral part of developing these models is the management and manipulation of geospatial data. Important skills include mapping and exploring data, reformatting data for analysis, obtaining and sampling environmental predictors (e.g. from remote sensing imagery), and moving data between GIS and R. For these activities, we will use ArcGIS and the Marine Geospatial Ecology Tools (MGET) package (Roberts et al. 2010), developed at the Duke Marine Geospatial Ecology Lab.


This is a preliminary schedule and is subject to change.

Day/Time Objective 0900-1030 1045-1215 1315-1445 1500-1630
Tuesday Fit detection function, estimate abundance with Horvitz-Thompson Classroom: Welcome, intro to distance sampling (DS) Lab: Introduce example data, get sightings into ArcGIS and R Classroom: DS covariates, variance, model checking and selection, Horvitz-Thompson Lab: DS practicals
Wednesday Fit and check a density surface model (DSM) Classroom: What is a DSM? Lab: Get segments into ArcGIS and R, produce prediction grid Classroom: Intro to generalized additive models (GAMs) Lab: GAM practicals, fit first DSM
Thursday Add environmental covariates to the model Classroom: Adding covariates: why, how, what? Intro to environmental data Lab: Download and process environmental data Classroom: Multiple smooths, model selection Lab: Fit and check multivariate DSMs
Friday Produce maps of predicted abundance Lab: Predictions: theory and in practice Lab: Variance: theory and in practice Classroom: Advanced topics Classroom: Special topics and follow-up


Participants are encouraged to bring their own laptops to use for at least some of the workshop practicals. Both ArcGIS and R will be used, even those who do not have access to ArcGIS on their laptops will find it useful to use R on their own machines.

To ensure your computer is setup correctly prior to the workshop please check the instructions below.


The course will use R, RStudio and various R packages installable from CRAN. The following steps should setup your computer for the workshop:

  1. Install R from the R website
  2. Install RStudio from the RStudio website
  3. Install R packages from within R using the following command:
install.packages(c("mrds", "Distance", "dsm", "ggplot2", "rgdal", "knitr",
                   "plyr", "raster", "reshape2", "viridis", "htmltools",
                   "caTools", "bitops", "rmarkdown", "tweedie"))


The course will use the MGET toolkit for ArcGIS, information on installing the software can be found here, if you already have ArcGIS installed.