Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see https://quarto.org.
Running Code
When you click the Render button a document will be generated that includes both content and the output of embedded code. You can embed code like this:
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
# A tibble: 14 × 2
carrier total_count
<chr> <int>
1 9E 17894
2 AA 17117
3 AS 3727
4 B6 36434
5 DL 28494
6 F9 825
7 G4 208
8 HA 274
9 MQ 199
10 NK 7369
11 OO 2941
12 UA 40767
13 WN 7840
14 YX 25765
library(treemap)treemap( late_totals,index =c("carrier"),vSize ="total_count",type ="index",title ="No. of flights that were late for each airlines")
The visualization that I created shows exactly how many observations and variables are within the flight’s dataset. It then shows just the arrival and departure delay columns in a way where only the late numbers are shown, and the number of observations and variables for those columns. After that, each dataset of delayed flights is grouped with their assigned airline carrier. In addition to that, it even shows the total amount for each of the carriers that are listed in the carrier column. Lastly, there is a treemap visualization that shows the number of late flights for each of the airlines. One aspect of this plot that I would like to highlight is that it accurately shows how many observations and variables there are in this dataset. Another aspect I would like to highlight is that the late totals show the exact amount for each of the carriers that are listed.