Introduction to Geospatial Raster and Vector Data with R: Instructor Notes

Instructor notes

Lesson motivation and learning objectives

This lesson is designed to introduce learners to the fundamental principles and skills for working with raster and vector geospatial data in R. It begins by introducing the structure of and simple plotting of raster data. It then covers re-projection of raster data, performing raster math, and working with multi-band raster data. After introducing raster data, the lesson moves into working with vector data. Line, point, and polygon shapefiles are included in the data. Learners will plot multiple raster and/or vector layers in a single plot, and learn how to customize plot elements such as legends and titles. They will also learn how to read data in from a csv formatted file and re-format it to a shapefile. Lastly, learners will work with multi-layered raster data set representing time series data and extract summary statistics from this data.

Lesson design

Overall comments

Intro to Raster Data in R

Plot Raster Data in R

Reproject Raster Data in R

Raster Calculations in R

Work With Multi-Band Rasters in R

Open and Plot Shapefiles in R

Error message

Error in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y,  : 
  polygon edge not found

Explore and Plot by Shapefile Attributes

Plot Multiple Shapefiles in R

Handling Spatial Projection & CRS in R

Convert from .csv to a Shapefile in R

Manipulate Raster Data in R

Raster Time Series Data in R

Create Publication-quality Graphics

Derive Values from Raster Time Series

Concluding remarks

Technical tips and tricks

Scheduling tips

Common problems