This function uses the leaflet::colorBin()
function to return a
vector or matrix of colors derived from data values.
Vector or matrix of PM2.5 values or an mts_monitor object.
EPA AQS criteria pollutant.
Named color palette to use for AQI categories.
Color assigned to missing values.
Version of NAAQS levels to use. See Note.
A vector or matrix of AQI colors to be used in maps and plots.
On February 7, 2024, EPA strengthened the National Ambient Air Quality Standards for Particulate Matter (PM NAAQS) to protect millions of Americans from harmful and costly health impacts, such as heart attacks and premature death. Particle or soot pollution is one of the most dangerous forms of air pollution, and an extensive body of science links it to a range of serious and sometimes deadly illnesses. EPA is setting the level of the primary (health-based) annual PM2.5 standard at 9.0 micrograms per cubic meter to provide increased public health protection, consistent with the available health science. See PM NAAQS update.
library(AirMonitor)
# Fancy plot based on pm2.5 values
pm2.5 <- Carmel_Valley$data[,2]
Carmel_Valley %>%
monitor_timeseriesPlot(
shadedNight = TRUE,
pch = 16,
cex = pmax(pm2.5 / 100, 0.5),
col = aqiColors(pm2.5),
opacity = 0.8
)