My Carpentries teaching journey started out slow - I taught a couple of times that first year, and stuck to the lesson I was most comfortable with (SQL & Databases). However, at the start of the summer in 2021 my work put me in charge (or I volunteered to be in charge) of a group of undergraduate interns who wanted to learn how to use computational methods for open source intelligence analysis. So I put together a curriculum of Carpentries lessons to take my interns from zero-assumed knowledge to the ability to complete a computational analysis in Python. I’m teaching the same curriculum in the Fall (slightly expanded and refined) to another group of undergraduate interns. This allowed me to gain experience in teaching more of the core Carpentries lessons… and also inspired me to develop my own lesson focused on interactive data visualizations!


A semester-long curriculum of Carpentries workshops

Each week I teach for 2 hours, and then learners can practice what they’ve learned and give feedback on the workshop in an assignment (delivered via Google Forms). I’ve included the curriculum schedule below:

Week 0: Self Assessment

Goals:

  • Learners assess their current skill level

Assignment:

Week 1: GitHub

Goals:

  • Instructor & learners introduce themselves
  • Overview of the curriculum
  • All learners have a GitHub account and know the basics of creating and modifying a personal repository on GitHub (with GitHub Desktop).

Assignment:

Resources:

Week 2: The Shell (part 1)

Lesson Plan:

Goals:

  • become comfortable navigating your computer via the command line
  • learn the basic set of Bash commands (pwd, ls, man, cd, mkdir, nano, touch, mv, cp, rm, wc, cat, less, sort, head, tail, echo)
  • learn how to chain commands using the pipe, redirect, and append
  • learn how to use loops

Assignment:

Further Resources:

Week 3: The Shell (part 2)

Lesson Plan:

Goals:

  • Learn how to save a series of commands as a shell script
  • Learn how to search files from the command line
    • grep, find
  • Learn how to generate and use your own SSH key pair
  • Learn how to access a computer remotely
    • ssh, scp

Assignment:

Further Resources:

Week 4: Git

Lesson Plan:

Goals:

  • Learn how to use git from the command line
  • Set up git on the remote sandbox server
    • git config
  • Learn how to create repositories
    • git init
  • Learn how to track changes
    • git add, git commit, git status, git log, git diff
  • Learn how to use the history
    • HEAD, git show, git checkout, git revert
  • Learn how to not track things
    • .gitignore
  • Set up a remote repository
    • git remote, git push, git pull
  • Learn how to collaborate & resolve conflicts
    • git clone

Assignment:

Week 5: Python (part 1)

Lesson Plan:

Goals:

  • Everyone has Anaconda (and thus Python & Jupyter Lab) installed and is familiar with how to work within Jupyter Lab and use a Jupyter Notebook
  • Learn about data types and type conversion in python
  • Learn how to use built in functions
  • Learn how to get help, read the built-in docs, and read errors
  • Learn how to import and use libraries
  • Learn how to read data into a dataframe and interact with the dataframe (pandas)

Assignment:

Further Resources:

Week 6: Python (part 2)

Lesson Plan:

Goals:

  • Learn how to select data from a dataframe (pandas)
  • Learn how to plot data (matplotlib.pyplot)
  • Learn how to work with lists
  • Learn about for loops and the accumulator pattern

Assignment:

Week 7: Python (part 3) + requests & REST APIs

Lesson Plan:

Goals:

  • Learn about conditionals (if, else, elif)
  • Looping over files (glob)
  • Learn how to write functions
  • Learn about the dictionary data type
  • Learn how use python’s requests library to query a REST API

Assignment:

Further Resources:

Week 8: Interactive Data Visualizations

Lesson Plan:

Goals

  • Learn how to create a new conda environment
  • Learn how to wrangle data into a tidy shape
  • Learn how to create line plots with plotly
  • Learn how to create and run a streamlit app
  • Learn how to add widgets to the streamlit app

Week 9: Databases & SQL (part 1)

Lesson Plan:

Goals:

  • Learn how to select data from a table
  • Learn how to sort results and remove duplicates
  • Learn how to filter, or select subsets of data, based on boolean conditions
  • Learn how to calculate new values to be returned in the results
  • Learn about missing data, and incorporating NULL into queries

Assignment:

Week 10: Databases & SQL (part 2)

Lesson Plan:

Goals:

  • Learn how to aggregate data in queries (calculate sums, averages, etc)
  • Learn how to combine tables in a query
  • Learn about data hygiene, and principles of database design like primary & foreign key constraints
  • Learn how to create, modify, and delete data
  • Learn how to use SQLite databases within a python script

Assignment:

Week 11: Regular Expressions

Lesson Plan:

Goals:

  • Learn how to use Regular Expressions (regex)

Assignment:

Further Resources:

Updated: