NYC Flights Assignment

Author

M Sullivan

library(treemap)
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   3.5.1     ✔ tibble    3.2.1
✔ lubridate 1.9.3     ✔ tidyr     1.3.1
✔ purrr     1.0.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
library(nycflights23)
data("flights")
treemap(flights, index="carrier", vSize="dep_delay",
        vColor="dep_delay", type="manual",
        palette="RdYlBu",
        title = "Flight Delays by Carrier")

I created a treemap that presents flight delay and carrier data from the New York City Flights data set from 2023. Each box within the treegraph represents a carrier, or flight airline. The size of each box is proportional to how many minutes delayed flights were for each carrier. The larger the box size, the longer the delay for flights within that carrier. Jetblue, or B6, reported the longest delayed flights, while Hawaiian Airlines, or HA, reported the shortest delayed flights. I found it interesting that Jetblue flights were significantly more delayed with over 1,6000,000 total minutes delayed since most carriers reported somewhere between 0 and 800,000 mintues delayed.