airport_heatmap <-heatmap( airport_matrix,Rowv =NA,Colv =NA,cexCol = .6,color =viridis(3),scale ="column",xlab ="Flight Delay Metrics",ylab ="NYC Airports",main ="Heatmap of Average Flight Delays from NYC Airports")
Warning in plot.window(...): "color" is not a graphical parameter
Warning in plot.xy(xy, type, ...): "color" is not a graphical parameter
Warning in title(...): "color" is not a graphical parameter
mtext("Data Source: nycflights23 dataset (NYC flights in 2013)", side =1, line =4, cex =0.8)
VISUAL DESCRIPTION
This visualization is a heatmap that shows patterns in flight delays from the three major New York City airports: JFK, LaGuardia (LGA), and Newark (EWR) using the nycflights23 dataset. The data was first cleaned by filtering out flights that contained missing values for arrival delay or departure delay.Using the dplyr functions group_by() and summarise(), the dataset was aggregated by airport of origin. The resulting summary table includes the total number of flights departing from each airport, as well as the average arrival delay and average departure delay. The heatmap converts these numerical values into colors using color palette, which provides a gradient from lighter to darker colors. In this visualization, the rows represent the NYC airports, while the columns represent different delay metrics such as average arrival delay and average departure delay. The color intensity reflects the relative size of each value after scaling. One aspect highlighted in the heatmap is the difference in delay patterns across airports.Some airports appear darker in the delay columns, indicating higher average delays. This makes it easy to compare airport performance visually and quickly identify which airports experience greater delays.