Grafana dashboard: Purple Air PAII Air Quality
Description: Grafana Dashboard for use with the purple_exporter Prometheus exporter.


# purple_exporter Dashboard
This Dashboard is an example for use alongside [purple_exporter](https://github.com/ViridianForge/purple_exporter). Instructions for setting up the associated Prometheus exporter can be found with the purple_exporter Github repo.

This dashboard displays the following information, as collected from a PAII Purple Air Sensor connected to an instance of purple_exporter.
- Air Temperature
- Air Pressure
- Ambient Humidity
- Particle Estimated Mass Concentration for Sensors A and B of particles less than:
    - 1.0 uM in diameter
    - 2.0 uM in diameter
    - 10.0 uM in diameter
- Particle Counts for Sensors A and B of particles greater than:
    - 0.3 uM in diameter
    - 0.5 uM in diameter
    - 1.0 uM in diameter
    - 2.5 uM in diameter
    - 5.0 uM in diameter
    - 10.0 uM in diameter

As Purple Air asks that API requests be limited to once every 5 minutes, the default, and fastest refresh rate for this dashboard is 5 minutes.

{
  "__inputs": [],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.0.4"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "Grafana Dashboard for use with the purple_exporter Prometheus exporter.",
  "editable": true,
  "gnetId": 14723,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "panels": [
    {
      "datasource": null,
      "description": "Estimate mass concentration of particles < X uM in diameter at Sensor A",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "conμgm3"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "id": 11,
      "options": {
        "legend": {
          "calcs": [
            "min",
            "max",
            "mean"
          ],
          "displayMode": "table",
          "placement": "right"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "PM_1_0_A",
          "interval": "",
          "legendFormat": "Con. < 1.0 uM",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "PM_2_0_A",
          "hide": false,
          "interval": "",
          "legendFormat": "Con. < 2.0 uM",
          "refId": "B"
        },
        {
          "exemplar": true,
          "expr": "PM_10_0_A",
          "hide": false,
          "interval": "",
          "legendFormat": "Con. < 10.0 uM",
          "refId": "C"
        }
      ],
      "title": "Estimated Mass Concentrations (A)",
      "transparent": true,
      "type": "timeseries"
    },
    {
      "datasource": null,
      "description": "Estimated Mass Concentration of Particles < X uM in diameter at Sensor B",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "conμgm3"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "id": 12,
      "options": {
        "legend": {
          "calcs": [
            "min",
            "max",
            "mean"
          ],
          "displayMode": "table",
          "placement": "right"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "PM_1_0_B",
          "interval": "",
          "legendFormat": "Con. < 1.0 uM",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "PM_2_0_B",
          "hide": false,
          "interval": "",
          "legendFormat": "Con. < 2.0 uM",
          "refId": "B"
        },
        {
          "exemplar": true,
          "expr": "PM_10_0_B",
          "hide": false,
          "interval": "",
          "legendFormat": "Con. < 10.0 uM",
          "refId": "C"
        }
      ],
      "title": "Estimated Mass Concentrations (B)",
      "transparent": true,
      "type": "timeseries"
    },
    {
      "datasource": null,
      "description": "Count of Particles greater than X uM in diameter at Sensor A",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 8
      },
      "id": 8,
      "options": {
        "legend": {
          "calcs": [
            "min",
            "max",
            "mean"
          ],
          "displayMode": "table",
          "placement": "right"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "Count_0_3_A",
          "interval": "",
          "legendFormat": "Count >= 0.3 uM",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "Count_0_5_A",
          "hide": false,
          "interval": "",
          "legendFormat": "Count >= 0.5 uM",
          "refId": "B"
        },
        {
          "exemplar": true,
          "expr": "Count_1_0_A",
          "hide": false,
          "interval": "",
          "legendFormat": "Count >= 1.0 uM",
          "refId": "C"
        },
        {
          "exemplar": true,
          "expr": "Count_2_5_A",
          "hide": false,
          "interval": "",
          "legendFormat": "Count >= 2.5 uM",
          "refId": "D"
        },
        {
          "exemplar": true,
          "expr": "Count_5_0_A",
          "hide": false,
          "interval": "",
          "legendFormat": "Count >= 5.0 uM",
          "refId": "E"
        },
        {
          "exemplar": true,
          "expr": "Count_10_0_A",
          "hide": false,
          "interval": "",
          "legendFormat": "Count >= 10.0 uM",
          "refId": "F"
        }
      ],
      "title": "Particle Count (A)",
      "transparent": true,
      "type": "timeseries"
    },
    {
      "datasource": null,
      "description": "Count of Particles greater than X uM in diameter for Sensor B",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 8
      },
      "id": 9,
      "options": {
        "legend": {
          "calcs": [
            "min",
            "max",
            "mean"
          ],
          "displayMode": "table",
          "placement": "right"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "Count_0_3_B",
          "interval": "",
          "legendFormat": "Count >= 0.3 uM",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "Count_0_5_B",
          "hide": false,
          "interval": "",
          "legendFormat": "Count >= 0.5 uM",
          "refId": "B"
        },
        {
          "exemplar": true,
          "expr": "Count_1_0_B",
          "hide": false,
          "interval": "",
          "legendFormat": "Count >= 1.0 uM",
          "refId": "C"
        },
        {
          "exemplar": true,
          "expr": "Count_2_5_B",
          "hide": false,
          "interval": "",
          "legendFormat": "Count >= 2.5 uM",
          "refId": "D"
        },
        {
          "exemplar": true,
          "expr": "Count_5_0_B",
          "hide": false,
          "interval": "",
          "legendFormat": "Count >= 5.0 uM",
          "refId": "E"
        },
        {
          "exemplar": true,
          "expr": "Count_10_0_B",
          "hide": false,
          "interval": "",
          "legendFormat": "Count >= 10.0 uM",
          "refId": "F"
        }
      ],
      "title": "Particle Count (B)",
      "transparent": true,
      "type": "timeseries"
    },
    {
      "datasource": null,
      "description": "Air Humidity at sensor",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "displayName": "Humidity",
          "mappings": [],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "dark-green",
                "value": null
              },
              {
                "color": "semi-dark-yellow",
                "value": 70
              },
              {
                "color": "dark-orange",
                "value": 80
              },
              {
                "color": "dark-red",
                "value": 90
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 8,
        "x": 0,
        "y": 16
      },
      "id": 2,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.0.4",
      "targets": [
        {
          "exemplar": true,
          "expr": "Humidity",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Humidity",
      "transparent": true,
      "type": "stat"
    },
    {
      "datasource": null,
      "description": "Air Temperature at Sensor",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "displayName": "Temperature",
          "mappings": [],
          "max": 120,
          "min": -10,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "dark-purple",
                "value": null
              },
              {
                "color": "#6ED0E0",
                "value": 40
              },
              {
                "color": "dark-green",
                "value": 55
              },
              {
                "color": "#EAB839",
                "value": 80
              },
              {
                "color": "#EF843C",
                "value": 90
              },
              {
                "color": "red",
                "value": 100
              }
            ]
          },
          "unit": "fahrenheit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 8,
        "x": 8,
        "y": 16
      },
      "id": 4,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value_and_name"
      },
      "pluginVersion": "8.0.4",
      "targets": [
        {
          "exemplar": true,
          "expr": "Temperature",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Temperature",
      "transparent": true,
      "type": "stat"
    },
    {
      "datasource": null,
      "description": "Air Pressure at Sensor",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "displayName": "Pressure",
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "dark-blue",
                "value": null
              },
              {
                "color": "dark-green",
                "value": 1000
              },
              {
                "color": "#EAB839",
                "value": 1010
              },
              {
                "color": "#EF843C",
                "value": 1020
              },
              {
                "color": "red",
                "value": 1030
              }
            ]
          },
          "unit": "pressurembar"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 8,
        "x": 16,
        "y": 16
      },
      "id": 6,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value_and_name"
      },
      "pluginVersion": "8.0.4",
      "targets": [
        {
          "exemplar": true,
          "expr": "Pressure",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Air Pressure",
      "transparent": true,
      "type": "stat"
    }
  ],
  "refresh": "5m",
  "schemaVersion": 30,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5m",
      "10m",
      "15m",
      "20m"
    ]
  },
  "timezone": "",
  "title": "Purple Air PAII Air Quality",
  "uid": "1qQIRsmnk",
  "version": 8
}