Week 1 - Data Types, Aesthetics & Getting Started
01 Dec 2025
Today’s Agenda:
By the end of today: You’ll have created your first visualization and be ready for Lab 1! 🚀
From Tuesday, remember:
Aesthetics = Visual properties that can represent data
From Tuesday, remember:
Data Types = Quantitative and Categorical
Today we’ll learn: Which aesthetics work best for which types of data!
Mapping = Assigning data values to visual properties
Think of it as a translation:
Data value → Visual property
Examples:
| Data Type | Best Aesthetics | Avoid |
|---|---|---|
| Continuous Quantitative | Position, Size, Color intensity | Shape, Discrete colors |
| Discrete Quantitative | Position, Size, Color (with care) | Too many colors |
| Categorical | Color, Shape, Position (grouped) | Size (implies order) |
| Ordinal | Color (sequential), Size, Position | Random colors |
Most effective aesthetic for showing quantitative data!
Why?
✅ Good for:
❌ Limitations:
Powerful but tricky - can show both categorical and quantitative data!
Use distinct, qualitative colors
✅ Red, Blue, Green for different categories
❌ Light blue, medium blue, dark blue (implies order!)
Use sequential or diverging color scales
✅ Light → Dark gradient for “low to high”
✅ Blue → White → Red for “negative to positive”
Best for quantitative data showing magnitude
Common uses:
Important:
Best for categorical data with few categories
Strengths:
Limitations:
Multiple aesthetics can show the same variable for emphasis or accessibility!
Example: Visualizing car efficiency by type
Benefits:
Caution: Don’t overdo it - can become cluttered!
Scenario: Visualizing Student Performance Data
Variables:
Task: Design TWO different visualizations using different aesthetic mappings. For each:
Let’s see different approaches:
Key insight: Same data, many valid visualization approaches! The “best” one depends on what question you’re trying to answer.
Scales define HOW data values map to aesthetic properties
Think of scales as the translation dictionary:
Data Domain → Visual Range
Example: Temperature scale
Equal steps in data = equal steps in visualization
✅ Best for: Most quantitative data
Example: 0, 10, 20, 30… equally spaced
Equal multiples in data = equal steps in visualization
✅ Best for: Data spanning many orders of magnitude
Example: 1, 10, 100, 1000… equally spaced
Different types for different data:
Light → Dark (for quantitative data)
Example: Population density (low = light blue, high = dark blue)
Two colors meeting at middle (for data with meaningful center)
Example: Temperature anomaly (cold = blue, neutral = white, hot = red)
Distinct colors (for categorical data)
Example: Political parties (red, blue, green, etc.)
Question: Should your scale start at zero?
For Bar Charts: Almost always YES!
For Line Charts: Depends!
For Scatter Plots: Usually no need for zero
Time to move and recharge! 🤸♀️
When we return: Hands-on software tutorial - your first visualization!
Today we’ll cover two paths:
Best for:
Pros: Intuitive, drag-and-drop
Cons: Less reproducible
Best for:
Pros: Fully reproducible, powerful
Cons: Steeper learning curve
Choose based on your goals! You can always learn the other later.
Step 1: Get your student license
💡 Tip: This can take 10-15 minutes, start now if you haven’t already!
When you open Tableau, you’ll see:
Left: Connect pane (where you load data) - Excel, CSV, databases, web data, etc.
Center: Canvas (where you build visualizations) - Drag and drop fields here
Right: Show Me panel (suggested chart types) - Smart suggestions based on your data
Bottom: Data pane - Lists all fields (dimensions and measures)
Tableau auto-categorizes your data:
Qualitative fields - Categorical data - Dates - Text fields
Used to slice and group data
Quantitative fields - Numbers - Counts - Calculations
Used to aggregate and measure
You can change how Tableau treats fields if needed!
We’ll use: Sample - Superstore (built-in dataset)
Step 1: Connect to data - Click “Sample - Superstore” on start page
Step 2: Go to Sheet 1 - Click “Sheet 1” tab at bottom
Step 3: Create a simple bar chart - Drag Sub-Category to Rows - Drag Sales to Columns
Boom! 💥 You have your first visualization!
Let’s add a second variable:
What do you notice? - Each sub-category is now subdivided by region - We’re using stacked bars - Color represents categorical data (Region)
Try this: Right-click the chart → Format → experiment with fonts, colors, etc.
Let’s make a bubble chart instead:
You now have: Position showing sales/category, size showing profit, color showing region! 🎨
To save your visualization:
Option 1: Save as Workbook - File → Save As (.twbx file) - Contains data and visualizations
Option 2: Export Image - Worksheet → Export → Image (PNG) - Good for reports, presentations
Option 3: Copy to Clipboard - Worksheet → Copy → Image - Paste into documents
Positron = Modern IDE for data science
Why Positron? - Modern interface - Great for learning - Smooth transition if you know RStudio - Handles both R and Python (flexibility!)
Step 1: Download Positron
Step 2: Install R or Python (or both!)
Step 3: Install visualization packages
install.packages("ggplot2")install.packages("tidyverse") (includes ggplot2 + more)pip install matplotlib seaborn plotlyLeft Panel:
Center:
Bottom:
Top:
Load packages and data:
Structure: ggplot() + layers
aes()): What mappings? (x, y, color, size…)Add color by species:
Import and load data:
R (ggplot2):
# Save last plot
ggsave("my_plot.png", width = 8, height = 6)
# Or be explicit
my_plot <- ggplot(...) + geom_point()
ggsave("my_plot.png", plot = my_plot)Python:
Create 3 visualizations using different aesthetic mappings:
A real dataset from Antarctic research with measurements of 344 penguins!
Variables include:
Where is the data?:
library(palmerpenguins); data(penguins)sns.load_dataset('penguins')Why penguins? Mixed variable types, clear patterns, and adorable! 🐧
One PDF file containing:
Your name and software used at the top
Three visualizations, each with:
Brief reflection (1 paragraph):
| Component | Points | What We’re Looking For |
|---|---|---|
| Software Working | 3 | All 3 visualizations present & exported |
| Different Aesthetics | 3 | Each viz uses different aesthetic combos |
| Descriptions | 2 | Clear explanation of mappings |
| Reflection | 2 | Thoughtful comments on process |
Total: 8 points (remember: top 4 of 5 labs count!)
This is meant to be straightforward! Just show us you can make basic charts.
Remember: The goal is to verify your software works and you understand basic mappings. Quality over complexity!
❌ Too complex - Save fancy stuff for later!
❌ Unreadable exports - Check image quality
❌ No descriptions - We need to know your thinking
❌ Using same aesthetics 3 times - Show variety
❌ Waiting until last minute - Technical issues happen!
For the rest of class (~30 min):
Breakout by tool: - Tableau users: Front of room - R/Python users: Back of room
Tuesday: Color and Coordinate Systems (Wilke Ch 3-4)
Thursday: More practice + Lab 2 setup
Due Next Week: - Concept Map 1 (Friday): Summarizing data types, aesthetics, scales
Rate your confidence (1-20) on Ed Discussion:
If you rated anything 10 or below: Great time to ask questions! Stay after class or come to office hours.
Stay after for help with: - Software installation issues - Lab 1 questions
- Choosing which tool to use - Anything else!
Office hours: Right here after class (3:05-3:40 PM)
Lab 1 due today!
See you Tuesday for Color & Coordinate Systems!
![]()
STAT 80B – Winter 2026
![]()
STAT 7 – Winter 2026