Assignment 3: Describing Spatial Patterns

Objectives

This assignment provides you a chance to practice your skills and build understanding around the various methods of describing spatial patterns using point processes, patch metrics, and multivariate skills. By the end of this assignment you should be able to:

  1. Generate a ppp object using spatstat and interogate its first- and second-order properties

  2. Convert a categorical raster into a series of patch metrics

  3. Use principal components analaysis and kmmeans clustering to identify gradients and classes in multivariate raster data.

  4. Build introductory maps using ggplot to visualize your data

Instructions

  1. Join the assignment repository. In the docs folder, you’ll find the instructions and questions for the assignment (assignment03.qmd).

  2. Change the yaml header of the document to include your name and the course number as your affiliation

  3. Complete the tasks in the assignment making at least 3 commits

  4. Render the document and push your final html and quarto documents to your repository.

Submission:

Submit a single Quarto document (.qmd) with integrated code, outputs, and written responses. Your document should be written as if it were a lab notebook entry: clear enough that another researcher could reproduce your work without asking you questions. Your assignment will be considered complete if the following are true:

  1. You have at least 3 commits in your version history (which I can access in GitHub classroom)

  2. You have pushed your final Quarto document

  3. You have pushed a rendered .html version of your document.

About the Data

In the Google Drive Folder:

  • Point Data: These are fire ignition locations from the Fire Progarm Analysis fire occurrence database (FPA-FOD) filtered to southwestern Idaho and to ignitions that occurred between 2015 and 2020. You can read more about this data here. (this is in the folder as SwIdFires.shp)

  • Raster Data: This is the NLCD dataset, but aggregated by 8x (240m resolution) to make things go a bit faster. (this is in the folder as SwIDnlcd.tif)

Downloaded in R

You’ll use the geodata package to download the bioclim dataset, a set of biologically relevant climatic data based on the WorldClim dataset.

library(geodata)
Loading required package: terra
terra 1.8.70
library(terra)
worldclim_tile(var = "bio", lon = -114.1433, lat = 43.8696)
class       : SpatRaster 
size        : 3600, 3600, 19  (nrow, ncol, nlyr)
resolution  : 0.008333333, 0.008333333  (x, y)
extent      : -120, -90, 30, 60  (xmin, xmax, ymin, ymax)
coord. ref. : lon/lat WGS 84 (EPSG:4326) 
source      : tile_15_wc2.1_30s_bio.tif 
names       :     bio_1,    bio_2,     bio_3,    bio_4, bio_5, bio_6, ... 
min values  : -8.083333,  1.00000,  16.28638,    0.000,   0.5, -33.4, ... 
max values  : 24.508333, 22.23333, 100.00000, 1637.781,  46.2,  11.2, ... 

In addition, you’ll need to use geodata to get the 30s elevation dataset

elevation_30s("USA")
class       : SpatRaster 
size        : 3984, 7164, 1  (nrow, ncol, nlyr)
resolution  : 0.008333333, 0.008333333  (x, y)
extent      : -126.5, -66.8, 18.8, 52  (xmin, xmax, ymin, ymax)
coord. ref. : lon/lat WGS 84 (EPSG:4326) 
source      : USA_elv_msk.tif 
name        : USA_elv_msk 
min value   :        -105 
max value   :        4351 

Important: these data are in a geodetic reference system and have a different resolution than your nlcd data. You’ll need to reproject your NLCD data and then resample your climate and elevation data to get them all lined up.