Lab 2



Lab Assignments

Overview

The purpose of this lab is to get you to try different methods of visualizing the same data to explore what seems to work better.

Data

We’ll work with fivethirtyeight data. via the R package of the same name.

To get started, please run the following lines of code. The GitHub install in particular will take a minute or two.

install.packages("fivethirtyeight")
remotes::install_github("fivethirtyeightdata/fivethirtyeightdata")
library(fivethirtyeight)
library(fivethirtyeightdata)

One you’ve loaded the packages, you will have access to a variety of datasets. The datasets we will work with are google_trends, tv_states, and comic_characters.

Assignment

Start a new R Markdown document - you can choose to house this lab on GitHub or not. Either way is fine. If you choose to work together with a partner or in a small group a GitHub repo is required.

Both the google_trends and tv_states datasets come from a fivethirtyeight story about how the media covered hurricanes and Trump.

  1. Start with the google trends data.
  1. Replicate the “National cable news networks” plot from the story using the tv_states data. Don’t worry about all the labels. Try to match the colors but don’t worry about getting them exact.

  2. Use the comic_characters dataset to visualize the proportion of different genders using at least three different methods. With your final visualization, make any additional modifications you think would help reduce the cognitive load necessary to comprehend the figure.

Finishing up

When you have finished the above, upload your rendered (knit) HTML file to canvas.