/Intro-Spatial-R

This repo contains all the scripts and materials used for the student workshop "Using R to Model, Manipulate, and Manage Spatial Data"

Primary LanguageHTMLCreative Commons Zero v1.0 UniversalCC0-1.0

Intro-Spatial-R

This repo contains all the scripts and materials used for the student-oriented workshop, "Using R to Model, Manipulate, and Manage Spatial Data," originally presented at the 2015 IALE World Congress in Portland, Oregon.

Original Workshop Instructors & Contributors

Jill Deines, Tom Edwards, Whalen Dillon, Karl Jarvis, Francesco Tonini

Workshop Contents

  • M1.1: Importing and Exporting Vector GIS Data in R
  • M1.2: Importing and Exporting Raster GIS Data in R
  • M2.1 Accessing Vector and Raster Properties
  • M2.2 Modifying Vector Files (shapefiles)
  • M2.3 Modifying Rasters
  • M2.4 Reprojecting and Altering Extents and Resolution

Demonstrates the development of a workflow to manipulation and prepare data for further analysis.

  • How to query the attribute table of vector data
  • How to calculate a new field for vector data
  • How to convert raster to vector & vector to raster
  • How to subset/mask data for analysis
  • M4.1 Extract Values to Point Locations
  • M4.2 Analyze Raster and Vector Data

Software Requirements & Resources

Downloading and installing R

You can get R from the Comprehensive R Archive Network (CRAN). Download and install the latest version from http://cran.r-project.org/, if you don’t already have a copy. This installs the R program, which you could use to do most subsequent R tasks.

Optional: Installing R Studio

R Studio is a popular, enhanced interface for R known as an Integrated Development Environment (IDE). It does helpful things like organize your workspace and add color to your code for easier reading. It also has a lot of advanced functionalities that extend R’s capabilities. You don’t need to use it, but it’s available at http://www.rstudio.com/ide/download/.

Familiarity with R

You will get the most out of the workshop if you are familiar with R and its basic syntax and data structures. If you are a beginner, you can find a good list of interactive tutorials at http://www.rstudio.com/resources/training/online-learning/#R. Both DataCamp and Try R allow you to learn basic R commands online with no installation overhead. We also like the interactive “swirl” tutorial package mentioned, which teaches you R from within your own R installation on your computer (instructions at http://swirlstats.com/students.html).