c15ae65dca4232fe4/purpleAir.js */

      async function fetchAqi(sensorId) {
        const response = await fetch(
          `https://www.purpleair.com/json?show=${sensorId}`
        );
        const json = await response.json();
        const stats = json.results
          .filter((r) => !(r.Flag || r.A_H))
          .map((r) => JSON.parse(r.Stats));
        const pm2_5 = stats.reduce((acc, { v }) => acc + v, 0) / stats.length;
        const trend = stats[0].v1 - stats[0].v3;
        return {
          cur