Load the Libraries

library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.4.0      ✔ purrr   1.0.1 
## ✔ tibble  3.1.8      ✔ dplyr   1.0.10
## ✔ tidyr   1.2.1      ✔ stringr 1.5.0 
## ✔ readr   2.1.3      ✔ forcats 0.5.2 
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(nycflights13)
library(RColorBrewer)
flights <- flights
flights2 <- flights %>%
  filter(month == 1)
Jan <- filter(flights, month == 1)
flights_M <- flights %>%
  mutate(month)
flights %>%
  filter(month == 6 | month == 7 | month == 8) %>%
  ggplot(aes(x = arr_delay, fill = month)) +
  ggtitle("Monthly Arrival Delay Times for June") +
  xlab("Monthly Delay") +
  ylab("Frequency") +
  geom_bar()+
  scale_alpha_continuous()
## Warning: Removed 2871 rows containing non-finite values (`stat_count()`).
## 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?

flights %>%
  filter(month == 7) %>%
  ggplot(aes(x = arr_delay, fill = month)) +
  ggtitle("Monthly Arrival Delay Times for July") +
  xlab("Monthly Delay") +
  ylab("Frequency") +
  geom_bar()+
  scale_alpha_continuous()
## Warning: Removed 1132 rows containing non-finite values (`stat_count()`).

flights %>%
  filter(month == 8) %>%
  ggplot(aes(x = arr_delay, fill = month)) +
  ggtitle("Monthly Arrival Delay Times for August") +
  xlab("Monthly Delay") +
  ylab("Frequency") +
  geom_bar()+
  scale_alpha_continuous()
## Warning: Removed 571 rows containing non-finite values (`stat_count()`).

flights <- flights
flights2 <- flights %>%
  filter(month == 1)
Jan <- filter(flights, month == 1)
flights_M <- flights %>%
  mutate(month)
flights %>%
  filter(month == 6 | month == 7 | month == 8) %>%
ggplot(aes(x = arr_delay, group=month, color = as.character(month))) +
ggtitle("Monthly Arrival Delay Times for August") +
  xlab("Monthly Delay") +
  ylab("Frequency") +
  geom_bar()+
  scale_alpha_continuous()
## Warning: Removed 2871 rows containing non-finite values (`stat_count()`).

In the plots above for June, July and August show the Arrival Dleay times for the summer. It focuses in on around 0-100. During August it is displaying the highest compared to the lowest in June. I wanted to display this data for departure delay with the winter months to compare and contrast. This assignment was very strenous, but fun to do I experiementaed with so many different lines of code and read several erros. I tried to put all my plots in one, but it was not reflecting any visuals once I added them to one filter function