ggplot(avg_delay_by_carrier, aes(x = avg_dep_delay, y = avg_arr_delay, color = carrier_name)) +geom_point(size =5, shape =16, alpha =0.7) +# Larger, semi-transparent pointslabs(title ="Average Departure vs Arrival Delays by Air Carrier",x ="Average Departure Delay (minutes)",y ="Average Arrival Delay (minutes)",caption ="Source: FAA Aircraft Registry",color ="Carrier Name"# Legend title ) +scale_color_manual(values = carrier_colors) +theme_minimal() +theme(legend.title =element_text(size =12), legend.text =element_text(size =10), axis.title =element_text(size =12), plot.title =element_text(size =16, face ="bold"), plot.caption =element_text(size =10, color ="gray") )
The visualization presents a scatter plot illustrating the relationship between average departure delays and average arrival delays for different air carriers. Each point represents a specific airline, plotted based on its average delay metrics. The x-axis displays the average departure delay (in minutes), while the y-axis represents the average arrival delay (in minutes). A key takeaway from the plot is that airlines with higher departure delays tend to have higher arrival delays, suggesting a strong correlation between late takeoffs and late landings.
One aspect of the plot worth highlighting is the use of the RColorBrewer library, which ensures each carrier is visually distinct. This color-coding enhances readability and simplifies comparisons between different airlines’ punctuality. Additionally, outlier airlines with significantly higher delays can be quickly identified, making it easier to spot carriers that struggle with on-time performance.
Overall, this visualization offers valuable insights into airline punctuality and operational efficiency. It can be useful for passengers, aviation analysts, and policymakers looking to evaluate airline reliability. Further analysis could examine how external factors such as weather, airport congestion, or time of day impact these delays. Identifying seasonal trends or patterns in delay frequency could also help airlines optimize scheduling and minimize disruptions, improving overall efficiency in air travel.