# A tibble: 3,510 × 5
month day dep_delay carrier delay_category
<int> <int> <dbl> <chr> <chr>
1 1 1 3 AA Delayed
2 1 1 -6 AA Early
3 1 1 -7 AA Early
4 1 1 -6 AA Early
5 1 1 0 AA On time
6 1 1 -10 AA Early
7 1 1 -3 AA Early
8 1 1 -4 AA Early
9 1 1 -4 AA Early
10 1 1 -9 AA Early
# ℹ 3,500 more rows
summary(AAdelay)
month day dep_delay carrier
Min. :1 Min. : 1.00 Min. : -19.00 Length:3510
1st Qu.:1 1st Qu.: 9.00 1st Qu.: -7.00 Class :character
Median :1 Median :16.00 Median : -3.00 Mode :character
Mean :1 Mean :16.19 Mean : 14.96
3rd Qu.:1 3rd Qu.:24.00 3rd Qu.: 8.00
Max. :1 Max. :31.00 Max. :1201.00
delay_category
Length:3510
Class :character
Mode :character
Plot1 <- AAdelay |>ggplot(aes(x = day, y = dep_delay, color= delay_category)) +geom_point(alpha =0.5) +scale_color_manual(values =c("Early"="blue", "On time"="green", "Delayed"="red"))+labs(title ="NYC American Airline Departure Delay in January 2023", x ="Day", y ="Departure Delay (Minutes)",caption ="Source: FAA Aircraft registry",color ="Delay Category")+ylim( -100,1250)Plot1
My visualization is a scatter plot showing how long American Airlines flights in NYC were delayed in January 2023. The blue dots represent flights that departed early, the green dots show on-time flights, and the red dots signify delayed flights. A key observation is that the majority of American Airlines flights in January experienced delays. In my plot, the x-axis represents the days of the month, while the y-axis shows the length of the delay in minutes. This visualization helps illustrate how delays varied throughout the month and how frequently they occurred. One challenge I faced was making the blue dots stand out more to highlight early departures. I wanted them to be more noticeable, but increasing their size or brightness caused the red dots to overlap and clutter the plot. Finding a balance between clarity and appearance was difficult, but overall, I feel as if my scatter plot effectively represents American Airlines’ departure delays in January.