M9 - Spatial Analysis

ENV 872 - EDA   |   Spring 2024   |   Instructors: Luana LimaJohn Fay  |  

Update

  • There is no lab Rmd for this week’s session on spatial analysis. Instead, the recordings and lesson Rmds have exercises which you should complete prior to Thursday’s class. If you get stuck, feel free to post questions on Slack or bring those questions to class on Thursday.

  • Since the recording, I made a few minor edits to the second lesson Rmd as some of the hyperlinks pointed to outdated servers. If you downloaded the Rmd from the class website to your local R workspace before mid-day Monday (3/3), please replace it from the current version on the page below.

    :point_right: One edit worth noting is on lines 360-362(minute 5:10 on the Coordinate transformation, spatial selection, & spatial intersection recording) where there sf package has updated a command to make spatial selection much easier :joy_cat:.

  • In class this week, I will answer any questions you have on these exercises or on any of the topics covered in the recordings. Remaining time will be open lab to tackle the assignment, which will be posted Thursday morning.

  • The assignment will be at the end of day on the Tuesday you return after spring break.

Learning Goals

  • Describe the importance of location in environmental data analysis
  • Visualize dataframes containing coordinate information as maps using various R packages
  • Convert dataframes containing coordinate information into “spatial data frames”
  • Better understand the concepts behind projecting spatial data and coordinate reference systems
  • Read typical GIS data formats (shapefiles, GeoJSON) into R
  • Perform basic spatial analyses with spatial dataframes in R
  • Visualize spatial data using R

Recordings

:point_right: Note that the recordings use an older version of RStudio. To access “Visual” mode (where the markdown is interpreted to display formatted text) you now click on the “Visual button in the upper left portion of your RMarkdown document window, not the compass icon in the upper right. Also note that viewing your Rmd file in visual mode will insert line breaks into long lines of text (not code). This won’t effect the execution of your code, but it will alter line numbering.”

Lesson Documents

Lab Document

  • None: We will address exercises in lesson documents and start the assignment in class.

Assignment

Additional Resources

https://www.youtube.com/watch?v=rSJwz7JL-0c

This is purely optional, but it goes a bit deeper into what you can do with a spatially enabled data frame and spatial statistics. It also covers the raster data model, remotely sensed data, and object recognition…