Data Visualization and Maps I

HES 505 Fall 2024: Session 25

Carolyn Koehn

Objectives

By the end of today you should be able to:

  • Describe some basic principles of data visualization

  • Extend principles of data visualization to the development of maps

  • Distinguish between several common types of spatial data visualization

  • Understand the relationship between the Grammar of Graphics and ggplot syntax

  • Describe the various options for customizing ggplots and their syntactic conventions

But first… Scaling

Assignment 9: Scaling the hazard data

hazard.smooth.scl <- (hazard.smooth - mean(incident.cejst.prep$hazard))/sd(incident.cejst.prep$hazard)
#versus
hazard.smooth.scl.nogood <- scale(hazard.smooth)

Assignment 9: Scaling the hazard data

Assignment 9: Different predictions for different scaling

Introduction to Data Visualization

Principles vs. Rules

  • Lots of examples of good and bad data visualization

  • What makes a graphic good (or bad)?

  • Who decides?

  • Rule: externally compels you, through force, threat or punishment, to do the things someone else has deemed good or right.

  • Principle: internally motivating because it is a good practice; a general statement describing a philosophy that good rules should satisfy

  • Rules contribute to the design process, but do not guarantee a satisfactory outcome

“Graphical excellence is the well-designed presentation of interesting data—a matter of substance, of statistics, and of design … [It] consists of complex ideas communicated with clarity, precision, and efficiency. … [It] is that which gives to the viewer the greatest number of ideas in the shortest time with the least ink in the smallest space … [It] is nearly always multivariate … And graphical excellence requires telling the truth about the data.”
— Edward Tufte

Ugly, Wrong, and Bad

  • Ugly: graphic is clear and informative, but has aesthetic issues

  • Bad: graphic is unclear, confusing, or decieving

  • Wrong: the figure is objectively incorrect