STAT 80B Week 3 - Thursday
2026-03-10
This is a hands-on session:
Goal: By end of class, you’ll have finished all parts of Lab 2
Three main parts:
Your choice: Tableau, R, or Python (see detailed instructions online)
What we’re working with:
Pick ONE tool for this lab:
Tableau
R
Python
Detailed instructions for each tool are on the lab page!
Create the SAME data visualization using 3 different methods:
Why? To see how the same data looks different and learn when each works best.
Basic bar chart steps:
Choose vertical bars when:
Choose horizontal bars when:
Let me show you in Tableau:
Create your first visualization:
Raise your hand if you need help!
What’s different from bars?
Same categories, same amounts—different visual!
In Tableau:
In R: Use geom_point() instead of geom_col()
In Python: Use scatter plot instead of bar plot
Create your second visualization:
A different approach entirely:
Note: If your dataset is 1D (one category), you might need to create a second grouping or use a simpler color-coded table.
In Tableau:
Create your third visualization:
This might be the trickiest one—ask for help if needed!
Now we explore distributions:
This is the most important learning moment of the lab!
Try these as a starting point:
The exact numbers depend on your data range!
In Tableau:
As you change bin width, notice:
Write down what you observe!
Create at least 3 histograms:
For each, take a screenshot and make notes:
After creating all visualizations, write 1 paragraph (150-300 words) explaining:
This shows you’re thinking critically, not just clicking buttons!
Strong answers include:
Weak answers: “I liked the bar chart because it looks nice.”
Create ONE PDF containing:
Label each visualization clearly!
Example titles: “Figure 1: Vertical Bar Chart” or “Histogram with 10 bins”
Several options:
Important: All visualizations must be readable with clear labels!
You’ll be evaluated on:
Not graded on: Whether you picked the “perfect” visualization (there isn’t one!)
Use the remaining time to:
I’ll circulate to help with technical issues and answer questions.
“Can I use different data?”
“Do I need to use all three software tools?”
“What if my histograms all look similar?”
Common issues:
Key functions:
# Bar chart
ggplot(data, aes(x = category, y = amount)) + geom_col()
# Dot plot
ggplot(data, aes(x = category, y = amount)) + geom_point()
# Histogram
ggplot(data, aes(x = values)) + geom_histogram(bins = 10)Change bins = 10 to try different widths!
Key functions:
# Bar chart
plt.bar(categories, amounts)
# Dot plot
plt.scatter(categories, amounts)
# Histogram
plt.hist(values, bins=10)Seaborn makes things prettier:
If you’re stuck:
Remember: Struggling is part of learning!
Minimum goals:
Ideal goals:
Lab 2 is due: today
LastName_FirstName_Lab2.pdfLate policy: See syllabus
What you’re learning:
This is the foundation for all future labs!
Use the remaining class time to work on Lab 2.
I’ll be walking around to help!