Because of academic holidays, several weeks have only one lecture.
Module Description¶
In this module, students build a foundation in Python programming and data science, progressing from Python syntax to skills like data cleaning and array manipulation. Students apply these computational tools to data from public health contexts and analyze population estimates and health disparities. They also examine the ethical implications and potential biases in data collection. Students learn to interrogate how data is measured and its broader impact on society.
Content Topics¶
Introduction to Computer Programming
Python Syntax
Operators, built in functions and print()
Variables and Name Assignments/Conventions
Data Types and Data Casting
Interpreting Error Messages
Call Expressions and Functions
Introduction to Data Science
History of Data Science as a field
Features of data sets and table attributes
Arrays and array operations
NumPy functions
Data cleaning
Measures of central tendency (mean, mode, median, range)
Categorical and Quantitative Variables
Data Sensemaking
Asking questions about ethics and data science
Interrogating what is being measured, what was left out, who collected the data and potential sources of bias
Implications of data analysis on society through applied examples.
Applications of Data Science to Public Health
Age-standarization
Population Estimates
Incidence vs Crude Rates
Aggregation and Disaggregation of Variables
Disparities in Health Outcomes
Week 1¶
Lecture 1: Introduction, Course Overview¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
In this lecture students are introduced to the foundations of data science and the social implications of computing and data science. Data science is discussed through a historical lens of W.E.B. Du Bois’ visualizations and the role of visualizations as a means of communication.
Reading 1¶
Cathy O’Neil, Weapons of Math Destruction, 2017. “Chapter 3 Arms Race: Going to College.”
Discussion 1: WMD, and Names, Operations¶
In this discussion students explore the social implications of data-driven ranking systems and the potential biases embedded in their design. Students also get hands-on practice with Python basics including naming conventions, PEMDAS, and debugging.
Lab 1: Using Jupyter Notebooks¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
In this lab students are introduced to the Jupyter notebook environment, including Markdown formatting, Python arithmetic, and variable naming.
Week 2¶
Lecture 2: Data Types and Rates¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
In this lecture students learn about Python expressions, naming conventions, and core data types. The lecture also introduces incidence rates as a practical application of data computation.
Homework 1: Introduction to Python and Jupyter¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
In this homework students practice Python operations, naming, and functions while applying these skills to real-world public health contexts such as calculating and age-standardizing disease incidence rates.
Discussion 2: Considering Fractions¶
In this discussion students examine fractions as ratios, rates, and tools for measuring population-level phenomena, with a focus on age standardization and disaggregation. Students also reflect critically on the affordances and constraints of different data representations and the social dimensions of measurement.
Lab 2: Python Names¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
In this lab students practice Python assignment, division, casting, and string manipulation while applying these skills to calculate disease incidence rates.
Week 3¶
Lecture 3: Arrays and NumPy¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
In this lecture students are introduced to arrays and the NumPy library, including how to create and manipulate arrays using built-in functions and methods.
Lecture 4: Table Fundamentals¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
In this lecture students are introduced to exploratory data analysis through reading datasets and working with tables, covering key table methods, method chaining, and the Print and NoneType concepts.
Homework 2: Arrays and Table Fundamentals¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
In this homework students work with table attributes and methods, array functions, and summary statistics such as averages, max, and min, while also constructing frequency tables and estimating populations with weighted averages.
Discussion 3: Documentation, Array Operations and Table Methods¶
In this discussion students deepen their understanding of NumPy and arrays by practicing array operations and functions alongside table creation and manipulation methods.
Lab 3: Print, Arrays, and Tables¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
In this lab students practice using Print(), work with NoneType, and apply table methods and attributes to explore and manipulate tabular data.
Week 4¶
Lecture 5: Variables¶
In this lecture students learn how to operationalize concepts into variables, exploring different variable types and the unit of analysis. The lecture also covers the processes of aggregation and disaggregation as tools for working with data at different levels.
Lecture 6: Variables II¶
In this lecture students build on their understanding of variables by examining the relationships between samples and populations, and distinguishing between association, causality, and confounding factors.
Lab 4: SF Food Safety¶
In this lab students apply their data skills to a real-world San Francisco food safety dataset, working with missing data, outliers, filters, and variable types to investigate data collection and unit of analysis.
Note: This can (and should) be a 2-hour activity. It is an adaptation of the Fundamentals module Lab 1: Reading and Exploring Datasets.