Using the NYC Flights data, create one visualization using any graph type covered so far in this course: bar graph, scatterplot, boxplot, histogram, treemap, heatmap, streamgraph, or alluvial diagram.
Requirements:
- Include at least one dplyr command, such as filter, arrange, summarize, group_by, select, or mutate.
- Label the x- and y-axes and include a caption naming the data source.
- Include a title.
- Use at least two different colors.
- Include a legend explaining what the colors represent.
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.2.1 ✔ readr 2.2.0
✔ forcats 1.0.1 ✔ stringr 1.6.0
✔ ggplot2 4.0.3 ✔ tibble 3.3.1
✔ lubridate 1.9.5 ✔ tidyr 1.3.2
✔ purrr 1.2.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors