{
  "annotations": {
    "list": []
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 1,
  "id": null,
  "links": [],
  "panels": [
    {
      "title": "Air Quality - PM2.5 (\u00b5g/m\u00b3)",
      "type": "timeseries",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "datasource": {
        "type": "influxdb",
        "uid": "dd1bfc24-de9d-4c23-8a3c-151d153f8169"
      },
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"airquality\")\n  |> filter(fn: (r) => r[\"_field\"] == \"pm25_ugm3\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n  |> yield(name: \"PM2.5\")",
          "refId": "A"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "\u00b5g/m\u00b3",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 25
              },
              {
                "color": "orange",
                "value": 50
              },
              {
                "color": "red",
                "value": 100
              }
            ]
          }
        }
      }
    },
    {
      "title": "Air Quality - CO (mg/m\u00b3)",
      "type": "timeseries",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "datasource": {
        "type": "influxdb",
        "uid": "dd1bfc24-de9d-4c23-8a3c-151d153f8169"
      },
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"airquality\")\n  |> filter(fn: (r) => r[\"_field\"] == \"co_mgm3\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n  |> yield(name: \"CO\")",
          "refId": "A"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "mg/m\u00b3",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 5
              },
              {
                "color": "red",
                "value": 15
              }
            ]
          }
        }
      }
    },
    {
      "title": "Traffic - Average Speed (km/h)",
      "type": "timeseries",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 16
      },
      "datasource": {
        "type": "influxdb",
        "uid": "dd1bfc24-de9d-4c23-8a3c-151d153f8169"
      },
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"traffic\")\n  |> filter(fn: (r) => r[\"_field\"] == \"average_speed_kmh\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n  |> yield(name: \"Speed\")",
          "refId": "A"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "km/h",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "yellow",
                "value": 20
              },
              {
                "color": "green",
                "value": 40
              }
            ]
          }
        }
      }
    },
    {
      "title": "Traffic - Congestion Level",
      "type": "timeseries",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 16
      },
      "datasource": {
        "type": "influxdb",
        "uid": "dd1bfc24-de9d-4c23-8a3c-151d153f8169"
      },
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"traffic\")\n  |> filter(fn: (r) => r[\"_field\"] == \"congestion_level\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n  |> yield(name: \"Congestion\")",
          "refId": "A"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "",
          "min": 0,
          "max": 1,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 0.5
              },
              {
                "color": "red",
                "value": 0.8
              }
            ]
          }
        }
      }
    },
    {
      "title": "Parking - Available Spots",
      "type": "timeseries",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 32
      },
      "datasource": {
        "type": "influxdb",
        "uid": "dd1bfc24-de9d-4c23-8a3c-151d153f8169"
      },
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"parking\")\n  |> filter(fn: (r) => r[\"_field\"] == \"available_spots\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n  |> yield(name: \"Available\")",
          "refId": "A"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "spots"
        }
      }
    },
    {
      "title": "Parking - Occupancy (%)",
      "type": "timeseries",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 32
      },
      "datasource": {
        "type": "influxdb",
        "uid": "dd1bfc24-de9d-4c23-8a3c-151d153f8169"
      },
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"parking\")\n  |> filter(fn: (r) => r[\"_field\"] == \"occupancy_percent\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n  |> yield(name: \"Occupancy\")",
          "refId": "A"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "min": 0,
          "max": 100
        }
      }
    },
    {
      "title": "Noise Level (dB)",
      "type": "timeseries",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 48
      },
      "datasource": {
        "type": "influxdb",
        "uid": "dd1bfc24-de9d-4c23-8a3c-151d153f8169"
      },
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"noise\")\n  |> filter(fn: (r) => r[\"_field\"] == \"noise_level_db\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n  |> yield(name: \"Noise\")",
          "refId": "A"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "dB",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 65
              },
              {
                "color": "orange",
                "value": 80
              },
              {
                "color": "red",
                "value": 95
              }
            ]
          }
        }
      }
    },
    {
      "title": "Weather - Temperature (\u00b0C)",
      "type": "timeseries",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 48
      },
      "datasource": {
        "type": "influxdb",
        "uid": "dd1bfc24-de9d-4c23-8a3c-151d153f8169"
      },
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"weather\")\n  |> filter(fn: (r) => r[\"_field\"] == \"temperature_celsius\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n  |> yield(name: \"Temperature\")",
          "refId": "A"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "\u00b0C"
        }
      }
    },
    {
      "title": "Light - Brightness (lux)",
      "type": "timeseries",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 64
      },
      "datasource": {
        "type": "influxdb",
        "uid": "dd1bfc24-de9d-4c23-8a3c-151d153f8169"
      },
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"light\")\n  |> filter(fn: (r) => r[\"_field\"] == \"brightness_lux\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n  |> yield(name: \"Brightness\")",
          "refId": "A"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "lux"
        }
      }
    },
    {
      "title": "Light - Power Consumption (W)",
      "type": "timeseries",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 64
      },
      "datasource": {
        "type": "influxdb",
        "uid": "dd1bfc24-de9d-4c23-8a3c-151d153f8169"
      },
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"light\")\n  |> filter(fn: (r) => r[\"_field\"] == \"power_consumption_w\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n  |> yield(name: \"Power\")",
          "refId": "A"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "W"
        }
      }
    }
  ],
  "schemaVersion": 38,
  "style": "dark",
  "tags": [
    "smart-city",
    "martinique",
    "iot",
    "complete"
  ],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "title": "Smart City Digital Twin - Martinique (COMPLET)",
  "uid": "smartcity-martinique-complete",
  "version": 1
}