Create the code makes a table for each of the below questions.
1. join + filter - Which airplanes fly LGA to XNA (1 POINT)
q1 <- flights %>%
filter(origin == "LGA", dest == "XNA") %>%
inner_join(planes, by = "tailnum")
2. join - Add the airline name to the flights table (1 POINT)
q2 <- flights %>%
left_join(airlines, by = "carrier")
3. join + select + distinct() - Which airports have no commercial
flights (1 POINT)
q3 <- airports %>%
left_join(flights, by = c("faa" = "origin")) %>%
filter(is.na(flight)) %>%
select(faa, name) %>%
distinct()
Create a table with the names of the airports with the most
winds (wind_speed > 30). The table must contain only the
airport
name (airports$name) and no duplicate rows
q4 <- weather %>%
filter(wind_speed > 30) %>%
inner_join(airports, by = c("origin" = "faa")) %>%
select(name) %>%
distinct()