Reproducible Science and Programming - Python

Data Wrangling With Numpy Arrays

This lesson teaches you how to wrangle data (e.g. run multi-task functions, combine) with numpy arrays.

last updated: 22 Aug 2018

Data Wrangling With Pandas

This lesson teaches you how to wrangle data (e.g. subselect, update, and combine) with pandas dataframes.

last updated: 10 Sep 2018

Write Custom Functions

This lesson teaches you how to write custom functions in Python.

last updated: 10 Sep 2018

Intro to Functions

This lesson describes how functions are used in Python to write DRY and modular code.

last updated: 10 Sep 2018

Intro to Conditional Statements

This lesson describes the structure of conditional statements in Python and demonstrates how they are used for writing DRY code.

last updated: 10 Sep 2018

Intro to Loops

This lesson describes the structure of loops in Python and how they are used to iteratively execute code.

last updated: 13 Aug 2018

Intro to DRY code

This lesson describes the DRY (i.e. Do Not Repeat Yourself) principle and lists key strategies for writing DRY code in Python.

last updated: 10 Sep 2018

Intro to Pandas Dataframes

This lesson describes key characteristics of pandas dataframes, a data structure commonly used for scientific data.

last updated: 10 Sep 2018

Activity on Dry Code

This activity provides an opportunity to practice writing DRY code using loops, conditional statements, and functions.

last updated: 10 Sep 2018

Activity Data Structures

This activity provides an opportunity to practice working with commonly used Python data structures for scientific data: lists, numpy arrays, and pandas dataframes.

last updated: 10 Sep 2018

Intro to Numpy Arrays

This lesson describes the key characteristics of a commonly used data structure in Python for scientific data: numpy arrays.

last updated: 10 Sep 2018

Plot Data in Python with Matplotlib

Matplotlib is one of the most commonly used packages for plotting in Python. This lesson covers how to create a plot and customize plot colors and label axes using matplotlib.

last updated: 10 Sep 2018

Import Python Packages

Python packages are organized directories of code that provide functionality such as plotting data. Learn how to write Python Code to import packages.

last updated: 08 Aug 2018

Python Lists

This lesson walks you through creating and editing Python lists.

last updated: 12 Aug 2018

Variables in Python

Variables store data (i.e. information) that you want to re-use in your code (e.g. a single value, list of values, path to a directory, filename). Learn how to write Python code to work with variables.

last updated: 10 Sep 2018

Subtract Raster Data in Python Using Numpy and Rasterio

Sometimes you need to manipulate multiple rasters to create a new raster output data set in Python. Learn how to create a CHM by subtracting an elevation raster dataset from a surface model dataset in Python.

last updated: 19 Jul 2018

Open, Plot and Explore Lidar Data in Raster Format with Python

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

last updated: 19 Jul 2018

The Jupyter Notebook Interface

Jupyter Notebooks is an interactive environment where you can write and run code and also add text that describes your workflow using Markdown. Learn how to use Jupyter Notebook to run Python Code and Markdown Text.

last updated: 08 Aug 2018

Work with Landsat Remote Sensing Data in Python

Landsat 8 data are downloaded in tif file format. Learn how to open and manipulate Landsat data in Python. Also learn how to create RGB and color infrafed Landsat image composites.

last updated: 16 Oct 2018

Introduction to Multispectral Remote Sensing Data in Python

Multispectral remote sensing data can be in different resolutions and formats and often has different bands. Learn about the differences between NAIP, Landsat and MODIS remote sensing data as it is used in Python.

last updated: 16 Oct 2018

Get Help with Python

This tutorial covers ways to get help when you are stuck in Python.

last updated: 08 Oct 2018

Write Clean Python Code - Expressive programming 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.

last updated: 08 Oct 2018

Objects and variables in Python

This tutorial introduces the Python programming language. It is designed for someone who has not used Python before. You will work with precipitation and stream discharge data for Boulder County.

last updated: 08 Oct 2018

Get to Know Python & Jupyter Notebooks

This tutorial introduces the Python scientific programming language. It is designed for someone who has not used Python before. You will work with precipitation and stream discharge data for Boulder County in Python but also learn the basics of working with python.

last updated: 08 Oct 2018

Work With Datetime Format in Python - Time Series Data

This lesson covers how to deal with dates in Python. It reviews how to convert a field containing dates as strings to a datetime object that Python can understand and plot efficiently. This tutorial also covers how to handle missing data values in Python.

last updated: 08 Oct 2018

About the Geotiff (.tif) Raster File Format: Raster Data in Python

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 you learn about the use of tif tags or metadata embedded within a geotiff file as they can be used to explore data programatically.

last updated: 25 Sep 2018

Plot Histograms of Raster Values in Python

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

last updated: 25 Sep 2018

Open, Plot and Explore Lidar Data in Raster Format with Python

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

last updated: 08 Oct 2018

Setup Your Earth Analytics Working Directory

This tutorial walks you through how to create your earth-analytics working directory in bash. It also covers how to change the working directory in Jupyter Notebook.

last updated: 14 Sep 2018

File Organization Tips

This lesson provides a broad overview of file organization principles.

last updated: 25 Sep 2018

Work with MODIS Remote Sensing Data in Python

MODIS is a satellite remote sensing instrument that collects data daily across the globe at 250-500 m resolution. Learn how to import, clean up and plot MODIS data in Python.

last updated: 18 Oct 2018

Clean Remote Sensing Data in Python - 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: 16 Oct 2018