Assignment Due: 11:59pm Friday July 11 on Blackboard if you are registered (emailed to me otherwise)

Your task

Using one dataset from below of your choice, present three ggplot2 plots that attempt to answer questions about the data that you think are interesting.

Your submission will consist of two files:

The focus of this assignment is exploration and experimentation. Concentrate on answering each question in a variety of ways and exploring functionality of ggplot2, rather than making “perfect” plots. You will be graded for completeness, exploration and creativity not the effectiveness of your graphics (see the rubric below).

Datasets

install.packages("Lahman")
library(Lahman)
?Lahman
?Batting
?BattingStats

This database contains pitching, hitting, and fielding statistics for Major League Baseball from 1871 through 2012. It includes data from the two current leagues (American and National), the four other “major” leagues (American Association, Union Association, Players League, and Federal League), and the National Association of 1871-1875.

library(ggplot2)
data(movies)
?movies
install.packages("devtools") # if you don't already have it
devtools::install_github("hadley/babynames")  
library(babynames)
?babynames
library(ggplot2)
data(msleep)
?msleep
install.packages("devtools") # if you don't already have it
devtools::install_github("hadley/fueleconomy") 
library(fueleconomy)
?vehicles

Some hints and tips

Feeling overwhelmed?

If you are feeling a little overwhelmed, get in touch. I am happy to suggest a smaller dataset (or a subset of a dataset), and some questions to get you started. This may come at the cost of some points.

Grading Rubric

Completeness:

Points Description

5

Includes three plots of one of the assigned datasets and each plot is accompanied by a caption that:

  • describes the question the plot attempts to answer, and
  • a summary of what is learnt from the plot.

4

Includes three plots but some captions are incomplete.

3

Includes three plots but no captions.

2

Only two plots.

1

Only one plot.

Exploration:

Points Description

5

Explores alternative plots for each question, explores geoms beyond those covered in class, and explores alternative statistics or positioning.

3

Explores alternative plots but exploration is limited to geoms covered in class and default statistics and positioning.

1

No evidence of exploration beyond the three plots presented.

Creativity:

Points Description

5

Questions are unique and plots answer questions in unexpected or innovative ways.

3

Questions or plots lack imaginative thought.

Plagiarism is taken seriously. If your submission just replicates someone else’s example you will receive zero points.