Reproducible Science and Programming - Python

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: 12 Aug 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: 13 Aug 2018

Intro to Pandas Dataframes

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

last updated: 10 Aug 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: 13 Aug 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: 11 Aug 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: 08 Aug 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: 08 Aug 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