Input: a line valid_max M, then a CSV district,pm25.
Build an Altair bar chart with transforms: filter 0 ≤ pm25 ≤ M, aggregate mean_pm25 = mean(pm25) and readings = count() grouped by district, calculate over_guideline = datum.mean_pm25 > 15; encode x = district sorted by -y, y = mean_pm25, colour = over_guideline. Print each transform of the specification (transform: {...}).
Then recompute the same result independently with pandas and print one line per district, highest mean first: Lucheng: mean 42.0 from 2 readings, over guideline: True, and finally filtered out: 2 of 8 rows.