Home > R > Presenting Immer’s barley data

Presenting Immer’s barley data

Last time I talked about adapting graphs for presentations.  This time I’m putting some of the concepts I discussed there into action, with a presentation of Immer’s barley dataset.  This is a classic dataset, originally published in 1934; in 1993 Bill Cleveland mentioned it in his book Visualising Data on account of how it may contain an error.  Here’s the paper/screen version.

Immer's barley dataset, optimised for paper

Here’s the presentation.

For the record, the presentation was created with Impress and the audio recorded with Audacity. Using these tools, it’s pretty straightforward to make and share an audio presentation.


I’ve corrected the map slide. Some people also asked about the code to draw the plots. First up, I recoded the factors so that site and variety appear in order of increasing yield.

barley$variety <- with(barley, reorder(variety, yield)) 
barley$site <- with(barley, reorder(site, yield))

The plot for the graph is straightforward.

ggplot(barley, aes(yield, variety, colour = year)) +
  geom_point() +
  facet_grid(site ~ .)

The presentation version uses facet_wrap(~ site) rather than facet_grid, and the text size is increased with theme_set(theme_grey(24)).

Tags: , ,
  1. Kevin Wright
    1st November, 2010 at 19:13 pm

    Showing a map is a nice idea, but it has some problems.
    1. University Farm in St Paul is not shown.
    2. Grand Rapids is in MN, not MI.
    3. Waseca is misspelled.
    4. Morris is in MN, not IL.

    • 2nd November, 2010 at 18:12 pm

      Cheers for the feedback; the place names in the dataset didn’t give states so there was some guessing involved as to which Morris/Grand Rapids it was. The typo was just sloppiness on my part. I’ll update the slide when I get chance.

  1. No trackbacks yet.

Leave a Reply to richierocks Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: