I wanted to understand the relationship between particulate matter measurements (PM2.5) and the U.S. air quality index (AQI).

Chart of PM2.5 to AQI

The formula is on wikipedia, defined as a piecewise linear function. But it's weird that the slope isn't monotonic! It starts at 4.2, then drops to 2.1, but goes up to 2.5, then drops to 0.5, then goes up to 1.0, then back down to 0.66. Weird!

(chart made with d3.js)

Also see this article from smartairfilters.com that goes into more detail and also suggests using µg/m³ instead of AQI. The definition of AQI varies across countries! For example, 250 µg/m³ is considered AQI 400 in India but AQI 300 in the U.S.