PUBHLT0411 – Python for Public Health Data Analysis
University of Pittsburgh · School of Public Health · Fall 2026
Lecture slides
Below are interactive lecture slides so that you may follow along with the in-class exercises. Every code cell runs in the browser – click into a block and press Run, then edit it and run it again. The first cell on a page takes a few seconds to start while Python loads.
| Module | Date | Reading | Slides | Lab |
|---|---|---|---|---|
| Module 0: Notebooks and values | Lecture Tue Oct 6 Lab take home |
P4E 1–2 | live (html) static (pdf) |
Lab 0 |
| Module 1: Conditions and sequences | Lecture Thu Oct 8 Lab Tue Oct 13 |
P4E 3, 5, 8 P4DA 2 |
live (html) static (pdf) |
Lab 1 |
| Module 2: Collections, loops, and functions | Lecture Thu Oct 15 Lab Tue Oct 20 |
P4E 4, 5, 9, 10 | live (html) static (pdf) |
Lab 2 |
| Module 3: NumPy | Lecture Thu Oct 22 Lab Tue Oct 27 |
P4DA 4 | live (html) static (pdf) |
Lab 3 |
| Module 4: pandas and wrangling | Lecture Thu Oct 29 Lab Thu Nov 5 |
P4DA 5, 7, 8 | live (html) static (pdf) |
Lab 4 |
| Module 5: Visualization and description | Lecture Tue Nov 10 Lab Thu Nov 12 |
P4DA 9, 10 | live (html) | |
| Module 6: Reproducible pipeline | Lecture + Lab Tue Nov 17 | P4DA 13 | live (html) |
Module 0’s lab is a take home setup check with no submission component. Module 6 is one combined session rather than a lecture and lab pair. There is no class on Tue Nov 3 (Election Day).
Readings. [P4E] Python for Everybody (3e) – https://www.py4e.com/html3/ · [P4DA] Python for Data Analysis (3e) – https://wesmckinney.com/book/
About the data
Every dataset in this course is real and traces to a named public source – the Pennsylvania Department of Health, the CDC, or the EPA. County-level figures are reported as published, including their suppression rules and known limitations. All data files ship with the course download, so there is nothing to upload.
Labs and homework
Labs are worked on during each week’s lab session and submitted to Canvas by 11:59pm that same day. There are six labs across the Python half, and the lowest grade is dropped.
Homework is completed on DataCamp, not on this site or Canvas. Each homework is an assigned set of DataCamp chapters covering the module just finished, due by 9am the day the next module starts. Homework is graded on completion, recorded automatically through DataCamp, there is nothing to upload to Canvas. See Canvas and the syllabus for the assigned chapters and exact due dates.
Software
All coursework will require the use of Python and JupyterLab, installed locally on your own machine. The course supplies everything as a single download from Canvas: you install a small tool called uv, which installs Python itself along with every package the course uses, pinned to the same versions on every machine. Setup takes about fifteen minutes and is done together in class during Module 0; SETUP.md in the download carries every step with its failure modes. A separate Python download is not required, and Anaconda is neither required nor recommended – an existing Python or Anaconda installation is left untouched.
The slides on this site run Python directly in the browser through Pyodide, which requires no account and no installation.