# A tibble: 10 × 4
# Groups: carrier, origin [1]
dep_time dep_delay carrier origin
<int> <dbl> <chr> <chr>
1 2201 31 UA EWR
2 2202 3 UA EWR
3 2205 6 UA EWR
4 2206 10 UA EWR
5 2207 38 UA EWR
6 2207 8 UA EWR
7 2209 70 UA EWR
8 2210 40 UA EWR
9 2211 18 UA EWR
10 2212 37 UA EWR
library(viridis)
Warning: package 'viridis' was built under R version 4.3.3
Loading required package: viridisLite
ggplot(data = flights23, aes(x = dep_time, fill = dep_delay)) +geom_bar(alpha = .8, position ="dodge")+scale_fill_brewer()+labs(x ="Departure Time", y ="Departure Delay", title ="Departure Delays for United Airlines at Newark Airport - Late Night",caption ="From FAA Airport Registry")
Warning: The following aesthetics were dropped during statistical transformation: fill
ℹ This can happen when ggplot fails to infer the correct grouping structure in
the data.
ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
variable into a factor?
This barplot shows how late flights were late at night departing Newark airport (New Jersey, very near New York City) with United Airlines. The delay is shown on the Y axis per departure time on the x axis. Each departure time has it’s own delay on a scale, not in minutes or parts of a hour. Interestingly, Most of the delays are around One on this scale, with only the one time frame being around 2 units of a delay.