This is prepared with R Markdown with the air quality data set.
I loaded the appropriate libraries and previewed the first few rows of the dataset.
I started off with a few basic reads.
#How big is this thing
dim(airquality)
## [1] 153 6
#What are the variables
names(airquality)
## [1] "Ozone" "Solar.R" "Wind" "Temp" "Month" "Day"
#Is anything missing
anyNA(airquality)
## [1] TRUE
#How many things are missing
sum(is.na(airquality))
## [1] 44
I ran summaries on each column to see how many NAs are in each one. Looks like only Ozone and Solar have missing values.
summary(airquality$Ozone)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NAs
## 1.00 18.00 31.50 42.13 63.25 168.00 37
summary(airquality$Solar.R)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NAs
## 7.0 115.8 205.0 185.9 258.8 334.0 7
summary(airquality$Wind)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.700 7.400 9.700 9.958 11.500 20.700
summary(airquality$Temp)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 56.00 72.00 79.00 77.88 85.00 97.00
summary(airquality$Month)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 5.000 6.000 7.000 6.993 8.000 9.000
summary(airquality$Day)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.0 8.0 16.0 15.8 23.0 31.0
I looked at a few functions for the category Ozone.
# Summary again
summary(airquality$Ozone)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NAs
## 1.00 18.00 31.50 42.13 63.25 168.00 37
# Standard Deviation and Variance (na.rm = TRUE handles missing values)
sd(airquality$Ozone, na.rm = TRUE)
## [1] 32.98788
var(airquality$Ozone, na.rm = TRUE)
## [1] 1088.201
# Min and Max Range
range(airquality$Ozone, na.rm = TRUE)
## [1] 1 168
I chose to make a chart for Temp, looking at the distibution of tempoerature across the months.
# Citation: Code generated via Gemini (Google), 13 Sept. 2026, gemini.google.com.
# Prompt: "Write code to put a plot in my ioslide markdown file using the airquality dataset: a plot that shows the temperature over the months of May, June, July, August, and September"
ggplot(airquality, aes(x = factor(Month), y = Temp, fill = factor(Month))) +
geom_boxplot(show.legend = FALSE, alpha = 0.8) +
scale_x_discrete(labels = c("May", "June", "July", "August", "September")) +
scale_fill_brewer(palette = "YlOrRd") +
labs(
title = "Temperature Spread by Month",
x = "Month",
y = "Temperature (°F)"
) +
theme_minimal(base_size = 14)