Data Visualization and Exploration

Welcome

What is Data Visualization?

Stage of Data Visualization

  • Are we making a visualization as part of data-checking?
  • Are we intending to share it, publish it, or use it for decision-making?

Audience for Data Visualization

  • What does your audience expect?
  • Who is your audience?
  • (How) will creativity pay off?

Context of Data Visualization

  • What is the depth of the message to be conveyed?
  • What is the payoff of complexity?
  • What is the risk of complexity?

Always in Data Visualization

  • How can these be baked in to your routine?
  • How can this facilitate reproducibility?

The Rules of Data Visualization

The only rule of data visualization is that there are sometimes rules.

The stage, audience, and context, expectations of a data visualization could differ.

Consider,

  • an exploratory, diagnostic graph you make for yourself
  • a draft figure for a peer or collaborator
  • a presentable or publishable figure for
    • an academic setting
    • journalism
    • making policy decisions

Data visualization and infographics

A data visualization (i.e., dataviz) is a specific representation of some relationship. Any narrative is external to the visualization and ornamentation is often used sparingly.

An infographic (i.e., infoviz, information graphic) could contain a collection of data visualizations along with a narrative and superfluous ornamentation.

Data visualization and infographics

Data visualizations are (or should be)

  • standalone
  • objective
  • clear and accessible

Infographics are (typically)

  • narrative
  • subjective

Tools

There are many, almost too many, tools available to us, including many that are open-source,

For each, there are packages and plugins for special tasks or alternative implementations of a given task.

Developed as hobby, research, or proprietary projects, these could change daily wtih updates and new features.

  • Check for updates regularly (and accept them).
  • Cite your sources (and packages).

Resources

There are a variety of resources available in a variety of formats.

  • Some teach tools.
  • Some teach principles.
  • Some teach both.

We will aim for both.

Activity

Human perception

We perceive information differently based on how it is presented.

A brief pause.

“preattentive pop-out”

1.) Find two partners. Take out one cell phone and set it to Stopwatch mode.

2.) Take a packet of cards, letter side up.

3.) When ready flip a card, immediately start the timer, and press stop as soon as you find the blue dot.

4.) Open the spreadsheet to the Colors tab.

5.) Generate a personal code using your initials and birth day (of month). Enter data as follows.

User Card Letter Time
sl22 A 0.63

5.) Pause until everyone has contributed.

Visualization

We just played a “game” that required you to perform a visual task.

Data visualization implies an expectation of visual ability.

A *Where's Waldo?* gathering - people dressed in red and white stripes.
Figure 6: A “Where’s Waldo?” gathering.

Be aware of the abilities of yourself, others, and how they may or may not differ.

Neither mathematics nor statistics are known for their accessibility to blind or low-vision users.

A pause for software

Downloading R and RStudio

In your favorite browser and search engine, search for the letter “R” (without quotes).

  • download the R installer for your computer
  • follow the installation instructions
  • if you already have R, make sure it is up-to-date

Returning to your browser, search for “RStudio”

  • download the RStudio installer for your computer
  • follow the installation instructions
  • if you already have RStudio, make sure it is up-to-date

What happens next …

What happens next depends on whether you have used these or other related programs in the past.

  • If we have time at the end of class, we may break into groups and experiment.
  • Or we may do this in small groups outside of class (possibly via Zoom).
  • Or we may save this until the start of class next week.

A brief history

“Classics” in early data visualization

Now we look at a few “classics” (and their publication dates).

  • William Playfair on economics (from 1786)
  • Snow on cholera (from 1854)
  • Nightingale on battlefield Mortality (from 1858)
  • Minard on the invasion of Russia (from 1869)
  • DuBois on the Black American experience (from 1900)
  • Banana export chart (from 2005)

William Playfair’s “balance of trade”

One of the first modern data visualizations.

What do you notice?

John Snow’s “cholera map”

What do you notice?

Florence Nightingale’s “causes of mortality”

What do you notice?

“causes of mortality” (transcribed)

Note

The Areas of the blue, red, & black wedges are each measured from the centre as the common vertex. The blue wedges measured from the centre of the circle represent area for area the deaths from Preventable or Mitigable Lymotic diseases; the red wedges measured from the centre the deaths from wounds; & the black wedges measured from the centre the deaths from all other causes. The black line across the red triangle in Nov. 1854 marks the boundary of the deaths from all other causes during the month. In October 1854 & April 1855; the black area coincides with the red; in January & February 1855, the blue coincides with the black The entire areas may be compared by following the blue, the red & the black lines enclosing them.

Minard’s “Napoleon’s invasion”

Widely recognized as an all-time best data visualization …

… but, one any of us are not ever likely to recreate ourselves.

What do you notice?

Minard’s original text (translated)

Note

Figurative Map of the successive losses in men of the French Army in the Russian campaign 1812 ~ 1813

Drawn by M. Minard, Inspector General of Bridges and Roads (retired) Paris, November 20, 1869.

The numbers of men present are represented by the widths of the colored zones at a rate of one millimeter for every ten thousand men; they are further written across the zones. The red designates the men who enter Russia, the black those who leave it. - The information which has served to draw up the map has been extracted from the works of M.M. Thiers, de Ségur, de Fezensac, de Chambray and the unpublished diary of Jacob, the pharmacist of the Army since October 28th.

In order to better judge with the eye the diminution of the army, I have assumed that the troops of Prince Jérôme and of Marshal Davout, who had been detached at Minsk and Mogilev and have rejoined near Orsha and Vitebsk, had always marched with the army.

In short, C’est la Bérézina.

W.E.B. DuBois’ “Freemen and slaves”

What do you notice?

Note

Chart prepared by Atlanta University students for the Negro Exhibit of the American Section at the Paris Exposition Universelle in 1900 to show the economic and social progress of African Americans since emancipation.

W.E.B. DuBois’ “Conjugal condition”

What do you notice?

Note

Chart prepared by Atlanta University students for the Negro Exhibit of the American Section at the Paris Exposition Universelle in 1900 to show the economic and social progress of African Americans since emancipation.

A glimpse at banana trade

How does this compare to the examples we’ve just reviewed?

What do you notice?

What kinds of graphs have we just encountered?

  • Curve-difference plot (Playfair on economics (from 1786))
  • Dot map (Snow on cholera (from 1854))
  • Rose/Nightingale (Nightingale on battlefield Mortality (from 1858))
  • Sankey diagram (Minard on the invasion of Russia (from 1869))
  • Line/area and pyramid plot (DuBois on the Black American experience (from 1900))
  • 3D bar chart (Banana export chart (from 2005))

Modern case studies

A bar chart

A line graph

Vertical axis markings in red were originally shown as being equally spaced across the axis.

A grouped bar chart

Groups have been ordered consistently and time is showed chronologically.

A “simple” bar chart

  • How much larger are farm jobs in 2014 compared to 2010?
  • How much larger to farm jobs appear in 2014 compared to 2010?

A shaded line chart

  • What is your first reaction?
  • What do you wonder?
  • What could you do to improve the presentation?

Paired line graphs

A connected line graph showing lifetime lung cancer risk for Australian males and females (from NSW Department of Health, July 2006).

Paired line graphs

Prevalence of human immunodeficiency virus (HIV) and hepatitis C virus (HCV) infection by injecting history, clients of needle and syringe programs, NSW 1995 to 1998 (from NSW Department of Health, July 2006).

Paired line graphs

Prevalence of human immunodeficiency virus (HIV) and hepatitis C virus (HCV) infection by injecting history, clients of needle and syringe programs, NSW 1995 to 1998 (from NSW Department of Health, July 2006).

Going forward, what are the “rules”?

Don’t lie.

  • Proportional ink.
  • Honest axes.

Make it accessible.

Beyond this there are strong conventions - often related to our underlying ability to perceive visual information.

Colors

We will experiment with perception of color and record some pseudoanonymous data.

  1. Visit https://colorcontroversy.com/.
  2. Click the color you feel best represents the sample

Color data

Next week we will use the color data to perform some visualization tasks.

Other considerations

In addition to color, there are a variety of other perceptual issues that affect the effectiveness of graphs.

We will now

  • spend the semester making graphs, making graphs better, and making graphs more useful and honest.
  • and also look at situations where a table beats a graph of any kind as the means of visualization.