{
  "annotations": {"list": []},
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "panels": [
    {
      "title": "Air Quality — PM2.5 (µg/m³)",
      "type": "timeseries",
      "datasource": {"type": "influxdb", "name": "Influxdb-v2"},
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"topic\"] =~ /smartcity\\/airquality/)\n  |> filter(fn: (r) => r[\"_field\"] == \"pm25_ugm3\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n          |> yield(name: \"mean\")"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 0, "y": 0}
    },
    {
      "title": "Air Quality — NO2 (µg/m³)",
      "type": "timeseries",
      "datasource": {"type": "influxdb", "name": "Influxdb-v2"},
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"topic\"] =~ /smartcity\\/airquality/)\n  |> filter(fn: (r) => r[\"_field\"] == \"no2_ugm3\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n          |> yield(name: \"mean\")"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 12, "y": 0}
    },
    {
      "title": "Temperature (°C)",
      "type": "timeseries",
      "datasource": {"type": "influxdb", "name": "Influxdb-v2"},
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"topic\"] =~ /smartcity\\/weather/)\n  |> filter(fn: (r) => r[\"_field\"] == \"temperature_celsius\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n          |> yield(name: \"mean\")"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 0, "y": 8}
    },
    {
      "title": "Humidity (%)",
      "type": "timeseries",
      "datasource": {"type": "influxdb", "name": "Influxdb-v2"},
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"topic\"] =~ /smartcity\\/weather/)\n  |> filter(fn: (r) => r[\"_field\"] == \"humidity_percent\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n          |> yield(name: \"mean\")"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 12, "y": 8}
    },
    {
      "title": "Wind Speed (km/h)",
      "type": "timeseries",
      "datasource": {"type": "influxdb", "name": "Influxdb-v2"},
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"topic\"] =~ /smartcity\\/weather/)\n  |> filter(fn: (r) => r[\"_field\"] == \"wind_speed_kmh\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n          |> yield(name: \"mean\")"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 0, "y": 16}
    },
    {
      "title": "Rain (mm)",
      "type": "timeseries",
      "datasource": {"type": "influxdb", "name": "Influxdb-v2"},
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"topic\"] =~ /smartcity\\/weather/)\n  |> filter(fn: (r) => r[\"_field\"] == \"rain_mm\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n          |> yield(name: \"mean\")"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 12, "y": 16}
    },
    {
      "title": "Traffic — Vehicle Count",
      "type": "timeseries",
      "datasource": {"type": "influxdb", "name": "Influxdb-v2"},
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"topic\"] =~ /smartcity\\/traffic/)\n  |> filter(fn: (r) => r[\"_field\"] == \"vehicle_count\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n          |> yield(name: \"mean\")"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 0, "y": 24}
    },
    {
      "title": "Traffic — Avg Speed (km/h)",
      "type": "timeseries",
      "datasource": {"type": "influxdb", "name": "Influxdb-v2"},
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"topic\"] =~ /smartcity\\/traffic/)\n  |> filter(fn: (r) => r[\"_field\"] == \"average_speed_kmh\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n          |> yield(name: \"mean\")"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 12, "y": 24}
    },
    {
      "title": "Parking — Available Spots",
      "type": "timeseries",
      "datasource": {"type": "influxdb", "name": "Influxdb-v2"},
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"topic\"] =~ /smartcity\\/parking/)\n  |> filter(fn: (r) => r[\"_field\"] == \"available_spots\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n          |> yield(name: \"mean\")"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 0, "y": 32}
    },
    {
      "title": "Parking — Occupancy (%)",
      "type": "timeseries",
      "datasource": {"type": "influxdb", "name": "Influxdb-v2"},
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"topic\"] =~ /smartcity\\/parking/)\n  |> filter(fn: (r) => r[\"_field\"] == \"occupancy_percent\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n          |> yield(name: \"mean\")"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 12, "y": 32}
    },
    {
      "title": "Noise Level (dB)",
      "type": "timeseries",
      "datasource": {"type": "influxdb", "name": "Influxdb-v2"},
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"topic\"] =~ /smartcity\\/noise/)\n  |> filter(fn: (r) => r[\"_field\"] == \"noise_level_db\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n          |> yield(name: \"mean\")"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 0, "y": 40}
    },
    {
      "title": "Light — Brightness (lux)",
      "type": "timeseries",
      "datasource": {"type": "influxdb", "name": "Influxdb-v2"},
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"topic\"] =~ /smartcity\\/light/)\n  |> filter(fn: (r) => r[\"_field\"] == \"brightness_lux\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n          |> yield(name: \"mean\")"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 12, "y": 40}
    },
    {
      "title": "UV Index",
      "type": "timeseries",
      "datasource": {"type": "influxdb", "name": "Influxdb-v2"},
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"topic\"] =~ /smartcity\\/weather/)\n  |> filter(fn: (r) => r[\"_field\"] == \"uv_index\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n          |> yield(name: \"mean\")"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 0, "y": 48}
    },
    {
      "title": "Pressure (hPa)",
      "type": "timeseries",
      "datasource": {"type": "influxdb", "name": "Influxdb-v2"},
      "targets": [
        {
          "query": "from(bucket:\"smartcity\")\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"topic\"] =~ /smartcity\\/weather/)\n  |> filter(fn: (r) => r[\"_field\"] == \"pressure_hpa\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n          |> yield(name: \"mean\")"
        }
      ],
      "gridPos": {"h": 8, "w": 12, "x": 12, "y": 48}
    }
  ],
  "schemaVersion": 36,
  "style": "dark",
  "tags": ["smartcity", "martinique", "iot"],
  "templating": {"list": []},
  "time": {"from": "now-1h", "to": "now"},
  "title": "Smart City Digital Twin — Martinique",
  "uid": "smartcity-martinique-v2",
  "version": 2
}
