Lecture 7 Flashcards
(12 cards)
Affective intents
attempts to evoke a reaction or response to a
data visualization
5 Design principles for effective visualizations
- Contrast – emphasize difference
- Repetition – reusing the same or similar elements throughout your
design (e.g., slideshow, document) to bring unity, consistency, and
cohesiveness - Alignment – every element is connected visually, nothing appears
randomly (e.g. plots presented side-by-side should have clear alignment) - Proximity – related items should be grouped together (e.g. captions
clearly grouped with appropriate plot) - Simple is better – avoid unnecessary textual or graphical elements that
distracts or hinders the audience’s interpretation of the data. See this blog post
about simplicity in data visualizations.
ggplot 2
package to visualize data in R, operates by layering composable parts piece-by-piece to build a plot.
3 required layers/components of ggplot2 plot
- data
- Mapping
- layers
data (ggplot)
starting point -
The data we will use to
construct the plot.
Mapping (ggplot)
the instructions on
how parts of the data will be
used to create our plot.
Layers (ggplot)
the geometry to
determine how data are displayed.
In other words, the type of plot to
be generated.
4 optional layers for ggplot
- scales
- facets
3.coordinates - theme
Scales
controls how data values are mapped onto things you see in a
plot (e.g., axis scales decide how numbers spread along x- and y-axes; define
which colours or sizes represent different data values such as categories or
numeric values)
Facets
used to split up data into smaller panels (multiple plots) based on one or more variables.
Coordinates
sets the “frame” of your plot (e.g. change
shape of plot, aspect ratio etc.)
Theme
change the “look and feel” of your plot (e.g.
background colour, location of legends)