Reproducible Science and Programming

An introduction version control

Learn what version control is, and how Git and GitHub are used in a typical version control workflow.

last updated: 21 Sep 2017

Create For Loops

Learn how to write a for loop to process a set of .csv format text files in R.

last updated: 16 Oct 2017

Get to Know the Function Environment & Function Arguments in R

This lesson introduces the function environment and documenting functions in R. When you run a function intermediate variables are not stored in the global environment. This not only saves memory on your computer but also keeps our environment clean, reducing the risk of conflicting variables.

last updated: 16 Oct 2017

Adjust plot extent in R.

In this lesson we will review how to adjust the extent of a spatial plot in R using the ext() or extent argument and the extent of another layer.

last updated: 17 Oct 2017

Plot grid of spatial plots in R.

In this lesson we cover using par() or parameter settings in R to plot several raster RGB plots in R in a grid.

last updated: 17 Oct 2017

Work with MODIS remote sensing data in in R.

In this lesson you will explore how to import and work with MODIS remote sensing data in raster geotiff format in R. You will cover importing many files using regular expressions and cleaning raster stack layer names for nice plotting.

last updated: 17 Oct 2017

Clean remote sensing data in R - Clouds, shadows & cloud masks

In this lesson, you will learn how to deal with clouds when working with spectral remote sensing data. You will learn how to mask clouds from landsat and MODIS remote sensing data in R using the mask() function. You will also discuss issues associated with cloud cover - particular as they relate to a research topic.

last updated: 17 Oct 2017

How to Source a Function in R

Learn how to source a function in R. Learn how to import functions that are stored in a separate file into a script or R Markdown file.

last updated: 16 Oct 2017

Landsat Remote Sensing tif Files in R

In this lesson you will cover the basics of using Landsat 7 and 8 in R. You will learn how to import Landsat data stored in .tif format - where each .tif file represents a single band rather than a stack of bands. Finally you will plot the data using various 3 band combinations including RGB and color-infrared.

last updated: 16 Oct 2017

Calculate a Remote Sensing Derived Vegetation Index in R

A vegetation index is a single value that quantifies vegetation health or structure. In this lesson, you will review the basic principles associated with calculating a vegetation index from raster formatted, landsat remote sensing data in R. You will then export the calculated index raster as a geotiff using the writeRaster() function.

last updated: 16 Oct 2017

How multispectral imagery is drawn on computers - Additive Color Models

In this lesson you will learn the basics of using Landsat 7 and 8 in R. You will learn how to import Landsat data stored in .tif format - where each .tif file represents a single band rather than a stack of bands. Finally you will plot the data using various 3 band combinations including RGB and color-infrared.

last updated: 16 Oct 2017

How to Open and Work with NAIP Multispectral imagery in R

In this lesson you learn how to open up a multi-band raster layer or image stored in .tiff format in R. You are introduced to the stack() function in R which can be used to import more than one band into a stack object in R. You also review using plotRGB to plot a multi-band image using RGB, color-infrared to other band combinations.

last updated: 16 Oct 2017

Extract Raster Values Using Vector Boundaries in R

This lesson reviews how to extract pixels from a raster dataset using a vector boundary. We can use the extracted pixels to calculate mean and max tree height for a study area (in this case a field site where we measured tree heights on the ground. Finally we will compare tree heights derived from lidar data compared to tree height measured by humans on the ground.

last updated: 16 Oct 2017

GIS in R: Plot Spatial Data and Create Custom Legends in R

In this lesson we break down the steps required to create a custom legend for spatial data in R. We discuss creating unique symbols per category, customizing colors and placing your legend outside of the plot using the xpd argument combined with x,y placement and margin settings.

last updated: 16 Oct 2017

GIS in R: Projected vs Geographic Coordinate Reference Systems

This tutorial describes key differences between projected and geographic coordinate reference systems (CRSs). We focus on the Universal Trans Mercator (UTM) projected Coordinate Reference which divides the globe into zones to optimize projection results in each zone and WGS84 which is a geographic (latitude and longitude) CRS. It also briefly introduces the concept of a datum.

last updated: 06 Oct 2017

Classify a raster in R.

This lesson presents how to classify a raster dataset and export it as a new raster in R.

last updated: 16 Oct 2017

About the geotiff (.tif) raster file format - raster data in R

This lesson introduces the geotiff file format. Further it introduces the concept of metadata - or data about the data. Metadata describe key characteristics of a data set. For spatial data these characteristics including CRS, resolution and spatial extent. Here we discuss the use of tif tags or metadata embedded within a geotiff file as they can be used to explore data programatically.

last updated: 16 Oct 2017

Plot histograms of raster values in R

This lesson introduces the raster geotiff file format - which is often used to store lidar raster data. We cover the 3 key spatial attributes of a raster dataset including Coordinate reference system, spatial extent and resolution.

last updated: 16 Oct 2017

Introduction to lidar raster data products

This lesson introduces the raster geotiff file format - which is often used to store lidar raster data. We cover the 3 key spatial attributes of a raster dataset including Coordinate reference system, spatial extent and resolution.

last updated: 16 Oct 2017

The syntax of the R scientific programming language - Data science for scientists 101

This lesson introduces the basic syntax associated with the R scientific programming language. We will introduce assignment operators (<-), comments and basic functions that are available to use in R to perform basic tasks including head(), qplot() to quickly plot data and others. This lesson is designed for someone who has not used R before. We will work with precipitation and stream discharge data for Boulder County.

last updated: 16 Oct 2017

R Markdown resources

Find resources that will help you use the R Markdown format.

last updated: 16 Oct 2017

Add images to an R Markdown report

This lesson covers how to use markdown to add images to a report. It also discusses good file management practices associated with saving images within your project directory to avoid losing them if you have to go back and work on the report in the future.

last updated: 16 Oct 2017

File organization 101

Learn key principles for naming and organizing files and folders in a working directory.

last updated: 16 Oct 2017

Get to know RStudio

Learn how to work with R using the RStudio application.

last updated: 16 Oct 2017