28
Visualization & ggplot2 Lab

Visualization & ggplot2 Lab - Stanford University

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Visualization & ggplot2 Lab - Stanford University

Visualization & ggplot2 Lab

Page 2: Visualization & ggplot2 Lab - Stanford University

Goals for the session

1. Discuss the principles of good vs bad data viz2. Understand the grammar of graphics

4. Introduce, explain and use ggplot()5. Discuss how to select the most appropriate plots

6. Visualization and discovery of global trends

Page 3: Visualization & ggplot2 Lab - Stanford University
Page 4: Visualization & ggplot2 Lab - Stanford University
Page 5: Visualization & ggplot2 Lab - Stanford University
Page 6: Visualization & ggplot2 Lab - Stanford University

Goals for the session

1. Discuss the principles of good vs bad data viz2. Understand the grammar of graphics

3. Introduce, explain and use ggplot()4. Discuss how to select the most appropriate plots

5. Visualization and discovery of global trends

Page 7: Visualization & ggplot2 Lab - Stanford University
Page 8: Visualization & ggplot2 Lab - Stanford University

ggplot grammar of graphics

- datasets (nouns)- geometric objects (verbs): visual presentations of the data (points, lines, rectangles, contours..)- aesthetics (adverbs): instructions on how to map data variables to geometric objects- stat. transformations/summaries (line fitting, binning)- coordinate systems and scales (linear, log, rank)- layers: overlay- facets: separating data into multiple subplots- settings (text size, font, alignment, angle, positioning)

Page 9: Visualization & ggplot2 Lab - Stanford University
Page 10: Visualization & ggplot2 Lab - Stanford University
Page 11: Visualization & ggplot2 Lab - Stanford University
Page 12: Visualization & ggplot2 Lab - Stanford University
Page 13: Visualization & ggplot2 Lab - Stanford University
Page 14: Visualization & ggplot2 Lab - Stanford University
Page 15: Visualization & ggplot2 Lab - Stanford University
Page 16: Visualization & ggplot2 Lab - Stanford University
Page 17: Visualization & ggplot2 Lab - Stanford University
Page 18: Visualization & ggplot2 Lab - Stanford University
Page 19: Visualization & ggplot2 Lab - Stanford University
Page 20: Visualization & ggplot2 Lab - Stanford University
Page 21: Visualization & ggplot2 Lab - Stanford University
Page 22: Visualization & ggplot2 Lab - Stanford University
Page 23: Visualization & ggplot2 Lab - Stanford University
Page 24: Visualization & ggplot2 Lab - Stanford University
Page 25: Visualization & ggplot2 Lab - Stanford University
Page 26: Visualization & ggplot2 Lab - Stanford University
Page 27: Visualization & ggplot2 Lab - Stanford University
Page 28: Visualization & ggplot2 Lab - Stanford University

Acknowledgments

● Susan Holmes● Wolfgang Huber● Sudarshan Shetty● Wisam Saleem