AirGradient Forum

Sensor disappears on AirGradient Map for all layers except CO₂

Hi,

I’m seeing a strange issue with how my sensor appears on the AirGradient map.

What works

The problem (AirGradient map)
On the AirGradient map, my sensor only shows up when I select CO₂ as the measurement.
If I select other layers (PM2.5, US AQI), the sensor disappears from the map.

Map link (centered near my area):
https://map.airgradient.com/?zoom=13&long=44.51&lat=40.17&meas=rco2&wind_layer=false&org=ag&embedded=false

When it started
This started yesterday, around the same time that Sensor.Community sensors were added to the map. Before that, everything worked normally.

What I tried

  • Power-cycled / rebooted the device (turned it off and on).
    After rebooting, the sensor appeared on the map for a short time across measurements, but later it disappeared again (except when CO₂ is selected).

Expected behavior
The sensor should remain visible on the map across measurements, not only on the CO₂ layer.

Could you please check if there’s an issue with how AirGradient sensors are being merged/filtered on the map since Sensor.Community was added, or if something about my station metadata is causing it to only render under CO₂?

Thanks!

Thanks for reporting the issue!

I looked into this and I can see the " Zavaryan Street" monitor showing up under all filters (PM2.5, US AQI and CO2) - if that’s the correct monitor, could you please check again?

Thanks for installing a monitor in Yerevan, it’s much needed!

1 Like

Hi! Yes, that’s the correct monitor: “Zavaryan Street.”

I just checked again and it’s now visible under all filters (PM2.5 / US AQI / CO₂). Thanks for looking into it!

For reference, I’m attaching screenshots from when the issue was happening: the monitor was available under the CO₂ view, but it did not appear under PM2.5 / US AQI on the map (even though data was still fine in the AirGradient dashboard and OpenAQ).

Thanks again!

Thank you! It may have been a temporary issue after the new map update went to production.

1 Like

Hi! Quick update: I did some debugging and I think I found what’s causing the sensors to “disappear”.

It looks like the map requests PM2.5 clusters with excludeOutliers=true by default:

https://map-data.airgradient.com/map/api/v1/measurements/current/cluster?xmin=44.42922592163087&ymin=40.12192811696267&xmax=44.59075927734376&ymax=40.2180773631753&zoom=13&measure=pm25&excludeOutliers=true

When I call this endpoint, the response contains only Sensor.Community stations (8 sensors) and none of the AirGradient sensors in Yerevan:

{
  "data": [
    {
      "type": "sensor",
      "latitude": 40.152,
      "longitude": 44.49,
      "locationId": 16015555,
      "locationName": "Sensor.Community: 75606",
      "sensorType": "Small Sensor",
      "dataSource": "SensorCommunity",
      "value": 40
    },
    {
      "type": "sensor",
      "latitude": 40.21337588179,
      "longitude": 44.52432900667,
      "locationId": 16016072,
      "locationName": "Sensor.Community: 79360",
      "sensorType": "Small Sensor",
      "dataSource": "SensorCommunity",
      "value": 57
    },
    {
      "type": "sensor",
      "latitude": 40.20348944341,
      "longitude": 44.52628970146,
      "locationId": 16016733,
      "locationName": "Sensor.Community: 83034",
      "sensorType": "Small Sensor",
      "dataSource": "SensorCommunity",
      "value": 51
    },
    {
      "type": "sensor",
      "latitude": 40.136,
      "longitude": 44.524,
      "locationId": 16016839,
      "locationName": "Sensor.Community: 83720",
      "sensorType": "Small Sensor",
      "dataSource": "SensorCommunity",
      "value": 48
    },
    {
      "type": "sensor",
      "latitude": 40.20332441924,
      "longitude": 44.51700925827,
      "locationId": 16016856,
      "locationName": "Sensor.Community: 83797",
      "sensorType": "Small Sensor",
      "dataSource": "SensorCommunity",
      "value": 39
    },
    {
      "type": "sensor",
      "latitude": 40.1988803,
      "longitude": 44.57414212761,
      "locationId": 16016923,
      "locationName": "Sensor.Community: 84097",
      "sensorType": "Small Sensor",
      "dataSource": "SensorCommunity",
      "value": 35
    },
    {
      "type": "sensor",
      "latitude": 40.17657570728,
      "longitude": 44.5044403011,
      "locationId": 16017570,
      "locationName": "Sensor.Community: 87293",
      "sensorType": "Small Sensor",
      "dataSource": "SensorCommunity",
      "value": 49
    },
    {
      "type": "sensor",
      "latitude": 40.2025962,
      "longitude": 44.4910776,
      "locationId": 16017717,
      "locationName": "Sensor.Community: 88206",
      "sensorType": "Small Sensor",
      "dataSource": "SensorCommunity",
      "value": 49
    }
  ],
  "total": 8,
  "page": null,
  "pagesize": null
}

However, if I make the same request with excludeOutliers=false:

https://map-data.airgradient.com/map/api/v1/measurements/current/cluster?xmin=44.42922592163087&ymin=40.12192811696267&xmax=44.59075927734376&ymax=40.2180773631753&zoom=13&measure=pm25&excludeOutliers=false

…then both AirGradient monitors appear in the response:

{
  "data": [
    {
      "type": "sensor",
      "latitude": 40.200467,
      "longitude": 44.49794,
      "locationId": 1181,
      "locationName": "Nkarichneri shenq",
      "sensorType": "Small Sensor",
      "dataSource": "AirGradient",
      "value": 94
    },
    {
      "type": "sensor",
      "latitude": 40.166727,
      "longitude": 44.511603,
      "locationId": 14890052,
      "locationName": "Zavaryan Street",
      "sensorType": "Small Sensor",
      "dataSource": "AirGradient",
      "value": 117
    },
    {
      "type": "sensor",
      "latitude": 40.152,
      "longitude": 44.49,
      "locationId": 16015555,
      "locationName": "Sensor.Community: 75606",
      "sensorType": "Small Sensor",
      "dataSource": "SensorCommunity",
      "value": 39
    },
    {
      "type": "sensor",
      "latitude": 40.21337588179,
      "longitude": 44.52432900667,
      "locationId": 16016072,
      "locationName": "Sensor.Community: 79360",
      "sensorType": "Small Sensor",
      "dataSource": "SensorCommunity",
      "value": 54
    },
    {
      "type": "sensor",
      "latitude": 40.20348944341,
      "longitude": 44.52628970146,
      "locationId": 16016733,
      "locationName": "Sensor.Community: 83034",
      "sensorType": "Small Sensor",
      "dataSource": "SensorCommunity",
      "value": 53
    },
    {
      "type": "sensor",
      "latitude": 40.136,
      "longitude": 44.524,
      "locationId": 16016839,
      "locationName": "Sensor.Community: 83720",
      "sensorType": "Small Sensor",
      "dataSource": "SensorCommunity",
      "value": 51
    },
    {
      "type": "sensor",
      "latitude": 40.20332441924,
      "longitude": 44.51700925827,
      "locationId": 16016856,
      "locationName": "Sensor.Community: 83797",
      "sensorType": "Small Sensor",
      "dataSource": "SensorCommunity",
      "value": 45
    },
    {
      "type": "sensor",
      "latitude": 40.1988803,
      "longitude": 44.57414212761,
      "locationId": 16016923,
      "locationName": "Sensor.Community: 84097",
      "sensorType": "Small Sensor",
      "dataSource": "SensorCommunity",
      "value": 34
    },
    {
      "type": "sensor",
      "latitude": 40.17657570728,
      "longitude": 44.5044403011,
      "locationId": 16017570,
      "locationName": "Sensor.Community: 87293",
      "sensorType": "Small Sensor",
      "dataSource": "SensorCommunity",
      "value": 47
    },
    {
      "type": "sensor",
      "latitude": 40.2025962,
      "longitude": 44.4910776,
      "locationId": 16017717,
      "locationName": "Sensor.Community: 88206",
      "sensorType": "Small Sensor",
      "dataSource": "SensorCommunity",
      "value": 49
    },
    {
      "type": "sensor",
      "latitude": 40.204,
      "longitude": 44.5,
      "locationId": 16017891,
      "locationName": "Sensor.Community: 88894",
      "sensorType": "Small Sensor",
      "dataSource": "SensorCommunity",
      "value": 76
    }
  ],
  "total": 11,
  "page": null,
  "pagesize": null
}

So it seems the map is filtering out its own AirGradient monitors as “outliers” for PM2.5 in this area, which makes them vanish from the PM2.5 / AQI layers. CO₂ still shows, which matches what I’m observing.

This also explains why the issue is intermittent: whenever excludeOutliers=true filters them out, they disappear; when the filtering doesn’t exclude them, they can reappear.

Could you please check the outlier detection for PM2.5, especially after adding Sensor.Community data? It feels like the local baseline changed and now the AirGradient stations are incorrectly classified as outliers.

Thanks!

I’ve noticed the same thing at times. It would still be useful to show the value, but with a clear warning that it may not be accurate. At the moment, it feels too aggressive. A better approach would be to display a message like: “This reading is significantly higher than nearby monitors and may be caused by a localised event."

1 Like

Actually, I noticed the issue again after I responded to you and checked in with the dev team on this. They’ve implemented outlier detection in a recent update which is the reason the AirGradient sensors are disappearing with PM selected. I’ve made them aware of the issue and they’re working on refining the outlier detection algorithm.

1 Like