Grafana dashboard: Bubble Breaker
Description: Bringing you the sentiments around news topics


{
  "__inputs": [
    {
      "name": "DS_POSTGRESQL",
      "label": "TimescaleDB",
      "description": "",
      "type": "datasource",
      "pluginId": "postgres",
      "pluginName": "PostgreSQL"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.2.5"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "panel",
      "id": "heatmap",
      "name": "Heatmap",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "postgres",
      "name": "PostgreSQL",
      "version": "1.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 10452,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1561608202439,
  "links": [],
  "panels": [
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_POSTGRESQL}",
      "description": "Tone score from all mentions of the theme.",
      "fill": 1,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "id": 4,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": true,
        "values": true
      },
      "lines": false,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {},
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  --\"time\" AS \"time\",\n  $__timeGroupAlias(\"time\",'24h'),\n  --\"theme\",\n  sum(bin_vals[1]) AS \"Undeflow\",\n  sum(bin_vals[2]) AS \"-10\",\n  sum(bin_vals[3]) AS \"-8\",\n  sum(bin_vals[4]) AS \"-6\",\n  sum(bin_vals[5]) AS \"-4\",\n  sum(bin_vals[6]) AS \"-2\",\n  sum(bin_vals[7]) AS \"0\",\n  sum(bin_vals[8]) AS \"2\",\n  sum(bin_vals[9]) AS \"4\",\n  sum(bin_vals[10]) AS \"6\",\n  sum(bin_vals[11]) AS \"8\",\n  sum(bin_vals[12]) AS \"Overflow\"\n  \n  --\"avg\"\n  --CAST(bin_vals[offset(1)] AS int)\nFROM bubblebreaker_schema.tones_table_v2\nWHERE\n--$__timeFilter(\"time\") \n--AND \ntheme='$Theme'\nGROUP BY time, theme",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Tone Distribution",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "series",
        "name": null,
        "show": true,
        "values": [
          "total"
        ]
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cards": {
        "cardPadding": null,
        "cardRound": null
      },
      "color": {
        "cardColor": "#b4ff00",
        "colorScale": "sqrt",
        "colorScheme": "interpolateOranges",
        "exponent": 0.5,
        "mode": "opacity"
      },
      "dataFormat": "tsbuckets",
      "datasource": "${DS_POSTGRESQL}",
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 8
      },
      "heatmap": {},
      "hideZeroBuckets": false,
      "highlightCards": true,
      "id": 2,
      "legend": {
        "show": true
      },
      "links": [],
      "options": {},
      "reverseYBuckets": false,
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  --\"time\" AS \"time\",\n  $__timeGroupAlias(\"time\",'24h'),\n  bin_vals[1] AS \"-12\",\n  bin_vals[2] AS \"-10\",\n  bin_vals[3] AS \"-8\",\n  bin_vals[4] AS \"-6\",\n  bin_vals[5] AS \"-4\",\n  bin_vals[6] AS \"-2\",\n  bin_vals[7] AS \"0\",\n  bin_vals[8] AS \"2\",\n  bin_vals[9] AS \"4\",\n  bin_vals[10] AS \"6\",\n  bin_vals[11] AS \"8\",\n  bin_vals[12] AS \"10\"\n  \n  --\"avg\"\n  --CAST(bin_vals[offset(1)] AS int)\nFROM bubblebreaker_schema.tones_table_v2\nWHERE\n$__timeFilter(\"time\") \nAND \ntheme='$Theme'\nORDER BY 1",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Tone Score Evolution",
      "tooltip": {
        "show": true,
        "showHistogram": false
      },
      "transparent": true,
      "type": "heatmap",
      "xAxis": {
        "show": true
      },
      "xBucketNumber": null,
      "xBucketSize": null,
      "yAxis": {
        "decimals": null,
        "format": "short",
        "logBase": 1,
        "max": null,
        "min": null,
        "show": true,
        "splitFactor": null
      },
      "yBucketBound": "lower",
      "yBucketNumber": null,
      "yBucketSize": null
    }
  ],
  "refresh": false,
  "schemaVersion": 18,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_POSTGRESQL}",
        "definition": "SELECT  theme FROM bubblebreaker_schema.tones_table_v2 GROUP BY theme ORDER BY count(*)",
        "hide": 0,
        "includeAll": false,
        "label": "Theme",
        "multi": false,
        "name": "Theme",
        "options": [],
        "query": "SELECT  theme FROM bubblebreaker_schema.tones_table_v2 GROUP BY theme ORDER BY count(*)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "2017-06-28T00:36:25.474Z",
    "to": "2017-08-15T23:42:10.976Z"
  },
  "timepicker": {
    "hidden": false,
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "Bubble Breaker",
  "uid": "-Cr2D24Zk",
  "version": 2,
  "description": "Bringing you the sentiments around news topics"
}