flights <- flights |>filter(carrier==c("AA","DL"),origin=="JFK") #represent only AA and DL with JFK as constantggplot(flights, aes(x=hour,y=distance,fill=carrier)) +geom_col() +labs(title ="American vs Delta Airlines", caption ="Source: Tidyverse Flights Dataset")
This box plot visualizes the Tidyverse Flights dataset. Specifically showing whether American Airlines (AA) or Delta Airlines (DL) has faster flights. The x-axis on this box plot represents the time of the flight in hours and the y-axis represents the distance of the flight. Specific to this visualization, American Airlines and Delta Airline are respectively represented by the colors red and blue as depicted in the legend. A highlight of this visualization is the use of the dplyr command, filter(), to hold the JFK airport as a constant for the origin of the flight and to only select data concerning American Airlines and Delta Airlines. JFK airport was chosen simply to narrow the data. From observing this dataset, one can conclude that American Airlines is capable of covering a greater distance than Delta Airlines in the same time frame. However, the downsides to this visualization are outliers due to influencing factors not depicted by a barplot.