1 Matching Annotations
- Apr 2019
-
jrnold.github.io jrnold.github.io
-
# … with 1 more row
You might want to check this last row of the tibble that's not displayed. Saturday actually has the shortest delays of any day of the week. You'll see it right away if you plot it:
flights_dt %>% mutate(wday = wday(dep_time, label = TRUE)) %>% group_by(wday) %>% summarize(ave_dep_delay = mean(dep_delay, na.rm = TRUE)) %>% ggplot(aes(x = wday, y = ave_dep_delay)) + geom_bar(stat = "identity")
flights_dt %>% mutate(wday = wday(dep_time, label = TRUE)) %>% group_by(wday) %>% summarize(ave_arr_delay = mean(arr_delay, na.rm = TRUE)) %>% ggplot(aes(x = wday, y = ave_arr_delay)) + geom_bar(stat = "identity")
-