Exploratory data analysis

Exercises for Day 3

Author

Tyler McInnes

Published

November 28, 2025

1 Exploring flights with ggplot

1.1 Create a new .qmd file and label it practical 3.

1.2 Plot departure delay against arrival delay with geom_point(). Use labs()and theme_minimal() to add a title and x and y axis labels.

What does this plot show us about the causes of arrival delays?

1.3 Use geom_boxplot() to plot the average distance flown by each carrier.

1.4 Use geom_boxplot() to create a plot of air time by airport of origin.

1.5 Plot the distribution of air_time across origin. Use geom_histogram() with the binwidthargument set to 10 and the fill argument set to “steelblue”. Use facet_wrap()to separate the flights by origin. Remember to include a title, x and y axis labels, and you may choose to add a theme (e.g., theme_minimal(), theme_bw()).