Question: For all the following problems, you will use the flights, airlines, airports and planes data from nycflights 1 3 package. Load the package and read

For all the following problems, you will use the flights, airlines, airports and planes data from nycflights13 package. Load the package and read in the flights data as flights, airlines data as airlines, airports data as airports and planes data as planes. Check the structures of each data frame, especially the columns that will be used to join two tables.
Add location of the origin and destination from the airports to flights data. You need two consecutive left_join() to do so. Follow the following steps:
a. left join airports by matching origin with faa
b. left join airports again by matching dest with faa.
c. check the join table and notice that the lat.x and lon.x is the location of the origin and lat.y and lon.y is the location of the destination
d. for the joined table, keep the following columns and rename them as directed:
dest, origin, lat.x (rename it as origin_lat), lon.x (rename it as origin_lon), lat.y (rename it as dest_lat), lon.y (rename it as dest_lon), and arr_delay.
e. arrange the data by ascending order of arr_delay.
What is the latitude of the destination that has the lowest arr_delay.
(PLEASE PROVIDE ACTUAL NUMBER IN ANSWER)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!