Data wrangling with the Tidyverse I

Materials for class on Thursday, September 27, 2018

Contents

Slides

Download the slides from today’s lecture:

First slide

Answer your own questions

(Well, my questions for now—but still.)

Setting up your project

(Practice makes perfect!)

Do the following:

  1. Create a new RStudio project named “birds” and put it somewhere on your computer.

  2. Navigate to that new project folder on your computer with Windows Explorer or macOS Finder (i.e. however you look at files on your computer). Create a new folder in your project called “data”.

  3. Download this CSV file: Birdstrikes_At_Salt_Lake_City_Intl_Airport_2000-2014.csvYou’ll probably need to right click on the link and select “Save link as…” or something similar—often browsers will load the CSV file like a web page, which isn’t helpful.

  4. Using Windows Explorer or macOS Finder, move the newly downloaded CSV file into the “data” folder you created.

  5. Download this R Markdown file: bird-questions.RmdAgain, you’ll probably need to right click on the link and select “Save link as…”

    and place it in your newly-created project (but not in your data folder—put it in the main directory).

In the end, your project folder should be structured like this:

birds\
  bird-questions.Rmd
  birds.Rproj
  data\
    Birdstrikes_At_Salt_Lake_City_Intl_Airport_2000-2014.csv

Questions

I provided you with two chunks in the R Markdown file to load and clean the data. Choose a few of these questions and answer them with a table or a plot (or both). You should be able to answer most with group_by(BLAH) %>% summarize(SOMETHING = BLAH) and with ggplot()

Clearest and muddiest things

Go to this form and answer these three questions:

  1. What was the muddiest thing from class today? What are you still wondering about?
  2. What was the clearest thing from class today?
  3. What was the most exciting thing you learned?

I’ll compile the questions and send out answers after class.