The impact of four pollutants was tracked between 2002 and 2017 on people included in Public Health Scotland data.