October 2021

Overview

What are interactive graphics?

  • Visualizations
  • Combined with ways to click or hover and get more information
  • e.g., the internet

DataViz interactive goals

  • Tell a clear story
  • Allow viewers to see more than would be shown in two static dimensions
  • Or to obtain more detailed information
  • Or to explore things that go beyond the story you’re telling

Some interaction techniques

  • Scaling and panning: allow viewers to look at different parts of an image
  • Labelling: attach labels with detailed information
  • Subsetting
    • Brushing: highlight categories by selecting them
    • Linking: link selections across several plots
    • Animation: selections in sequence; ideally can be played automatically or controlled by user
  • Exploration: users can set parameters and try new things

Principles

No substitute for good design

  • Good design still aids comprehension and usability

  • People are busy!
    • You need your story to be clear and readable
  • Keep things simple
    • Details can be hidden
    • Structure and logic should be visible

Acceptance

  • Why don’t people do this more?

  • In what contexts can you reach an audience with interactive graphics?

  • How can interactive graphics help you with your research?

Exploring

  • Interactive graphics can be very useful for certain kinds of exploration

  • Principles of friendliness may no longer apply, since users will become very familiar with the tool

  • Principles of clarity probably still do
    • It’s possible to mislead yourself

Telling stories

  • You may want to lead your readers through an interactive visualization

  • Several versions of your plot

  • Or even several default views of the same plot

Remember Cleveland

  • What do people need to compare?

  • How can you help them do it?
    • Choose scales
    • Make information persistent or retrievable

Examples

Examples

Scaling and panning

  • Except for exploration, you don’t want graphs that need to be looked over piece by piece

  • But it can be a useful option

  • Many packages just provide this

Labeling

  • Someone using interactively does not need to see more than 3 or 4 significant figures

  • They also do not need to see everything in your data frame

  • You should not drop precision before making the plot, though

  • Solution: create dummy columns and limit what is shown to users on labels

Brushing

  • Pick out a particular data series

  • Needs good communication and usability

  • Particularly useful if combined with linking

Linking

  • Connect information across different pictures

Animation

  • Best when it’s under user control

  • A really good brushing interface can often be better

  • Can be really nice for talks, though

Tools and resources

Resources

Packages

  • plotly
    • Straightforward and popular (esp. via ggplotly)
  • gganimate
    • very “gg” (grammar of graphics)-ish; not so interactive
  • crosstalk
    • for letting different html widgets talk to each other (linking)
  • leaflet
    • maps (more later)