Created
October 8, 2025 19:19
-
-
Save sanderson/b92bca03a23a58ec25f1c544457d82fd to your computer and use it in GitHub Desktop.
EU Wind Sample Data - Grafana Dashboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "annotations": { | |
| "list": [ | |
| { | |
| "builtIn": 1, | |
| "datasource": { | |
| "type": "grafana", | |
| "uid": "-- Grafana --" | |
| }, | |
| "enable": true, | |
| "hide": true, | |
| "iconColor": "rgba(0, 211, 255, 1)", | |
| "name": "Annotations & Alerts", | |
| "type": "dashboard" | |
| } | |
| ] | |
| }, | |
| "editable": true, | |
| "fiscalYearStartMonth": 0, | |
| "graphTooltip": 0, | |
| "id": 0, | |
| "links": [], | |
| "panels": [ | |
| { | |
| "collapsed": true, | |
| "gridPos": { | |
| "h": 1, | |
| "w": 24, | |
| "x": 0, | |
| "y": 0 | |
| }, | |
| "id": 8, | |
| "panels": [ | |
| { | |
| "fieldConfig": { | |
| "defaults": {}, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 12, | |
| "w": 24, | |
| "x": 0, | |
| "y": 1 | |
| }, | |
| "id": 9, | |
| "options": { | |
| "code": { | |
| "language": "plaintext", | |
| "showLineNumbers": false, | |
| "showMiniMap": false | |
| }, | |
| "content": "# InfluxDB EU Wind Sample Data Dashboard\n\nThis dashboard visualizes the [European Union (EU) wind sample data](https://docs.influxdata.com/influxdb3/enterprise/reference/sample-data/#european-union-wind-data) provided by InfluxDB.\nThe sample data includes wind speed and wind direction collected on **October 1, 2025 (UTC)**.\nThe dashboard uses the InfluxDB 3 Distinct Value Cache (DVC) to quickly populate values for the `country`, `county`, and `city` variables used in this dashboard.\n\n## Set up the dashboard\n\n1. In Grafana, add an InfluxDB data source for your InfluxDB 3 Core or InfluxDB 3 Enterprise instance.\n2. On the command line, set the following environment variable for credentials that the `influxdb3` CLI can use:\n\n _**Note:** These credentials should match your InfluxDB data source credentials._ \n\n ```bash\n export INFLUXDB3_HOST_URL=<your_influxdb_url>\n export INFLUXDB3_DATABASE_NAME=<your_database_name>\n export INFLUXDB3_AUTH_TOKEN=<your_influxdb_admin_token>\n ```\n\n3. Use the `influxdb3` CLI to precreate a table for the sample data:\n\n ```bash\n influxdb3 create table \\\n --tags country,county,city \\\n --fields wind_direction:int64,wind_speed:float64 \\\n wind_data\n ```\n\n4. Use the `influxdb3` CLI to create a DVC for tag columns in the sample data:\n\n ```bash\n influxdb3 create distinct_cache \\\n --table wind_data \\\n --columns country,county,city \\\n wind_locations\n ```\n\n5. Use the `influxdb3` CLI to write the sample data:\n\n ```bash\n influxdb3 write \"$(curl --request GET https://docs.influxdata.com/downloads/eu-wind-data.lp)\"\n ```\n\n6. Refresh the dashboard to load all the data and populate the dashboard variables.", | |
| "mode": "markdown" | |
| }, | |
| "pluginVersion": "12.2.0", | |
| "title": "", | |
| "type": "text" | |
| } | |
| ], | |
| "title": "Dashboard Information", | |
| "type": "row" | |
| }, | |
| { | |
| "collapsed": false, | |
| "gridPos": { | |
| "h": 1, | |
| "w": 24, | |
| "x": 0, | |
| "y": 1 | |
| }, | |
| "id": 7, | |
| "panels": [], | |
| "title": "Wind Data Vizualizations", | |
| "type": "row" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "influxdb", | |
| "uid": "${datasource}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "palette-classic" | |
| }, | |
| "custom": { | |
| "axisBorderShow": false, | |
| "axisCenteredZero": false, | |
| "axisColorMode": "text", | |
| "axisLabel": "", | |
| "axisPlacement": "auto", | |
| "barAlignment": 0, | |
| "barWidthFactor": 0.6, | |
| "drawStyle": "line", | |
| "fillOpacity": 0, | |
| "gradientMode": "none", | |
| "hideFrom": { | |
| "legend": false, | |
| "tooltip": false, | |
| "viz": false | |
| }, | |
| "insertNulls": false, | |
| "lineInterpolation": "linear", | |
| "lineWidth": 1, | |
| "pointSize": 5, | |
| "scaleDistribution": { | |
| "type": "linear" | |
| }, | |
| "showPoints": "auto", | |
| "showValues": false, | |
| "spanNulls": false, | |
| "stacking": { | |
| "group": "A", | |
| "mode": "none" | |
| }, | |
| "thresholdsStyle": { | |
| "mode": "off" | |
| } | |
| }, | |
| "displayName": "${__field.labels[\"country\"]}", | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| }, | |
| "unit": "velocitykmh" | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 12, | |
| "x": 0, | |
| "y": 2 | |
| }, | |
| "id": 5, | |
| "options": { | |
| "legend": { | |
| "calcs": [], | |
| "displayMode": "list", | |
| "placement": "bottom", | |
| "showLegend": true | |
| }, | |
| "tooltip": { | |
| "hideZeros": false, | |
| "mode": "single", | |
| "sort": "none" | |
| } | |
| }, | |
| "pluginVersion": "12.2.0", | |
| "targets": [ | |
| { | |
| "dataset": "iox", | |
| "datasource": { | |
| "type": "influxdb", | |
| "uid": "${datasource}" | |
| }, | |
| "editorMode": "code", | |
| "format": "time_series", | |
| "rawQuery": true, | |
| "rawSql": "SELECT\n time,\n country,\n avg(wind_speed)\nFROM\n wind_data\nWHERE\n time >= $__timeFrom\n AND time <= $__timeTo\n AND country IN (${country:singlequote})\nGROUP BY\n country,\n time\nORDER BY\n time,\n country", | |
| "refId": "A", | |
| "sql": { | |
| "columns": [ | |
| { | |
| "parameters": [ | |
| { | |
| "name": "time", | |
| "type": "functionParameter" | |
| } | |
| ], | |
| "type": "function" | |
| }, | |
| { | |
| "parameters": [ | |
| { | |
| "name": "wind_speed", | |
| "type": "functionParameter" | |
| } | |
| ], | |
| "type": "function" | |
| } | |
| ], | |
| "groupBy": [ | |
| { | |
| "property": { | |
| "name": "city", | |
| "type": "string" | |
| }, | |
| "type": "groupBy" | |
| } | |
| ] | |
| }, | |
| "table": "wind_data" | |
| } | |
| ], | |
| "title": "Average Country Wind Speed (km/h)", | |
| "type": "timeseries" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "influxdb", | |
| "uid": "${datasource}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "palette-classic" | |
| }, | |
| "custom": { | |
| "axisBorderShow": false, | |
| "axisCenteredZero": false, | |
| "axisColorMode": "text", | |
| "axisLabel": "", | |
| "axisPlacement": "auto", | |
| "barAlignment": 0, | |
| "barWidthFactor": 0.6, | |
| "drawStyle": "line", | |
| "fillOpacity": 0, | |
| "gradientMode": "none", | |
| "hideFrom": { | |
| "legend": false, | |
| "tooltip": false, | |
| "viz": false | |
| }, | |
| "insertNulls": false, | |
| "lineInterpolation": "linear", | |
| "lineWidth": 1, | |
| "pointSize": 5, | |
| "scaleDistribution": { | |
| "type": "linear" | |
| }, | |
| "showPoints": "auto", | |
| "showValues": false, | |
| "spanNulls": false, | |
| "stacking": { | |
| "group": "A", | |
| "mode": "none" | |
| }, | |
| "thresholdsStyle": { | |
| "mode": "off" | |
| } | |
| }, | |
| "displayName": "${__field.labels[\"country\"]}", | |
| "mappings": [], | |
| "max": 360, | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| }, | |
| "unit": "degree" | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 12, | |
| "x": 12, | |
| "y": 2 | |
| }, | |
| "id": 6, | |
| "options": { | |
| "legend": { | |
| "calcs": [], | |
| "displayMode": "list", | |
| "placement": "bottom", | |
| "showLegend": true | |
| }, | |
| "tooltip": { | |
| "hideZeros": false, | |
| "mode": "single", | |
| "sort": "none" | |
| } | |
| }, | |
| "pluginVersion": "12.2.0", | |
| "targets": [ | |
| { | |
| "dataset": "iox", | |
| "datasource": { | |
| "type": "influxdb", | |
| "uid": "${datasource}" | |
| }, | |
| "editorMode": "code", | |
| "format": "time_series", | |
| "rawQuery": true, | |
| "rawSql": "SELECT\n time,\n country,\n avg(wind_direction)\nFROM\n wind_data\nWHERE\n time >= $__timeFrom\n AND time <= $__timeTo\n AND country IN (${country:singlequote})\nGROUP BY\n country,\n time\nORDER BY\n time,\n country", | |
| "refId": "A", | |
| "sql": { | |
| "columns": [ | |
| { | |
| "parameters": [ | |
| { | |
| "name": "time", | |
| "type": "functionParameter" | |
| } | |
| ], | |
| "type": "function" | |
| }, | |
| { | |
| "parameters": [ | |
| { | |
| "name": "wind_speed", | |
| "type": "functionParameter" | |
| } | |
| ], | |
| "type": "function" | |
| } | |
| ], | |
| "groupBy": [ | |
| { | |
| "property": { | |
| "name": "city", | |
| "type": "string" | |
| }, | |
| "type": "groupBy" | |
| } | |
| ] | |
| }, | |
| "table": "wind_data" | |
| } | |
| ], | |
| "title": "Average Country Wind Direction (deg)", | |
| "type": "timeseries" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "influxdb", | |
| "uid": "${datasource}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "palette-classic" | |
| }, | |
| "custom": { | |
| "axisBorderShow": false, | |
| "axisCenteredZero": false, | |
| "axisColorMode": "text", | |
| "axisLabel": "", | |
| "axisPlacement": "auto", | |
| "barAlignment": 0, | |
| "barWidthFactor": 0.6, | |
| "drawStyle": "line", | |
| "fillOpacity": 0, | |
| "gradientMode": "none", | |
| "hideFrom": { | |
| "legend": false, | |
| "tooltip": false, | |
| "viz": false | |
| }, | |
| "insertNulls": false, | |
| "lineInterpolation": "linear", | |
| "lineWidth": 1, | |
| "pointSize": 5, | |
| "scaleDistribution": { | |
| "type": "linear" | |
| }, | |
| "showPoints": "auto", | |
| "showValues": false, | |
| "spanNulls": false, | |
| "stacking": { | |
| "group": "A", | |
| "mode": "none" | |
| }, | |
| "thresholdsStyle": { | |
| "mode": "off" | |
| } | |
| }, | |
| "displayName": "${__field.labels[\"county\"]}", | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| }, | |
| "unit": "velocitykmh" | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 12, | |
| "x": 0, | |
| "y": 10 | |
| }, | |
| "id": 3, | |
| "options": { | |
| "legend": { | |
| "calcs": [], | |
| "displayMode": "list", | |
| "placement": "bottom", | |
| "showLegend": true | |
| }, | |
| "tooltip": { | |
| "hideZeros": false, | |
| "mode": "single", | |
| "sort": "none" | |
| } | |
| }, | |
| "pluginVersion": "12.2.0", | |
| "targets": [ | |
| { | |
| "dataset": "iox", | |
| "datasource": { | |
| "type": "influxdb", | |
| "uid": "${datasource}" | |
| }, | |
| "editorMode": "code", | |
| "format": "time_series", | |
| "rawQuery": true, | |
| "rawSql": "SELECT\n time,\n county,\n avg(wind_speed)\nFROM\n wind_data\nWHERE\n time >= $__timeFrom\n AND time <= $__timeTo\n AND country IN (${country:singlequote})\n AND CASE\n WHEN 'All' IN (${county:singlequote}) THEN TRUE\n ELSE county IN (${county:singlequote})\n END\nGROUP BY\n county,\n time\nORDER BY\n time,\n county", | |
| "refId": "A", | |
| "sql": { | |
| "columns": [ | |
| { | |
| "parameters": [ | |
| { | |
| "name": "time", | |
| "type": "functionParameter" | |
| } | |
| ], | |
| "type": "function" | |
| }, | |
| { | |
| "parameters": [ | |
| { | |
| "name": "wind_speed", | |
| "type": "functionParameter" | |
| } | |
| ], | |
| "type": "function" | |
| } | |
| ], | |
| "groupBy": [ | |
| { | |
| "property": { | |
| "name": "city", | |
| "type": "string" | |
| }, | |
| "type": "groupBy" | |
| } | |
| ] | |
| }, | |
| "table": "wind_data" | |
| } | |
| ], | |
| "title": "Average Wind Speed per County (km/h)", | |
| "type": "timeseries" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "influxdb", | |
| "uid": "${datasource}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "palette-classic" | |
| }, | |
| "custom": { | |
| "axisBorderShow": false, | |
| "axisCenteredZero": false, | |
| "axisColorMode": "text", | |
| "axisLabel": "", | |
| "axisPlacement": "auto", | |
| "barAlignment": 0, | |
| "barWidthFactor": 0.6, | |
| "drawStyle": "line", | |
| "fillOpacity": 0, | |
| "gradientMode": "none", | |
| "hideFrom": { | |
| "legend": false, | |
| "tooltip": false, | |
| "viz": false | |
| }, | |
| "insertNulls": false, | |
| "lineInterpolation": "linear", | |
| "lineWidth": 1, | |
| "pointSize": 5, | |
| "scaleDistribution": { | |
| "type": "linear" | |
| }, | |
| "showPoints": "auto", | |
| "showValues": false, | |
| "spanNulls": false, | |
| "stacking": { | |
| "group": "A", | |
| "mode": "none" | |
| }, | |
| "thresholdsStyle": { | |
| "mode": "off" | |
| } | |
| }, | |
| "displayName": "${__field.labels[\"county\"]}", | |
| "mappings": [], | |
| "max": 360, | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| }, | |
| "unit": "degree" | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 12, | |
| "x": 12, | |
| "y": 10 | |
| }, | |
| "id": 4, | |
| "options": { | |
| "legend": { | |
| "calcs": [], | |
| "displayMode": "list", | |
| "placement": "bottom", | |
| "showLegend": true | |
| }, | |
| "tooltip": { | |
| "hideZeros": false, | |
| "mode": "single", | |
| "sort": "none" | |
| } | |
| }, | |
| "pluginVersion": "12.2.0", | |
| "targets": [ | |
| { | |
| "dataset": "iox", | |
| "datasource": { | |
| "type": "influxdb", | |
| "uid": "${datasource}" | |
| }, | |
| "editorMode": "code", | |
| "format": "time_series", | |
| "rawQuery": true, | |
| "rawSql": "SELECT\n time,\n county,\n avg(wind_direction)\nFROM\n wind_data\nWHERE\n time >= $__timeFrom\n AND time <= $__timeTo\n AND country IN (${country:singlequote})\n AND CASE\n WHEN 'All' IN (${county:singlequote}) THEN TRUE\n ELSE county IN (${county:singlequote})\n END\nGROUP BY\n county,\n time\nORDER BY\n time,\n county", | |
| "refId": "A", | |
| "sql": { | |
| "columns": [ | |
| { | |
| "parameters": [ | |
| { | |
| "name": "time", | |
| "type": "functionParameter" | |
| } | |
| ], | |
| "type": "function" | |
| }, | |
| { | |
| "parameters": [ | |
| { | |
| "name": "wind_speed", | |
| "type": "functionParameter" | |
| } | |
| ], | |
| "type": "function" | |
| } | |
| ], | |
| "groupBy": [ | |
| { | |
| "property": { | |
| "name": "city", | |
| "type": "string" | |
| }, | |
| "type": "groupBy" | |
| } | |
| ] | |
| }, | |
| "table": "wind_data" | |
| } | |
| ], | |
| "title": "Average Wind Direction per County (deg)", | |
| "type": "timeseries" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "influxdb", | |
| "uid": "${datasource}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "palette-classic" | |
| }, | |
| "custom": { | |
| "axisBorderShow": false, | |
| "axisCenteredZero": false, | |
| "axisColorMode": "text", | |
| "axisLabel": "", | |
| "axisPlacement": "auto", | |
| "barAlignment": 0, | |
| "barWidthFactor": 0.6, | |
| "drawStyle": "line", | |
| "fillOpacity": 0, | |
| "gradientMode": "none", | |
| "hideFrom": { | |
| "legend": false, | |
| "tooltip": false, | |
| "viz": false | |
| }, | |
| "insertNulls": false, | |
| "lineInterpolation": "linear", | |
| "lineWidth": 1, | |
| "pointSize": 5, | |
| "scaleDistribution": { | |
| "type": "linear" | |
| }, | |
| "showPoints": "auto", | |
| "showValues": false, | |
| "spanNulls": false, | |
| "stacking": { | |
| "group": "A", | |
| "mode": "none" | |
| }, | |
| "thresholdsStyle": { | |
| "mode": "off" | |
| } | |
| }, | |
| "displayName": "${__field.labels[\"city\"]}", | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| }, | |
| "unit": "velocitykmh" | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 12, | |
| "x": 0, | |
| "y": 18 | |
| }, | |
| "id": 1, | |
| "options": { | |
| "legend": { | |
| "calcs": [], | |
| "displayMode": "list", | |
| "placement": "bottom", | |
| "showLegend": true | |
| }, | |
| "tooltip": { | |
| "hideZeros": false, | |
| "mode": "single", | |
| "sort": "none" | |
| } | |
| }, | |
| "pluginVersion": "12.2.0", | |
| "targets": [ | |
| { | |
| "dataset": "iox", | |
| "datasource": { | |
| "type": "influxdb", | |
| "uid": "${datasource}" | |
| }, | |
| "editorMode": "code", | |
| "format": "time_series", | |
| "rawQuery": true, | |
| "rawSql": "SELECT\n time,\n city,\n wind_speed\nFROM\n wind_data\nWHERE\n time >= $__timeFrom\n AND time <= $__timeTo\n AND country IN (${country:singlequote})\n AND CASE\n WHEN 'All' IN (${county:singlequote}) THEN TRUE\n ELSE county IN (${county:singlequote})\n END\n AND CASE\n WHEN 'All' IN (${city:singlequote}) THEN TRUE\n ELSE city IN (${city:singlequote})\n END\nORDER BY\n time,\n city", | |
| "refId": "A", | |
| "sql": { | |
| "columns": [ | |
| { | |
| "parameters": [ | |
| { | |
| "name": "time", | |
| "type": "functionParameter" | |
| } | |
| ], | |
| "type": "function" | |
| }, | |
| { | |
| "parameters": [ | |
| { | |
| "name": "wind_speed", | |
| "type": "functionParameter" | |
| } | |
| ], | |
| "type": "function" | |
| } | |
| ], | |
| "groupBy": [ | |
| { | |
| "property": { | |
| "name": "city", | |
| "type": "string" | |
| }, | |
| "type": "groupBy" | |
| } | |
| ] | |
| }, | |
| "table": "wind_data" | |
| } | |
| ], | |
| "title": "Wind Speed per City (km/h)", | |
| "type": "timeseries" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "influxdb", | |
| "uid": "${datasource}" | |
| }, | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "palette-classic" | |
| }, | |
| "custom": { | |
| "axisBorderShow": false, | |
| "axisCenteredZero": false, | |
| "axisColorMode": "text", | |
| "axisLabel": "", | |
| "axisPlacement": "auto", | |
| "barAlignment": 0, | |
| "barWidthFactor": 0.6, | |
| "drawStyle": "line", | |
| "fillOpacity": 0, | |
| "gradientMode": "none", | |
| "hideFrom": { | |
| "legend": false, | |
| "tooltip": false, | |
| "viz": false | |
| }, | |
| "insertNulls": false, | |
| "lineInterpolation": "linear", | |
| "lineWidth": 1, | |
| "pointSize": 5, | |
| "scaleDistribution": { | |
| "type": "linear" | |
| }, | |
| "showPoints": "auto", | |
| "showValues": false, | |
| "spanNulls": false, | |
| "stacking": { | |
| "group": "A", | |
| "mode": "none" | |
| }, | |
| "thresholdsStyle": { | |
| "mode": "off" | |
| } | |
| }, | |
| "displayName": "${__field.labels[\"city\"]}", | |
| "mappings": [], | |
| "max": 360, | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 80 | |
| } | |
| ] | |
| }, | |
| "unit": "degree" | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 12, | |
| "x": 12, | |
| "y": 18 | |
| }, | |
| "id": 2, | |
| "options": { | |
| "legend": { | |
| "calcs": [], | |
| "displayMode": "list", | |
| "placement": "bottom", | |
| "showLegend": true | |
| }, | |
| "tooltip": { | |
| "hideZeros": false, | |
| "mode": "single", | |
| "sort": "none" | |
| } | |
| }, | |
| "pluginVersion": "12.2.0", | |
| "targets": [ | |
| { | |
| "dataset": "iox", | |
| "datasource": { | |
| "type": "influxdb", | |
| "uid": "${datasource}" | |
| }, | |
| "editorMode": "code", | |
| "format": "time_series", | |
| "rawQuery": true, | |
| "rawSql": "SELECT\n time,\n city,\n wind_direction\nFROM\n wind_data\nWHERE\n time >= $__timeFrom\n AND time <= $__timeTo\n AND country IN (${country:singlequote})\n AND CASE\n WHEN 'All' IN (${county:singlequote}) THEN TRUE\n ELSE county IN (${county:singlequote})\n END\n AND CASE\n WHEN 'All' IN (${city:singlequote}) THEN TRUE\n ELSE city IN (${city:singlequote})\n END\nORDER BY\n time,\n city", | |
| "refId": "A", | |
| "sql": { | |
| "columns": [ | |
| { | |
| "parameters": [ | |
| { | |
| "name": "time", | |
| "type": "functionParameter" | |
| } | |
| ], | |
| "type": "function" | |
| }, | |
| { | |
| "parameters": [ | |
| { | |
| "name": "wind_speed", | |
| "type": "functionParameter" | |
| } | |
| ], | |
| "type": "function" | |
| } | |
| ], | |
| "groupBy": [ | |
| { | |
| "property": { | |
| "name": "city", | |
| "type": "string" | |
| }, | |
| "type": "groupBy" | |
| } | |
| ] | |
| }, | |
| "table": "wind_data" | |
| } | |
| ], | |
| "title": "Wind Direction per City (deg)", | |
| "type": "timeseries" | |
| } | |
| ], | |
| "preload": false, | |
| "schemaVersion": 42, | |
| "tags": [], | |
| "templating": { | |
| "list": [ | |
| { | |
| "current": { | |
| "text": "InfluxDB 3 (Local - SQL - test-db)", | |
| "value": "cecs4zlypetxcf" | |
| }, | |
| "description": "Select the InfluxDB 3 data source (database) to query", | |
| "label": "Data Source", | |
| "name": "datasource", | |
| "options": [], | |
| "query": "influxdb", | |
| "refresh": 1, | |
| "regex": "", | |
| "type": "datasource" | |
| }, | |
| { | |
| "allowCustomValue": false, | |
| "current": { | |
| "text": "Estonia", | |
| "value": "Estonia" | |
| }, | |
| "datasource": { | |
| "type": "influxdb", | |
| "uid": "${datasource}" | |
| }, | |
| "definition": "SELECT country FROM distinct_cache('wind_data', 'wind_locations')", | |
| "includeAll": false, | |
| "label": "Country", | |
| "name": "country", | |
| "options": [], | |
| "query": { | |
| "query": "SELECT country FROM distinct_cache('wind_data', 'wind_locations')", | |
| "refId": "InfluxVariableQueryEditor-VariableQuery" | |
| }, | |
| "refresh": 1, | |
| "regex": "", | |
| "sort": 1, | |
| "type": "query" | |
| }, | |
| { | |
| "allValue": "'All'", | |
| "allowCustomValue": false, | |
| "current": { | |
| "text": "All", | |
| "value": "$__all" | |
| }, | |
| "datasource": { | |
| "type": "influxdb", | |
| "uid": "${datasource}" | |
| }, | |
| "definition": "SELECT county FROM distinct_cache('wind_data', 'wind_locations') WHERE country IN (${country:singlequote})", | |
| "includeAll": true, | |
| "label": "County", | |
| "multi": true, | |
| "name": "county", | |
| "options": [], | |
| "query": { | |
| "query": "SELECT county FROM distinct_cache('wind_data', 'wind_locations') WHERE country IN (${country:singlequote})", | |
| "refId": "InfluxVariableQueryEditor-VariableQuery" | |
| }, | |
| "refresh": 1, | |
| "regex": "", | |
| "sort": 1, | |
| "type": "query" | |
| }, | |
| { | |
| "allValue": "'All'", | |
| "allowCustomValue": false, | |
| "current": { | |
| "text": "All", | |
| "value": "$__all" | |
| }, | |
| "datasource": { | |
| "type": "influxdb", | |
| "uid": "${datasource}" | |
| }, | |
| "definition": "SELECT city FROM distinct_cache('wind_data', 'wind_locations') WHERE country IN (${country:singlequote}) AND county IN (${county:singlequote})", | |
| "includeAll": true, | |
| "label": "City", | |
| "multi": true, | |
| "name": "city", | |
| "options": [], | |
| "query": { | |
| "query": "SELECT city FROM distinct_cache('wind_data', 'wind_locations') WHERE country IN (${country:singlequote}) AND county IN (${county:singlequote})", | |
| "refId": "InfluxVariableQueryEditor-VariableQuery" | |
| }, | |
| "refresh": 1, | |
| "regex": "", | |
| "sort": 1, | |
| "type": "query" | |
| } | |
| ] | |
| }, | |
| "time": { | |
| "from": "2025-10-01T00:00:00.000Z", | |
| "to": "2025-10-01T23:59:59.000Z" | |
| }, | |
| "timepicker": {}, | |
| "timezone": "utc", | |
| "title": "EU Wind Readings", | |
| "uid": "fecs5l94roykgf", | |
| "version": 14 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment