Module Description¶
In this module, students explore a variety of common data visualizations and how to plot different visualizations depending on the variable relationships and types of data. Students explore the difference between correlational and experimental research and gain experience with methods to visualize and analyze data. Students also refine their statistical knowledge and skills by reviewing percentiles, and measures of center. New concepts are introduced such as Skewness, Variability, Simpson’s Paradox, and Reliability. Students practice disaggregating and aggregating data and learn table methods to manipulate data and how to interpret tables.
Course Topics¶
Statistics
Percentiles and Quartiles
Measures of Center and Spread
Interquartile Range
Range
Median
Mean
Skewness
Variability
Simpson’s Paradox
Aggregation vs. Disaggregation
Visualization Types and Methods
Visualization and Variable Types
Scatter Plots, Line Plots, Horizontal Bar Charts
Histograms
Bin Sizes, Density and Area Principle
Box and Whisker Plots
Using .group(), .bahr(), .hist(), .group(), .plot(), np.arrange()
Table Interpretation and Manipulations
Extracting rows from tables .where() and .take()
Filtering via .where()
Chaining .where()
using .group
w/ np.average
w/ aggregation and .select()
Week 1¶
Lecture 1: Visualizations¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
This lecture introduces visualizations, their purpose, and common types used by data scientists. The lecture also focuses on the relationship between variable types and visualizations.
Lecture 2: Histograms and Ranges¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
This lecture describes the parts of a histogram and defines core attributes such as bins and histogram density.
Discussion 1: Visualizations¶
This discussion covers how visualizations represent and misrepresent data and empowers them to consider adjustments to example visualizations.
Lab 1: Visualizations¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
This lab introduces students to making several common visualizations such as scatter plots, line plots and horizontal bar charts using methods such as .plot and .bahr.
Week 2¶
Lecture 3: Summary Statistics and Boxplots¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
This lecture presents relevant statistics that are commonly presented alongside visualizations such as percentiles, range, interquartile range, and measures of spread and center. Concepts like skewness and symmetry in distributions are discussed as well.
Lecture 4: Filtering and Boolean Predicates¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
In this lecture, students are tasked with quantifying the center and spread of data using measures like mean, median, and interquartile range. They also learn to manipulate and filter tables using boolean predicates, comparison operators, and various string methods.
Reading 1¶
Schwabish and Feng, “Applying Racial Equity Awareness in Data Visualization.” The Urban Institute. 2020.
Homework 1: Data Visualization¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
In this homework, students are tasked with analyzing a dataset by creating and interpreting various data visualizations, including bar charts, histograms, box plots, and scatter plots. They perform table transformations and explore the distributions and relationships of categorical and numerical variables.
Discussion 2: Histograms and Summary Statistics¶
In this discussion, students choose which visualization method to use per data type and explore histograms by calculating the height of bins and related methods.
Lab 2: Histograms and Summary Statistics¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
This lab tasks students with using the .hist() method and interpreting measures of center, as well as box plots and percentiles.
Week 3¶
Lecture 5: Grouping¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
In this lecture, students aggregate data using the .group() method and examine the importance of disaggregation through Simpson’s Paradox. They also utilize comparison operators, boolean values, and string manipulation methods.
Lecture 6: Pivot and Join¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
In this lecture, students are tasked with determining the appropriate unit of analysis and deciding between grouping or pivoting to restructure datasets. They also learn to combine disparate tables through joins and use boolean logic to represent binary variables.
Reading 2¶
P. J. Bickel et al. ,Sex Bias in Graduate Admissions: Data from Berkeley. Science 187, 398-404(1975). DOI:10.1126/science.187.4175.398.
Discussion 3: Simpson’s Paradox: UC Berkeley 1973 Graduate Admissions¶
In this discussion, students are tasked with analyzing the 1973 UC Berkeley graduate admissions dataset to identify missing variables and the effects of data aggregation. They explore regression trends and practice matching different variables with their appropriate statistical data types.
Project 1: Education, Admissions, and Simpson’s Paradox¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
Lab 3: Grouping, Pivoting and Joining¶
[datascience] Jupyter Notebook, GitHub
[polars, coming soon] Jupyter Notebook, GitHub
[R, coming soon] Jupyter Notebook, GitHub
In this lab, students are tasked with gaining hands-on experience with core table operations, including filtering with .where() and restructuring data with .group(). They focus on mastering the syntax and logic required for effective pivoting and joining of multiple tables.