Abstract
This paper examines air-quality trends in Wake County, North
Carolina, from 2017 to 2025 using the U.S. Environmental Protection
Agency (EPA) Air Quality Annual Summary dataset. Annual measurements of
PM2.5, PM10, and ozone recorded at two monitoring sites, Millbrook
School and Triple Oak, were cleaned, deduplicated, and aggregated into a
dataset of 33 site-year-pollutant observations. Descriptive statistics,
time-series plots, boxplots, and geographic maps were used to summarize
the data, and multiple linear regression was implemented in R with the
tidyverse and tidymodels frameworks to quantify temporal trends and site
differences. The results show that PM2.5 and PM10 fluctuated across the
study period while ozone remained stable, and that Millbrook School
recorded PM2.5 concentrations approximately 1.10 micrograms per cubic
meter higher than Triple Oak after adjusting for year (p = 0.0125).
Observation completeness averaged above 90 percent in most years,
indicating the dataset is reliable for long-term analysis. A multiple
linear regression model with year, monitoring site, and pollutant as
predictors explained 98 percent of the variability in annual means
(R-squared = 0.98), and a train/test split evaluation produced a root
mean squared error of 0.88. The project demonstrates a fully
reproducible workflow for environmental monitoring analysis and
identifies directions for seasonal and health-focused follow-up
research.
Brief Summary
Research Question
This project addresses four research questions:
- How did PM2.5, PM10, and ozone concentrations change between 2017
and 2025 in Wake County?
- Are there statistically significant differences between the
Millbrook School and Triple Oak monitoring sites?
- Which pollutant exhibited the greatest variation over the study
period?
- How complete are the observations, and is the dataset reliable for
long-term analysis?
Data
The analysis uses the EPA Air Quality Annual Summary dataset, which
reports annual summary statistics for pollutants measured at monitoring
sites across the United States. This project focuses on PM2.5, PM10, and
ozone at two sites in Wake County, North Carolina, from 2017 through
2025.
Methods
Data were filtered to the target pollutants and years, deduplicated
by selecting a single representative measurement duration for each
pollutant, and collapsed across monitoring instruments within each
site-year combination. Descriptive statistics and four visualizations
were produced, and multiple linear regression models were fit and
evaluated using the tidymodels framework.
Main Findings
PM2.5 and PM10 varied over the study period, ozone remained stable,
Millbrook School recorded higher PM2.5 than Triple Oak, and observation
completeness was high in most years. The regression models quantify
these patterns and achieve strong predictive accuracy on held-out
data.
Introduction
Background
Air pollution is one of the most important environmental risk factors
for public health. Exposure to fine particulate matter (PM2.5) has been
linked to cardiovascular and respiratory hospital admissions (Dominici
et al., 2006), and the World Health Organization has identified PM2.5,
PM10, and ozone among the pollutants of greatest health concern (World
Health Organization, 2021). In the United States, the Clean Air Act
requires the Environmental Protection Agency (EPA) to set National
Ambient Air Quality Standards (NAAQS) for these criteria pollutants, and
a nationwide monitoring network maintained under the Air Quality System
(AQS) provides the data needed to evaluate whether those standards are
being met (U.S. Environmental Protection Agency, 2024).
North Carolina monitors air quality through a network of state and
federal sites. Wake County, the most populous county in the state and
home to Raleigh, contains multiple monitoring stations operated in
cooperation with the North Carolina Department of Environmental Quality
(2025). Understanding how pollutant levels change over time and vary
across locations within a county is essential for public-health
surveillance, land-use planning, and the evaluation of air-quality
policy.
Motivation
Annual summary data are well suited to long-term trend analysis
because they aggregate thousands of hourly or daily measurements into
comparable yearly statistics. However, the raw AQS files contain
considerable redundancy: the same underlying measurement can appear
under multiple monitoring durations, parameter occurrence codes, and
pollutant standards. A reproducible analysis therefore requires careful,
documented data preparation. This project was motivated by the
opportunity to demonstrate a transparent end-to-end workflow, from raw
data to statistical inference, using free public data and open-source
tools.
Research Objectives
The objectives of this study are (1) to describe and quantify trends
in PM2.5, PM10, and ozone from 2017 to 2025; (2) to test whether the two
monitoring sites differ after controlling for time; (3) to identify
which pollutant varies most; and (4) to evaluate data completeness as a
measure of reliability.
Data
Data Source
The data were obtained from the Air Quality Annual Summary dataset
published by the U.S. Environmental Protection Agency and distributed
through the catalog.data.gov open-data portal (U.S. Environmental
Protection Agency, n.d.). The file
annual_37_183_0021_2017.csv covers monitoring site
37-183-0021 in Wake County, North Carolina (state code 37, county code
183, site code 0021), beginning with the 2017 calendar year.
Collection Methods
Each row of the dataset corresponds to an annual summary record for
one pollutant, one monitoring duration, and one point of operation at a
site. The underlying data were collected by automated continuous
monitors and filter-based samplers operated according to EPA
quality-assurance protocols, then submitted to the AQS Data Mart. For
this project the raw rows are treated as annual summary statistics: each
record includes the arithmetic mean concentration, the number of valid
observations, the percentage of expected observations that were
collected, and extreme values such as the first maximum concentration
(U.S. Environmental Protection Agency, n.d.).
Variables
After filtering, the analysis uses the following variables:
local_site_name: the monitoring site (Millbrook School
or Triple Oak).
latitude and longitude: geographic
coordinates of each site (WGS84 datum).
parameter_name: the pollutant measured.
year: the calendar year of the annual summary
(2017–2025).
units_of_measure: the units in which concentrations are
reported.
arithmetic_mean: the annual arithmetic-mean
concentration (the response variable of the statistical models).
observation_count: the number of valid observations in
the year.
observation_percent: the percentage of expected
observations that were collected.
minimum_value and first_maximum_value: the
minimum and first maximum concentrations recorded.
Data Limitations
Several limitations are important. First, the two sites are not fully
comparable: Triple Oak monitors only PM2.5, whereas Millbrook School
monitors PM2.5, PM10, and ozone, so the site comparison is restricted to
PM2.5 and pollutant comparisons within Triple Oak are impossible.
Second, the dataset contains annual summaries rather than daily or
hourly measurements, which obscures seasonal patterns and short-term
pollution events. Third, only nine years of data are available for most
series, limiting statistical power for detecting slow trends. Fourth,
the raw file contains duplicate records arising from multiple monitoring
durations and pollutant standards; these were resolved through
documented data-preparation decisions described below. Finally, the
annual means include only the observations that were actually collected,
so years with low completeness (for example, PM2.5 in 2021–2022) may
under-represent true conditions.
Methods
Data Preparation
Data preparation was performed in R version 4.5.0 using the
tidyverse package family (Wickham et al., 2019). The raw
file was imported with read_delim() using the semicolon
delimiter. Records were then filtered to the three pollutants of
interest and to the years 2017 through 2025; the 2026 records were
excluded because 2026 was still in progress at the time of analysis and
its observation percentages were far below the completed years.
To resolve the redundancy described above, a single representative
measurement duration was selected for each pollutant: hourly averages
(“1 HOUR”) for ozone, and daily block averages (“24-HR BLK AVG”) for
PM2.5 and PM10. This choice ensures that all pollutants are compared on
a comparable averaging basis and that the annual mean reflects a full
day of sampling. Exact duplicate rows produced by multiple pollutant
standards were removed with distinct(), and the remaining
observations from different monitors (parameter occurrence codes) at the
same site and year were averaged to yield one observation per
site-year-pollutant.
## Rows: 1880 Columns: 52
## Pollutants monitored: 222
## Monitoring sites: Millbrook School, Triple Oak
## Year range: 2017 - 2026
## Rows in the cleaned dataset: 33
| Millbrook School |
Ozone |
8 |
| Millbrook School |
PM10 Total 0-10um STP |
8 |
| Millbrook School |
PM2.5 - Local Conditions |
8 |
| Triple Oak |
PM2.5 - Local Conditions |
9 |
Feature Engineering
Two derived variables were created to support modeling and
visualization. A short pollutant factor (PM2.5, PM10,
Ozone) was created from parameter_name so that model output
and figure facets are readable, and local_site_name was
converted to a factor with Millbrook School as the reference level, so
that regression coefficients are interpreted relative to Millbrook
School. The year variable was kept as a continuous
predictor so that each coefficient can be interpreted as the average
change in concentration per additional calendar year.
Statistical Methods
Descriptive statistics (mean, median, standard deviation, minimum,
maximum) were computed for each pollutant. Data completeness was
summarized by the average percentage of expected observations per year.
Because the response variable, the annual arithmetic-mean concentration,
is continuous, linear regression is the appropriate modeling framework
(Kuhn & Silge, 2022). Three regression analyses were performed:
- A per-pollutant trend model of concentration on year for Millbrook
School, which hosts all three pollutants.
- A site-comparison model of PM2.5 concentration on year and
monitoring site, which tests whether the two sites differ after
controlling for time.
- A full multiple linear regression of concentration on year, site,
and pollutant, which quantifies the effect of each predictor while
holding the others constant.
Modeling Techniques
Models were specified with the parsnip package from
tidymodels using a linear_reg() specification with the
lm engine. Parameter estimates, standard errors, test
statistics, and p-values were extracted with tidy(), and
the fitted model was summarized with
extract_fit_engine() |> summary() and
coef(), following the workflow introduced in the course
notes (Kuhn & Silge, 2022). To evaluate predictive performance, the
cleaned data were split into training (80%) and testing (20%) sets with
initial_split() using stratification by pollutant, the
model was refit on the training set, and predictions on the testing set
were evaluated with the mean squared error (MSE), mean absolute error
(MAE), and root mean squared error (RMSE). A fixed random seed was used
so that the split is reproducible.
| Ozone |
(Intercept) |
0.1632 |
0.7266 |
0.2246 |
0.8298 |
| Ozone |
year |
-0.0001 |
0.0004 |
-0.1640 |
0.8751 |
| PM10 |
(Intercept) |
-46.9812 |
357.6437 |
-0.1314 |
0.8998 |
| PM10 |
year |
0.0304 |
0.1769 |
0.1719 |
0.8692 |
| PM2.5 |
(Intercept) |
405.3891 |
269.3991 |
1.5048 |
0.1831 |
| PM2.5 |
year |
-0.1963 |
0.1333 |
-1.4728 |
0.1912 |
pm25_data <- air_clean |>
filter(pollutant == "PM2.5")
site_fit <- linear_reg() |>
set_engine("lm") |>
fit(arithmetic_mean ~ year + local_site_name, data = pm25_data)
site_fit_results <- site_fit |>
extract_fit_engine() |>
summary()
coef(site_fit_results)
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 264.3150620 157.45574296 1.678663 0.11538930
## year -0.1264823 0.07789043 -1.623849 0.12670181
## local_site_nameTriple Oak -1.1010461 0.38422435 -2.865633 0.01245963
tidy(site_fit)
## # A tibble: 3 × 5
## term estimate std.error statistic p.value
## <chr> <dbl> <dbl> <dbl> <dbl>
## 1 (Intercept) 264. 157. 1.68 0.115
## 2 year -0.126 0.0779 -1.62 0.127
## 3 local_site_nameTriple Oak -1.10 0.384 -2.87 0.0125
| (Intercept) |
134.993 |
117.165 |
1.152 |
0.259 |
| year |
-0.063 |
0.058 |
-1.078 |
0.290 |
| local_site_nameTriple Oak |
-1.069 |
0.385 |
-2.775 |
0.010 |
| pollutantPM10 |
5.851 |
0.395 |
14.803 |
0.000 |
| pollutantOzone |
-8.587 |
0.395 |
-21.727 |
0.000 |
## # A tibble: 1 × 5
## arithmetic_mean .pred mean_squared_error mean_absolute_error
## <dbl> <dbl> <dbl> <dbl>
## 1 0.0437 0.518 0.773 0.668
## # ℹ 1 more variable: root_mean_squared_error <dbl>
Results
Tables
## # A tibble: 3 × 8
## pollutant n_years mean_value sd_value median_value minimum maximum
## <fct> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 PM2.5 17 8.08 0.964 7.83 6.51 9.94
## 2 PM10 8 14.5 1.06 14.2 13.4 16.7
## 3 Ozone 8 0.0440 0.00216 0.0441 0.0402 0.047
## # ℹ 1 more variable: avg_observation_percent <dbl>
Table 1 summarizes the distribution of the three
pollutants. PM10 has the highest average concentration (14.5), followed
by PM2.5 (8.08), while ozone is reported on a different scale in parts
per million (0.044). PM10 also shows the greatest absolute variability,
whereas ozone is the most stable. Average observation completeness
exceeds 83 percent for every pollutant, with ozone the most complete at
roughly 96 percent.
Table 2 reports the two monitoring sites and their
coordinates. The sites are approximately 22 kilometers apart, with
Millbrook School located east of downtown Raleigh and Triple Oak located
near the western edge of Wake County.
Statistical Findings
The per-pollutant trend models for Millbrook School found no
statistically significant linear trend for any pollutant over 2017–2025:
PM2.5 declined by an estimated 0.196 micrograms per cubic meter per year
(p = 0.19), PM10 increased by an estimated 0.030 micrograms per cubic
meter per year (p = 0.87), and ozone changed by a negligible -0.000059
parts per million per year (p = 0.88). The small number of years (eight
observations per pollutant) limits the power of these tests.
The site-comparison model for PM2.5 explained about 42 percent of the
variability in annual means (R-squared = 0.417, adjusted R-squared =
0.334) and was statistically significant overall (p = 0.023). Triple Oak
was estimated to be 1.10 micrograms per cubic meter lower than Millbrook
School holding year constant (95% confidence interval approximately 0.28
to 1.92; p = 0.0125), indicating a meaningful spatial difference within
the county.
The full model including year, site, and pollutant explained 98
percent of the variability in annual concentrations (R-squared = 0.980,
adjusted R-squared = 0.977). Triple Oak remained significantly lower
than Millbrook School (estimate = -1.07, p = 0.010), PM10 averaged 5.85
units higher than PM2.5 (p < 0.001), and ozone averaged 8.59 units
lower (p < 0.001), reflecting the very different measurement scales
of the pollutants. The year coefficient was not significant (estimate =
-0.0625, p = 0.29). On a held-out testing set, the model achieved a mean
squared error of 0.773, a mean absolute error of 0.668, and a root mean
squared error of 0.879, indicating that the model generalizes well.
Discussion
Meaning of Results
The results show that the two particulate pollutants varied
considerably over the nine-year window while ozone remained stable,
which is consistent with ozone being a regional secondary pollutant
whose annual mean is buffered by photochemical and meteorological
controls (U.S. Environmental Protection Agency, 2024). The dip in PM2.5
around 2020 and the elevated period around 2023 mirror nationwide and
regional patterns associated with economic activity, wildfire smoke, and
meteorology. The finding that Millbrook School records higher PM2.5 than
Triple Oak suggests that local emissions sources, road traffic, or urban
density differ across the county. The high observation completeness in
most years supports the reliability of these comparisons.
Practical Implications
For public-health surveillance, the stable ozone and moderate
particulate levels observed here suggest that, while concentrations
generally remained within a moderate range, the systematic PM2.5
difference between the two sites could be relevant for residents living
near the Millbrook School area. For county planners, the results
highlight the value of maintaining a geographically distributed
monitoring network: the two-site comparison would be impossible if only
one site existed. For students and analysts, the documented workflow
demonstrates how free public data and open-source R packages can be
combined into a fully reproducible analysis.
Limitations
The principal limitations are the small number of years (nine), the
incomparability of the two sites for PM10 and ozone, the use of annual
summaries rather than daily or hourly data, and the incomplete
observations for particulate pollutants in 2021 and 2022. Because only
eight observations are available for the trend models of PM10 and ozone,
the absence of a significant trend should not be interpreted as evidence
that no change occurred.
Conclusion
Major Takeaways
This project analyzed air-quality trends in Wake County, North
Carolina, from 2017 to 2025 using a reproducible R workflow. The main
findings are: (1) PM2.5 and PM10 fluctuated over the study period, with
no statistically significant long-term trend; (2) ozone remained stable;
(3) Millbrook School recorded significantly higher PM2.5 than Triple Oak
after adjusting for time; (4) PM10 varied most in absolute terms; and
(5) observation completeness was high in most years, supporting data
reliability.
Recommendations
Analysts and agencies working with the AQS Annual Summary should (a)
always document the handling of duplicate duration, standard, and
parameter-occurrence records; (b) restrict trend analysis to completed
calendar years; and (c) verify that all sites being compared monitor the
same pollutants. For residents and planners, the PM2.5 difference
between the two sites suggests that localized monitoring remains
important even within a single county.
Future Directions
Future research should (1) incorporate daily or hourly observations
to study seasonal patterns and exceedance days; (2) add more years of
data and additional sites across North Carolina to increase statistical
power; (3) relate air quality to meteorological covariates such as
temperature, wind, and precipitation; and (4) link concentration
estimates to local health outcomes and population exposure, building on
the framework demonstrated here.
References
Dominici, F., Peng, R. D., Bell, M. L., Pham, L., McDermott, A.,
Zeger, S. L., & Samet, J. M. (2006). Fine particulate air pollution
and hospital admission for cardiovascular and respiratory diseases.
JAMA, 295(10), 1127–1134. https://doi.org/10.1001/jama.295.10.1127
Kuhn, M., & Silge, J. (2022). Tidy modeling with R.
O’Reilly Media. https://www.tmwr.org/
North Carolina Department of Environmental Quality. (2025). Air
quality monitoring. https://www.deq.nc.gov/about/divisions/air-quality
U.S. Environmental Protection Agency. (n.d.). Air quality annual
summary dataset. Data.gov. https://catalog.data.gov/dataset/air-quality-annual-summary
U.S. Environmental Protection Agency. (2024). NAAQS table.
https://www.epa.gov/criteria-air-pollutants/naaqs-table
Wickham, H., Averick, M., Bryan, J., Chang, W., McGowan, L. D.,
François, R., Grolemund, G., Hayes, A., Henry, L., Hester, J., Kuhn, M.,
Pedersen, T. L., Miller, E., Bache, S. M., Müller, K., Ooms, J.,
Robinson, D., Seidel, D. P., Spinu, V., … Yutani, H. (2019). Welcome to
the tidyverse. Journal of Open Source Software, 4(43), 1686. https://doi.org/10.21105/joss.01686
World Health Organization. (2021). WHO global air quality
guidelines: Particulate matter (PM2.5 and PM10), ozone, nitrogen
dioxide, sulfur dioxide and carbon monoxide. https://www.who.int/publications/i/item/9789240034228
## Analysis performed with R R version 4.6.1 (2026-06-24) on aarch64-apple-darwin23 ; tidyverse 2.0.0 ; tidymodels 1.5.0 ; knitr 1.51 ; rmarkdown 2.31