library(nycflights13) library(tidyverse)
View(flights) View(airlines) View(weather) View(planes) View(airports)
lga_to_xna_flights <- flights %>% filter(origin == “LGA” & dest == “XNA”) %>% left_join(planes, by = “tailnum”)
lga_to_xna_flights
flights_with_airline <- flights %>% left_join(airlines, by = “carrier”)
flights_with_airline
airports_with_no_flights <- airports %>% anti_join(flights, by = c(“faa” = “dest”)) %>% select(faa, name) %>% distinct() airports_with_no_flights
airports_with_high_wind <- weather %>% filter(wind_speed > 30) %>% distinct(origin) %>% left_join(airports, by = c(“origin” = “faa”)) %>% select(name) %>% distinct() airports_with_high_wind