aqi_equation | R Documentation |
takes in a vector of concentrations (of either PM2.5 or ozone) and calculates the AQI, classification (ranging from "Good" to "Hazardous"), and associated color (ranging from Green to Maroon)
aqi_equation(pollutant, concentration)
pollutant |
Either "pm2.5" or "ozone" |
concentration |
A vector of concentrations of that pollutant, in ug/m^3 for pm2.5 or in ppb for ozone |
A data frame with the columns Concentration, AQI, Class, and Color
Ellen Considine
aqi_equation("pm2.5", seq(0,300,10)) aqi_equation("ozone", seq(0,0.2,0.0075))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.