This function converts pollution running averages in the original units (ppb, µg/m³, etc) to IMECA

convert_to_imeca(value, pollutant, showWarnings = TRUE)

Arguments

value

a numeric vector of values to convert to IMECAs. Note that the concentration of pollutants can be measured in different ways, for NO2, and O3 a 1 hour average is used, for CO, an 8 hour average, and for SO2, PM10 and PM25 a 24 hour average is used.

pollutant

type of pollutant. A vector of one or more of the following options:

  • "SO2" - Sulfur Dioxide - ppb (24 hour average)

  • "CO" - Carbon Monoxide - ppm (8 hour average)

  • "NO2" - Nitrogen Dioxide - pbb (1 hour average)

  • "O3" - Ozone ppb (1 hour average)

  • "PM10" - Particulate matter 10 micrometers or less (24 hour average)

  • "PM25" - Particulate matter 2.5 micrometers or less (24 hour average)

showWarnings

deprecated; you can use the function suppressWarnings instead.

Value

A vector containing the converted value in IMECAs

Details

Air quality in Mexico City is reported in IMECAs (Índice Metropolitano de la Calidad del Aire), a dimensionless scale where all pollutants can be compared.

Note that each pollutant has different averaging periods (see the arguments section). Because of rounding error results may be off by a couple of points.

See also

Examples

## IMECA is a dimensionless scale that allows for the comparison of ## different pollutants convert_to_imeca(157, "O3")
#> [1] 153
convert_to_imeca(c(450, 350, 250), rep("NO2", 3))
#> [1] 155 132 110
## Since this is PM10 the 80 is supposed to be the 24 hour average convert_to_imeca(80, "PM10")
#> [1] 102
## warning about recycling elements in a vector convert_to_imeca(c(157, 200), "O3")
#> Warning: The vectors are of unequal length. Recycling elements of the shorter vector to match the longer vector.
#> [1] 153 196
convert_to_imeca(67, "O3")
#> [1] 48
convert_to_imeca(77, "O3")
#> [1] 63
convert_to_imeca(205, "O3")
#> [1] 201
convert_to_imeca(72, "O3")
#> [1] 53
convert_to_imeca(98, "O3")
#> [1] 103