Building air quality detector

There is a sample library for the SPS30 that calculates the Air Quality Index for Particulate Matter, so you are 1/3 of the way there.

A forum search has lots of results for NO2 and Ozone.