Leah Wasser

Leah Wasser has contributed to the materials listed below. Leah is the director of the Earth Analytics Education Initiative at Earth Lab and maintains this website.

Course Lessons

Course lessons are developed as a part of a course curriculum. They teach specific learning objectives associated with data and scientific programming. Leah Wasser has contributed to the following lessons:

Submit a pull request on the GitHub website

Learn how to create and submit a pull request to another repo.

How to fork a repo in GitHub

Learn how to fork a repository using the GitHub website.

Introduction to undoing things in git

Learn how to undo changes in git after they have been added or committed.

First steps with git: clone, add, commit, push

Learn basic git commands, including clone, add, commit, and push.

An introduction version control

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

Make Interactive Maps with Leaflet R - GIS in R

In this lesson we break down the steps to create a map in R using ggplot.

Maps in R: R Maps Tutorial Using Ggplot

You can use R as a GIS. Learn how to create a map in R using ggplot in this R maps tutorial.

Sentiment Analysis of Colorado Flood Tweets in R

Learn how to perform a basic sentiment analysis using the tidytext package in R.

Create Maps of Social Media Twitter Tweet Locations Over Time in R

This lesson provides an example of modularizing code in R.

Use tidytext to text mine social media - twitter data using the twitter API from rtweet in R

This lesson provides an example of modularizing code in R.

Text Mining Twitter Data With TidyText in R

Text mining is used to extract useful information from text - such as Tweets. Learn how to use the Tidytext package in R to analyze twitter data.

Twitter Data in R Using Rtweet: Analyze and Download Twitter Data

You can use the Twitter RESTful API to access data about Twitter users and tweets. Learn how to use rtweet to download and analyze twitter social media data in R.

Work With Twitter Social Media Data in R - An Introduction

This lesson will discuss some of the challenges associated with working with social media data in science. These challenges include working with non standard text, large volumes of data, API limitations, and geolocation issues.

Creating interactive spatial maps in R using leaflet

This lesson covers the basics of creating an interactive map using the leaflet API in R. We will import data from the Colorado Information warehouse using the SODA RESTful API and then create an interactive map that can be published to an HTML formatted file using knitr and rmarkdown.

Programmatically accessing geospatial data using API's - Working with and mapping JSON data from the Colorado Information Warehouse in R

This lesson walks through the process of retrieving and manipulating surface water data housed in the Colorado Information Warehouse. These data are stored in JSON format with spatial x, y information that support mapping.

Understand namespaces in R - what package does your fromJSON() function come from?

This lesson covers namespaces in R and how we can tell R where to get a function from (what code to use) in R.

Programmatically access data using an API in R - The Colorado Information Warehouse

This lesson covers accessing data via the Colorado Information Warehouse SODA API in R.

Introduction to the JSON data structure

This lesson covers the JSON data structure. JSON is a powerful text based format that supports hierarchical data structures. It is the core structure used to create geoJSON which is a spatial version of json that can be used to create maps. JSON is preferred for use over .csv files for data structures as it has been proven to be more efficient - particulary as data size becomes large.

Access secure data connections using the RCurl R package.

This lesson reviews how to use functions within the RCurl package to access data on a secure (https) server in R.

An example of creating modular code in R - Efficient scientific programming

This lesson provides an example of modularizing code in R.

Introduction to APIs

In this module, we introduce various ways to access, download and work with data programmatically. These methods include downloading text files directly from a website onto your computer and into R, reading in data stored in text format from a website, into a data.frame in R and finally, accessing subsets of particular data using REST API calls in R.

Use lapply in R Instead of For Loops to Process .csv files - Efficient Coding in R

Learn how to take code in a for loop and convert it to be used in an apply function. Make your R code more efficient and expressive programming.

If Statements, Functions, and For Loops

Learn how to combine if statements, functions and for loops to process sets of text files.

Create For Loops

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

Working with Function Arguments

Learn how to work with function arguments in the R programming language..

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.

How to Write a Function in R - Automate Your Science

Learn how to write a function in the R programming language.

What Could be Improved In this R Code?

Write Efficient Scientific Code - the DRY (Don't Repeat Yourself) Principle

This lesson will cover the basic principles of using functions and why they are important.

Work with MODIS Remote Sensing Data 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.

Calculate and Plot Difference Normalized Burn Ratio (dNBR) from Landsat Remote Sensing Data in R

In this lesson you review how to calculate difference normalized burn ratio using pre and post fire NBR rasters in R. You finally will classify the dNBR raster.

Work With the Difference Normalized Burn Index - Using Spectral Remote Sensing to Understand the Impacts of Fire on the Landscape

In this lesson you review the normalized burn ratio (NBR) index which can be used to identify the area and severity of a fire. Specifically you will calculate NBR using Landsat 8 spectral remote sensing data in raster, .tif format.

How to Replace Raster Cell Values with Values from A Different Raster Data Set in R

Often data have missing or bad data values that you need to replace. Learn how to replace missing or bad data values in a raster, with values from another raster in the same pixel location using the cover function in R.

Get Landsat Remote Sensing Data From the Earth Explorer Website

In this lesson you will review how to find and download Landsat imagery from the USGS Earth Explorere website.

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.

How to Convert Day of Year to Year, Month, Day in R

Learn how to convert a day of year value to a normal date format in R.

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.

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.

How to remove borders and add legends to spatial plots in R.

In this lesson we review how to remove those pesky borders from a raster plot using base plot in R. We also cover adding legends to your plot outside of the plot extent.

Add variables to an RMD report R.

How to Reuse Functions That You Create In Scripts - 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.

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.

The Fastest Way to Process Rasters in R

.

Calculate NDVI in R: Remote Sensing Vegetation Index

NDVI is calculated using near infrared and red wavelengths or types of light and is used to measure vegetation greenness or health. Learn how to calculate remote sensing NDVI using multispectral imagery in R.

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.

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.

Introduction to Spatial and Spectral Resolution: Multispectral Imagery

Multispectral imagery can be provided at different resolutions and may contain different bands or types of light. Learn about spectral vs spatial resolution as it relates to spectral data.

Import and summarize tree height data and compare it to lidar derived height in R

It is important to compare differences between tree height measurements made by humans on the ground to those estimated using lidar remote sensing data. Learn how to perform this analysis and calculate error or uncertainty in R.

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.

Sources of Error in Lidar and Human Measured Estimates of Tree Height

There are difference sources of error when we measure tree height using Lidar. Learn about accuracy, precision and the sources of error associated with Lidar remote sensing data.

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.

GIS in R: How to Reproject Vector Data in Different Coordinate Reference Systems (crs) in R

In this lesson we cover how to reproject a vector dataset using the spTransform() function in R.

GIS in R: Understand EPSG, WKT and other CRS definition styles

This lesson discusses ways that coordinate reference system data are stored including proj4, well known text (wkt) and EPSG codes.

GIS With R: Projected vs Geographic Coordinate Reference Systems

Geographic coordinate reference systems are often used to make maps of the world. Projected coordinate reference systems are use to optimize spatial analysis for a region. Learn about WGS84 and UTM Coordinate Reference Systems as used in R.

Coordinate Reference System and Spatial Projection

Coordinate reference systems are used to convert locations on the earth which is round, to a two dimensional (flat) map. Learn about the differences between coordinate reference systems.

GIS in R: shp, shx and dbf + prj - The Files That Make up a Shapefile

This lesson reviews the core files that are required to use a shapefile including: shp, shx and dbf. It also covers the .prj format which is used to define the coordinate reference system (CRS) of the data.

GIS in R: Intro to Vector Format Spatial Data - Points, Lines and Polygons

This lesson introduces what vector data are and how to open vector data stored in shapefile format in R.

Clip Raster in R

You can clip a raster to a polygon extent to save processing time and make image sizes smaller. Learn how to crop a raster dataset in R.

Classify a raster in R.

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

Create a Canopy Height Model With LIDAR Data

A canopy height model contains height values trees and can be used to understand landscape change over time. Learn how to use LIDAR elevation data to calculate canopy height and change in terrain over time.

How to Open and Use Files in Geotiff Format

A GeoTIFF is a standard file format with spatial metadata embedded as tags. Use the raster package in R to open geotiff files and spatial metadata programmatically.

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.

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.

How Lidar Point Clouds Are Converted to Raster Data Formats - Remote Sensing

This lesson reviews how a lidar data point cloud is converted to a raster format such as a geotiff.

Introduction to Lidar Point Cloud Data - Active Remote Sensing

This lesson covers what a lidar point cloud is. We will use the free plas.io point cloud viewer to explore a point cloud.

What is LIDAR Data

This lesson reviews what lidar remote sensing is, what the lidar instrument measures and discusses the core components of a lidar remote sensing system.

Layer a raster dataset over a hillshade using R baseplot to create a beautiful basemap that represents topography

This lesson covers how to overlay raster data on a hillshade in R using baseplot and layer opacity arguments.

Add a basemap to an R Markdown report using ggmap

This lesson covers creating a basemap with the ggmap package in R. Given some ongoing bugs with ggmap it also covers the map package as a backup!

Create interactive plots in R - time series & scatterplots using plotly and dygraphs

Learn how to create interactive reports using plotly and dygraphs in R for plotting.

Subset & aggregate time series precipitation data in R using mutate(), group_by() and summarise()

This lesson introduces the mutate() and group_by() dplyr functions - which allow you to aggregate or summarize time series data by a particular field - in this case we will aggregate data by day to get daily precipitation totals for Boulder during the 2013 floods.

Homework challenge: Plot USGS stream discharge data in R

This lesson illustrated what your final stream discharge homework plots should look like for the week. Use all of the skills that you've learned in the previous lessons to complete it.

Summarize time series data by month or year using tidyverse pipes in R

Learn how to summarize time series data by day, month or year with Tidyverse pipes in R.

Use tidyverse pipes to subset time series data in R

Learn how to extract and plot data by a range of dates using pipes in R.

Time Series Data: Work With Dates in R

Times series data can be manipulated efficiently in R. Learn how to work with, plot and subset data with dates in R.

Plot data and customize plots with ggplot plots in R - earth analytics - data science for scientists

Learn how to plot data and customize your plots using ggplot in R.

How to Address Missing Values in R

Missing data in R can be caused by issues in data collection and / or processing and presents challenges in data analysis. Learn how to address missing data values in R.

How to import, work with and plot spreadsheet (tabular) data in R

Learn how to import and plot data in R using the read_csv & qplot / ggplot functions.

Understand the vector data type in R and classes including strings, numbers and logicals - Data science for scientists 101

This tutorial introduces vectors in R. It also introduces the differences between strings, numbers and logical or boolean values (True / False) in R.

Creating variables in R and the string vs numeric data type or class - Data Science for scientists 101

This lesson covers creating variables or objects in R. It also introduces some of the basic data types or classes including strings and numbers. This lesson is designed for someone who has not used R before.

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.

How to download and install QGIS

QGIS is a free, open-souce GIS tool that is comparable to ArcMap. This lesson walks through how to install QGIS on your computer.

Get help with R - data science for scientists 101

This tutorial covers ways to get help when you are not sure how to perform a task in R.

Write clean code - expressive or literate programming in R - data science for scientists 101

This lesson covers the basics of clean coding meaning that we ensure that the code that we write is easy for someone else to understand. We will briefly cover style guides, consistent spacing, literate object naming best practices.

Explore precipitation and stream flow data using interactive plots: the 2013 Colorado Floods

Practice interpreting data on plots that show rainfall (precipitation) and stream flow (discharge) as it changes over time.

Work with precipitation data in R: 2013 Colorado floods

Learn why documentation is important when analyzing data by evaluating someone elses report on the Colorado floods.

Use Google Earth time series images to explore flood impacts

Learn how to use the time series feature in Google Earth to view before / after images of a location.

R Markdown resources

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

Add citations and cross references to an R Markdown report - bookdown

Learn how to use bookdown in R to add citations and cross references to your data-driven reports.

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.

Convert R Markdown to PDF or HTML

Knitr can be used to convert R Markdown files to different formats, including web friendly formats. Learn how to convert R Markdown to PDF or HTML in RStudio.

How to Use R Markdown Code Chunks

Code chunks in an R Markdown document are used to separate code from text in a Rmd file. Learn how to create reports using R Markdown.

Introduction to Markdown syntax - a primer

Learn how to write using the markdown syntax - in a R Markdown document.

How to create an R Markdown file in R Studio and the R Markdown file structure.

Learn about the format of a R Markdown file including a YAML header, R code and markdown formatted text.

Introduction to R Markdown & knitr - Connect data, methods and results

Learn what open science is and how R Markdown can help you document your work.

Create a project & working directory setup

Learn how to create a well-organized working directory to store your course data.

File organization 101

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

Install & use packages in R

Learn what a package is in R and how to install packages to work with your data.

Get to know RStudio

Learn how to work with R using the RStudio application.

Install & set up R and RStudio on your computer

Learn how to download and install R and RStudio on your computer.

Data tutorials

Nothing to list here yet!