Week 7: In-Class Assignment



PART 1: DataViz to find errors

  1. Dataset for part 1: las_data_viz.csv

  2. Code: the code used in class is at the bottom of this page. You can also download it here. Either download a zip file containing the .r file (“download zip” button in the top right corner), or click the “raw” button to open the code in a web browser; you can then “copy-and-paste” this into an R script.

PART 2: How to make really ugly plots

  1. Here are three datasets to download for this part of the session. Save to your RStudio Project.
  • cereal.csv: data on the nutritional content of different breakfast cereals.

  • bites.csv: Data on dogs bites by breed.

  • bigfoot.csv: Number of Bigfoot sightings per year in North America

  1. We’re going to make a bar plot, then a scatter plot. First you read in the data using read_csv():

    • bites <- read_csv("./-------")
    • bigfoot <- read_csv("./-------")
  2. Now that we’ve learned about making basic figures, your job is to make a figure that is as ugly as possible. If you need some inspiration, check out these examples!

  3. Submit them via canvas, and we will vote on the best (=worst) one next week!

Here are some resources that will really help today:

And if you really want to go wild:

BTW, I’ll be posting these to the RESOURCES page for the session later, along with some other things.

  1. “Ch7 in Exploratory Data Analysis” in Wickham and Grolemund’s “R for Data Science”:

  2. Rougier NP, Droettboom M, Bourne PE (2014) Ten Simple Rules for Better Figures. PLoS Comput Biol 10(9): e1003833. read online