Prof. Eric A. Suess
So how should you complete your homework for this class?
Upload one file to Blackboard.
Homework 9:
Read: Chapter 13
Exercises:
Do 13.2.1 Exercises 1, 3
Do 13.3.1 Exercise 1
Do 13.4.6 Exercises 1, 2, 3
Answer: Need flights and airports. From flights get origin and dest. From airports get lat and long.
library(tidyverse)
## ── Attaching packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 1.2.1 ──
## ✔ ggplot2 3.1.0 ✔ purrr 0.2.5
## ✔ tibble 1.4.2 ✔ dplyr 0.7.7
## ✔ tidyr 0.8.2 ✔ stringr 1.3.1
## ✔ readr 1.1.1 ✔ forcats 0.3.0
## ── Conflicts ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
library(nycflights13)
flights
airports
flights <- flights %>% left_join(airports, c("origin" = "faa"))
flights <- flights %>% left_join(airports, c("dest" = "faa"))
flights
Answer: If all airports were included then the weather at the destination would be available also. Note that the year, month, day, hour would be used for the destination location’s weather.
weather
flights