Spatial Data Tutorial Series Capstone Challenges

Authors: 
Leah A. Wasser, Claire Lunch, Kate Thibault, Natalie Robinson
Table of Contents

These capstone challenges utilize the skills that you learned in the previous tutorials in the:

Things You’ll Need To Complete This Tutorial

You will need the most current version of R and, preferably, RStudio loaded on your computer to complete this tutorial.

Install R Packages

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

More on Packages in R – Adapted from Software Carpentry.

Download Data

Download NEON Teaching Data Subset: Field Site Spatial Data

These remote sensing data files provide information on the vegetation at the National Ecological Observatory Network's San Joaquin Experimental Range and Soaproot Saddle field sites. The entire dataset can be accessed by request from the NEON Data Portal.

Capstone One: Calculate NDVI for the SJER field sites

The Normalized Difference Vegetation Index (NDVI) is calculated using the equation:

(NIR - Red) / (NIR + Red)

where NIR is the near infrared band in an image and Red is the red band in an image.

Use the Red (Band 58 in the GeoTIFF files) and the NIR (band 90 in the GeoTIFF files) GeoTIFF files to

  1. Calculate NDVI in R.
  2. Plot NDVI. Make sure your plot has a title and a legend.
  3. Assign a colormap to the plot and specify the breaks for the colors to represent NDVI values that make sense to you. For instance, you might chose to color the data into quartiles using breaks at .25,.5, .75 and 1.
  4. Expore your final NDVI dataset as a GeoTIFF. Make sure the CRS is correct.
  5. To test your work, bring it into QGIS. Does it line up with the other GeoTIFFs (for example the band 19 tiff). Did it import properly?

Capstone Two: Create an HDF5 file

If you have some of your own data that you'd like to explore for this activity, feel free to do so. Otherwise, use the vegetation structure data that we've provided in the data downloads for this workshop.

  1. Create a new HDF5 file using the vegetation structure data in D17_2013_vegStr.csv and D17_2013_SOAP_vegStr.csv. (Note that previously the working directory was set to SJER. You'll have to change this to easily access the SOAP vegetation data).
  2. Create two groups within a California group:
    • one for the San Joaquin (SJER) field site
    • one for the Soaproot Saddle (SOAP) field site.
  3. Attribute each of the above groups with information about the field sites. HINT: you can explore the NEON field sites page for more information about each site.
  4. Extract the vegetation structure data for San Joaquin and add it as a dataset to the San Joaquin group. Do the same for the Soaproot Saddle dataset.
  5. Add the plot centroids data to the SJER group. Include relevant attributes for this dataset including the CRS string and any other metadata with the dataset.
  6. Open the metadata file for the vegetation structure data. Attribute the structure dataset as you see fit to make it usable. As you do this, think about the following:
    • Is there a better way to provide or store these metadata?
    • Is there a way to automate adding the metadata to the H5 file?

Add new comment

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Dialog content.