p1 <- flight_names %>%filter(year ==2023) %>%ggplot(aes(air_time, distance, color = name)) +geom_point() +labs(title ="Flight Distance Compared to Air Time",x ="Air Time",y ="Distance",color ="Carrier name",caption ="data source nycflights23" ) +theme(legend.text =element_text(size =7))p1
Warning: Removed 12534 rows containing missing values or values outside the scale range
(`geom_point()`).
Write a brief paragraph that describes the visualization you have created and at least one aspect of the plot that you would like to highlight. The paragraph should be around 150-250 words as a good estimate.
The visualization I created is meant to show the relationship between flight distance and air time. I would like to highlight how there’s a clear positive correlation between air time and distance of a flight. However, there are some distinct outliers between some of the points. For example, most of distance around 2500 had air times around the 400 area, but one of points had an air time of 600. That could have been influenced by several different factors that couldn’t be included in the graph. For example, if there were any delays. Despite the graph showing a positive correlation between air time and distance, it is evident that there are other factors involved determining a flight’s air time since the correlation isn’t exactly perfect. Additionally, I would like to highlight that not many flights are at the top of the graph, while more flights are combined near the bottom. This could be one of the results of airlines being domestic vs. international. Since this graph is based off nyc, it’s expected that most flights would be closer, so domestic, compared to international with longer air times and distances.