Introduction to Working With Vector Data in R - A Self-Paced Tutorial Series feature image Source: National Ecological Observatory Network (NEON)
 bio photo

View All Tutorials

Tags

R programming (10)
Spatial Data & GIS (10)
Metadata (1)

Tutorial by R Package

dplyr (0)
ggplot2 (0)
h5py (0)
lubridate (time series) (0)
maps (0)
maptools (0)
plyr (0)
raster (2)
rasterVis (raster time series) (0)
rgdal (GIS) (2)
rgeos (0)
rhdf5 (0)
sp (1)
scales (0)
gridExtra (0)
ggtheme (0)
grid (0)
reshape2 (0)

View ALL Tutorial Series




Github


Blog.Roll

R Bloggers

Introduction to Working With Vector Data in R - A Self-Paced Tutorial Series

The tutorials in this workshop cover how to open, work with and plot with spatial data, in vector format (points, lines and polygons) in R. Topics covered include working with spatial metadata: extent and coordinate reference system, working with spatial attributes and plotting data by attributes. Data used in this series cover NEON Harvard Forest Field Site and are in Shapefile and .csv format.

R Skill Level: Beginner - you’ve got the basics of R down but haven’t worked with spatial data in R before.

Workshop Goals / Objectives

After completing the lessons in this series you will:

  • B

Things You’ll Need To Complete This Lesson

To complete this lesson: you will need the most current version of R, and preferably RStudio, loaded on your computer.

Install R Packages

  • raster: install.packages("raster")
  • rgdal: install.packages("rgdal")
  • sp: install.packages("sp")
  • ggplot2: install.packages("ggplot2")

More on Packages in R - Adapted from Software Carpentry.

Download Data

Download NEON Teaching Data Subset: Site Layout Shapefiles

These vector data provide information on the site characterization and infrastructure at the National Ecological Observatory Network’s Harvard Forest field site. The Harvard Forest shapefiles are from the Harvard Forest GIS & Map archives. US Country and State Boundary layers are from the US Census Bureau.

Download NEON Teaching Data Subset: Airborne Remote Sensing Data

The LiDAR and imagery data used to create this raster teaching data subset were collected over the National Ecological Observatory Network’s Harvard Forest and San Joaquin Experimental Range field sites and processed at NEON headquarters. The entire dataset can be accessed by request from the NEON Airborne Data Request Page on the NEON website.


Set Working Directory: This lesson assumes that you have set your working directory to the location of the downloaded and unzipped data subsets. An overview of setting the working directory in R can be found here..

R Script & Challenge Code: NEON data lessons often contain challenges that reinforce learned skills. If available, the code for challenge solutions is found in the downloadable R script of the entire lesson, available in the footer of each lesson page.

Data Carpentry Lesson Series: This workshop part of a larger spatio-temporal Data Carpentry Workshop that includes working with raster data in R and
tabular time series in R .

Tutorials in Workshop Series