Communicating with Graphics

Question 1

Use the gapminder data set in the gapminder library to recreate a version of the Hans Rosling’s famous data visualization (a single plot instead of a movie). You can revisit the slides from Grammar of Graphics to reference it.

Some guidelines:

  1. Plot the data for just a single year. You can see at a glance which years are available by running count(gapminder, year).
  2. Put gdpPercap on the x-axis and lifeExp on the y-axis.
  3. To distinguish the continents, you can use either shape or color. Which ever one you do not use, set its value to something other than the default.
  4. Alter the labels so that they’re more descriptive.
  5. Change to a theme of your choosing.
  6. Add an annotation that draws attention to a particular feature of the data.

Turn to the notes for today for guidance on how to add each of these elements.

Question 2

Recreate one of the plots that you created for Lab 2.2, but incorporate at least 3 of the 6 elements of Communicating with Graphics to polish your plot into one that tells a particular story.