+ - 0:00:00
Notes for current slide
Notes for next slide

Data Visualization 2

Bora Jin

1 / 18

Today's Goal

  • Explain continuous, discrete, and categorical variables
  • Understand how to make visualizations and summarize variables according to their type
  • Develop a faceted plot
3 / 18

Quiz

Q - (Numerical / Categorical) variables can be classified as either continuous or discrete.

4 / 18

Quiz

Q - (Numerical / Categorical) variables can be classified as either continuous or discrete.

Numerical

4 / 18

Quiz

Q - (Numerical / Categorical) variables can be classified as either continuous or discrete.

Numerical

Q - (Ordinal / Nominal) categorical variable has a natural ordering.

4 / 18

Quiz

Q - (Numerical / Categorical) variables can be classified as either continuous or discrete.

Numerical

Q - (Ordinal / Nominal) categorical variable has a natural ordering.

Ordinal

4 / 18

Quiz

Q - (Numerical / Categorical) variables can be classified as either continuous or discrete.

Numerical

Q - (Ordinal / Nominal) categorical variable has a natural ordering.

Ordinal

Q - Classify the following variables:

  • monthly expenses
4 / 18

Quiz

Q - (Numerical / Categorical) variables can be classified as either continuous or discrete.

Numerical

Q - (Ordinal / Nominal) categorical variable has a natural ordering.

Ordinal

Q - Classify the following variables:

  • monthly expenses: numeric, continuous
4 / 18

Quiz

Q - (Numerical / Categorical) variables can be classified as either continuous or discrete.

Numerical

Q - (Ordinal / Nominal) categorical variable has a natural ordering.

Ordinal

Q - Classify the following variables:

  • monthly expenses: numeric, continuous
  • number of shoes
4 / 18

Quiz

Q - (Numerical / Categorical) variables can be classified as either continuous or discrete.

Numerical

Q - (Ordinal / Nominal) categorical variable has a natural ordering.

Ordinal

Q - Classify the following variables:

  • monthly expenses: numeric, continuous
  • number of shoes: numeric, discrete
4 / 18

Quiz

Q - (Numerical / Categorical) variables can be classified as either continuous or discrete.

Numerical

Q - (Ordinal / Nominal) categorical variable has a natural ordering.

Ordinal

Q - Classify the following variables:

  • monthly expenses: numeric, continuous
  • number of shoes: numeric, discrete
  • course satisfaction rating (“extremely dislike”, “dislike”, “neutral”, “like”, “extremely like”)
4 / 18

Quiz

Q - (Numerical / Categorical) variables can be classified as either continuous or discrete.

Numerical

Q - (Ordinal / Nominal) categorical variable has a natural ordering.

Ordinal

Q - Classify the following variables:

  • monthly expenses: numeric, continuous
  • number of shoes: numeric, discrete
  • course satisfaction rating (“extremely dislike”, “dislike”, “neutral”, “like”, “extremely like”): categorical, ordinal
4 / 18

Quiz

Q - (Numerical / Categorical) variables can be classified as either continuous or discrete.

Numerical

Q - (Ordinal / Nominal) categorical variable has a natural ordering.

Ordinal

Q - Classify the following variables:

  • monthly expenses: numeric, continuous
  • number of shoes: numeric, discrete
  • course satisfaction rating (“extremely dislike”, “dislike”, “neutral”, “like”, “extremely like”): categorical, ordinal
  • eye color
4 / 18

Quiz

Q - (Numerical / Categorical) variables can be classified as either continuous or discrete.

Numerical

Q - (Ordinal / Nominal) categorical variable has a natural ordering.

Ordinal

Q - Classify the following variables:

  • monthly expenses: numeric, continuous
  • number of shoes: numeric, discrete
  • course satisfaction rating (“extremely dislike”, “dislike”, “neutral”, “like”, “extremely like”): categorical, ordinal
  • eye color: categorical, nominal
4 / 18

Quiz

Q - Describe the shape of the following distribution of a numeric w.r.t. skewness and modality.

5 / 18

Quiz

Q - Describe the shape of the following distribution of a numeric w.r.t. skewness and modality.

left-skewed, unimodal

5 / 18

Quiz

Q - Describe the shape of the following distribution of a numeric w.r.t. skewness and modality.

6 / 18

Quiz

Q - Describe the shape of the following distribution of a numeric w.r.t. skewness and modality.

symmetric, uniform

6 / 18

Quiz

Q - Describe the shape of the following distribution of a numeric w.r.t. skewness and modality.

7 / 18

Quiz

Q - Describe the shape of the following distribution of a numeric w.r.t. skewness and modality.

bimodal

7 / 18

Quiz

Q - Fill in the blanks with appropriate R functions

  • center: mean (___), median (___)
  • spread: range (range), standard deviation (___), interquartile range (IQR)
8 / 18

Quiz

Q - Fill in the blanks with appropriate R functions

  • center: mean (mean), median (median)
  • spread: range (range), standard deviation (sd), interquartile range (IQR)
9 / 18

Quiz

Q - Fill in the blanks with appropriate R functions

  • center: mean (mean), median (median)
  • spread: range (range), standard deviation (sd), interquartile range (IQR)

Q - What plot might you draw if you want to detect potential outliers?

9 / 18

Quiz

Q - Fill in the blanks with appropriate R functions

  • center: mean (mean), median (median)
  • spread: range (range), standard deviation (sd), interquartile range (IQR)

Q - What plot might you draw if you want to detect potential outliers?

Box plot

9 / 18

Quiz

Q - Which of these commands are inappropriate to visualize distribution of a single numerical variable?

a. geom_histogram()

b. geom_point()

c. geom_density()

d. geom_boxplot()

e. geom_hex()

10 / 18

Quiz

Q - Which of these commands are inappropriate to visualize distribution of a single numerical variable?

a. geom_histogram()

b. geom_point() - to visualize relationships between two numerical variables

c. geom_density()

d. geom_boxplot()

e. geom_hex() - relationships between two numerical variables through binning

11 / 18

Quiz

Q - Which of these commands are inappropriate to visualize relationships between numerical and categorical variables?

a. geom_boxplot()

b. geom_violin()

c. geom_density_ridges()

d. geom_bar()

12 / 18

Quiz

Q - Which of these commands are inappropriate to visualize relationships between numerical and categorical variables?

a. geom_boxplot()

b. geom_violin()

c. geom_density_ridges()

d. geom_bar() - visualize distribution of a categorical variable or relationship between categorical variables

13 / 18

Quiz

Q - Which of these is the most relevant for the difference between two bar plots?

a. aes(x = homeownership, fill = grade)

b. position = "fill"

c. labs()

14 / 18

Quiz

Q - Which of these is the most relevant for the difference between two bar plots?

a. aes(x = homeownership, fill = grade)

b. position = "fill" - relative frequency within x

c. labs()

15 / 18

Questions?

16 / 18

Let's Practice Together!

Go to AE 04: Data Visualization 2

17 / 18

Bulletin

  • Lab 01 due Today at 11:59pm

  • Watch videos for Prepare: May 17

  • Complete Part 4 and Practice of ae03

  • Complete Part 1-2 of ae04

18 / 18
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow