Input must be a data.frame/tibble of numeric columns (no datetime column). Output is a same-shaped data.frame of integer AQI values.

Behavior: - NA / non-finite -> NA - x <= 0 -> 0 - truncate PM2.5 to 0.1 µg/m³ (floor, not round) - extended AQI using last segment for values above top breakpoint (no cap)

nowcast_to_aqi(x, NAAQS = c("PM2.5_2024", "PM2.5"))

Arguments

x

data.frame / tibble of numeric columns (no datetime).

NAAQS

Version of NAAQS levels to use. See Note.

Value

data.frame of integer AQI values (same dimensions).

Note

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.