Grafana dashboard: Covid-19
Description: Covid 19 spread using daily report of ECDC.

This dashboard shows data about Covid-19 using the daily report published by [European Centre for Disease Prevention and Control (ECDC)](https://www.ecdc.europa.eu/en/publications-data/download-todays-data-geographic-distribution-covid-19-cases-worldwide).

You can find more details in my public GitHub repository [nick990/grafana-dashboards](https://github.com/nick990/grafana-dashboards) in folder `covid19-global` (TAG `v1.0.1`).

## Quickstart
Follow the instructions in **Readme** in order to create the DB SQL and to populate it.
You can find sample data in `data/sample.csv`.

{
  "__inputs": [
    {
      "name": "DS_MICROSOFT_SQL SERVER",
      "label": "Microsoft SQL Server",
      "description": "",
      "type": "datasource",
      "pluginId": "mssql",
      "pluginName": "Microsoft SQL Server"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.7.1"
    },
    {
      "type": "panel",
      "id": "grafana-worldmap-panel",
      "name": "Worldmap Panel",
      "version": "0.2.1"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "mssql",
      "name": "Microsoft SQL Server",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "$$hashKey": "object:519",
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 12039,
  "graphTooltip": 2,
  "id": null,
  "iteration": 1586812338626,
  "links": [],
  "panels": [
    {
      "collapsed": true,
      "datasource": "${DS_MICROSOFT_SQL SERVER}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 19,
      "panels": [
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "#299c46",
            "rgba(237, 129, 40, 0.89)",
            "#d44a3a"
          ],
          "datasource": "${DS_MICROSOFT_SQL SERVER}",
          "format": "none",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 9,
            "w": 9,
            "x": 0,
            "y": 1
          },
          "id": 13,
          "interval": null,
          "links": [],
          "mappingType": 1,
          "mappingTypes": [
            {
              "$$hashKey": "object:201",
              "name": "value to text",
              "value": 1
            },
            {
              "$$hashKey": "object:202",
              "name": "range to text",
              "value": 2
            }
          ],
          "maxDataPoints": 100,
          "nullPointMode": "connected",
          "nullText": null,
          "postfix": "",
          "postfixFontSize": "50%",
          "prefix": "Total Cases",
          "prefixFontSize": "100%",
          "rangeMaps": [
            {
              "from": "null",
              "text": "N/A",
              "to": "null"
            }
          ],
          "sparkline": {
            "fillColor": "rgba(31, 118, 189, 0.18)",
            "full": true,
            "lineColor": "rgb(31, 120, 193)",
            "show": true,
            "ymax": null,
            "ymin": null
          },
          "tableColumn": "",
          "targets": [
            {
              "alias": "",
              "format": "table",
              "rawSql": "select\nts as time,\nsum(cases)\nfrom daily_global\ngroup by ts\norder by ts",
              "refId": "A"
            }
          ],
          "thresholds": "",
          "timeFrom": null,
          "timeShift": null,
          "title": "",
          "type": "singlestat",
          "valueFontSize": "100%",
          "valueMaps": [
            {
              "$$hashKey": "object:204",
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "total"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "#299c46",
            "rgba(237, 129, 40, 0.89)",
            "#d44a3a"
          ],
          "datasource": "${DS_MICROSOFT_SQL SERVER}",
          "format": "none",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 9,
            "w": 9,
            "x": 9,
            "y": 1
          },
          "id": 14,
          "interval": null,
          "links": [],
          "mappingType": 1,
          "mappingTypes": [
            {
              "$$hashKey": "object:201",
              "name": "value to text",
              "value": 1
            },
            {
              "$$hashKey": "object:202",
              "name": "range to text",
              "value": 2
            }
          ],
          "maxDataPoints": 100,
          "nullPointMode": "connected",
          "nullText": null,
          "postfix": "",
          "postfixFontSize": "50%",
          "prefix": "Total Deaths",
          "prefixFontSize": "100%",
          "rangeMaps": [
            {
              "from": "null",
              "text": "N/A",
              "to": "null"
            }
          ],
          "sparkline": {
            "fillColor": "rgba(31, 118, 189, 0.18)",
            "full": true,
            "lineColor": "rgb(31, 120, 193)",
            "show": true,
            "ymax": null,
            "ymin": null
          },
          "tableColumn": "",
          "targets": [
            {
              "alias": "",
              "format": "table",
              "rawSql": "select\nts as time,\nsum(deaths)\nfrom daily_global\ngroup by ts\norder by ts",
              "refId": "A"
            }
          ],
          "thresholds": "",
          "timeFrom": null,
          "timeShift": null,
          "title": "",
          "type": "singlestat",
          "valueFontSize": "100%",
          "valueMaps": [
            {
              "$$hashKey": "object:204",
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "total"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "#299c46",
            "rgba(237, 129, 40, 0.89)",
            "#d44a3a"
          ],
          "datasource": "${DS_MICROSOFT_SQL SERVER}",
          "decimals": 2,
          "format": "percent",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 9,
            "w": 6,
            "x": 18,
            "y": 1
          },
          "id": 15,
          "interval": null,
          "links": [],
          "mappingType": 1,
          "mappingTypes": [
            {
              "$$hashKey": "object:201",
              "name": "value to text",
              "value": 1
            },
            {
              "$$hashKey": "object:202",
              "name": "range to text",
              "value": 2
            }
          ],
          "maxDataPoints": 100,
          "nullPointMode": "connected",
          "nullText": null,
          "postfix": "",
          "postfixFontSize": "50%",
          "prefix": "Mortality Rate",
          "prefixFontSize": "100%",
          "rangeMaps": [
            {
              "from": "null",
              "text": "N/A",
              "to": "null"
            }
          ],
          "sparkline": {
            "fillColor": "rgba(31, 118, 189, 0.18)",
            "full": false,
            "lineColor": "rgb(31, 120, 193)",
            "show": true,
            "ymax": null,
            "ymin": null
          },
          "tableColumn": "",
          "targets": [
            {
              "alias": "",
              "format": "table",
              "rawSql": "select\nsum(deaths) * 100.0 / sum(cases)\nfrom daily_global\n",
              "refId": "A"
            }
          ],
          "thresholds": "",
          "timeFrom": null,
          "timeShift": null,
          "title": "",
          "type": "singlestat",
          "valueFontSize": "100%",
          "valueMaps": [
            {
              "$$hashKey": "object:204",
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "current"
        },
        {
          "circleMaxSize": "40",
          "circleMinSize": "4",
          "colors": [
            "#F2495C",
            "#F2495C"
          ],
          "datasource": "${DS_MICROSOFT_SQL SERVER}",
          "decimals": 0,
          "esMetric": "Count",
          "gridPos": {
            "h": 22,
            "w": 24,
            "x": 0,
            "y": 10
          },
          "hideEmpty": false,
          "hideZero": false,
          "id": 17,
          "initialZoom": "3",
          "locationData": "countries",
          "mapCenter": "Europe",
          "mapCenterLatitude": 46,
          "mapCenterLongitude": 14,
          "maxDataPoints": 1,
          "mouseWheelZoom": false,
          "showLegend": false,
          "stickyLabels": false,
          "tableQueryOptions": {
            "geohashField": "geohash",
            "latitudeField": "latitude",
            "longitudeField": "longitude",
            "metricField": "metric",
            "queryType": "geohash"
          },
          "targets": [
            {
              "alias": "",
              "format": "time_series",
              "rawSql": "SELECT\n  ts as time,\n  sum(cases) as value,\n  geoId\nFROM\n  daily_global\ngroup by geoId,ts",
              "refId": "A"
            }
          ],
          "thresholds": "",
          "timeFrom": null,
          "timeShift": null,
          "title": "Total Cases",
          "type": "grafana-worldmap-panel",
          "unitPlural": "",
          "unitSingle": "",
          "unitSingular": "",
          "valueName": "total"
        },
        {
          "columns": [],
          "datasource": "${DS_MICROSOFT_SQL SERVER}",
          "fontSize": "150%",
          "gridPos": {
            "h": 28,
            "w": 13,
            "x": 0,
            "y": 32
          },
          "id": 7,
          "pageSize": null,
          "showHeader": true,
          "sort": {
            "col": 1,
            "desc": true
          },
          "styles": [
            {
              "$$hashKey": "object:320",
              "alias": "Time",
              "align": "auto",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "date"
            },
            {
              "$$hashKey": "object:581",
              "alias": "",
              "align": "auto",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 0,
              "mappingType": 1,
              "pattern": "",
              "thresholds": [],
              "type": "number",
              "unit": "none"
            },
            {
              "$$hashKey": "object:747",
              "alias": "",
              "align": "auto",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "Mortality Rate",
              "thresholds": [],
              "type": "number",
              "unit": "percent"
            }
          ],
          "targets": [
            {
              "alias": "",
              "format": "table",
              "rawSql": "select\n  REPLACE(country,'_',' ') as Country,\n  sum(cases) as Cases,\n  sum(deaths) as Deaths,\n  sum(deaths) * 100.0 / sum(cases) as \"Mortality Rate\"\nfrom daily_global\ngroup by country \norder by cases desc",
              "refId": "A"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Countries Details",
          "transform": "table",
          "type": "table"
        },
        {
          "datasource": "${DS_MICROSOFT_SQL SERVER}",
          "gridPos": {
            "h": 14,
            "w": 11,
            "x": 13,
            "y": 32
          },
          "id": 3,
          "options": {
            "displayMode": "gradient",
            "fieldOptions": {
              "calcs": [
                "sum"
              ],
              "defaults": {
                "mappings": [],
                "thresholds": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "#EAB839",
                      "value": 50000
                    },
                    {
                      "color": "red",
                      "value": 150000
                    }
                  ]
                }
              },
              "limit": 10,
              "overrides": [],
              "values": true
            },
            "orientation": "horizontal",
            "showUnfilled": true
          },
          "pluginVersion": "6.7.1",
          "targets": [
            {
              "alias": "",
              "format": "time_series",
              "rawSql": "\nselect\n1586004872 as time,\nreplace(country,'_',' '),\nsum(cases) as cases\nfrom (\n\tselect\n\tts,\n\tsum(cases) as cases,\n\tcountry\n\tfrom daily_global\n\tgroup by country,ts\n\t) as a\ngroup by country\norder by cases desc\n\n",
              "refId": "A"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Top 10 Country by Cases",
          "type": "bargauge"
        },
        {
          "datasource": "${DS_MICROSOFT_SQL SERVER}",
          "gridPos": {
            "h": 14,
            "w": 11,
            "x": 13,
            "y": 46
          },
          "id": 4,
          "options": {
            "displayMode": "gradient",
            "fieldOptions": {
              "calcs": [
                "sum"
              ],
              "defaults": {
                "mappings": [],
                "thresholds": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "#EAB839",
                      "value": 5000
                    },
                    {
                      "color": "red",
                      "value": 10000
                    }
                  ]
                }
              },
              "limit": 10,
              "overrides": [],
              "values": true
            },
            "orientation": "horizontal",
            "showUnfilled": true
          },
          "pluginVersion": "6.7.1",
          "targets": [
            {
              "alias": "",
              "format": "time_series",
              "rawSql": "\nselect\n1586004872 as time,\nreplace(country,'_',' '),\nsum(deaths) as deaths\nfrom (\n\tselect\n\tts,\n\tsum(deaths) as deaths,\n\tcountry\n\tfrom daily_global\n\tgroup by country,ts\n\t) as a\ngroup by country\norder by deaths desc\n\n",
              "refId": "A"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Top 10 Country by Deaths",
          "type": "bargauge"
        }
      ],
      "title": "Global Data",
      "type": "row"
    },
    {
      "collapsed": true,
      "datasource": "${DS_MICROSOFT_SQL SERVER}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 1
      },
      "id": 32,
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_MICROSOFT_SQL SERVER}",
          "description": "",
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 16,
            "w": 12,
            "x": 0,
            "y": 2
          },
          "hiddenSeries": false,
          "id": 35,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": false,
            "max": true,
            "min": true,
            "rightSide": false,
            "show": true,
            "total": true,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "dataLinks": []
          },
          "percentage": false,
          "pluginVersion": "6.7.1",
          "pointradius": 1,
          "points": true,
          "renderer": "flot",
          "scopedVars": {
            "metric": {
              "selected": false,
              "text": "Cases",
              "value": "Cases"
            }
          },
          "seriesOverrides": [
            {
              "$$hashKey": "object:2147",
              "alias": "Moving AVG 5",
              "dashes": true,
              "fill": 0,
              "points": false
            },
            {
              "$$hashKey": "object:2148",
              "alias": "Moving AVG 30",
              "dashes": true,
              "fill": 0,
              "points": false
            },
            {
              "$$hashKey": "object:2149",
              "alias": "New Daily Deaths"
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "",
              "format": "time_series",
              "rawSql": "select\nsum(${metric:csv}) as \"New Daily ${metric:csv}\",\nts as time\nfrom daily_global\nwhere $__unixEpochFilter(ts/1000)\ngroup by ts\norder by ts",
              "refId": "A"
            },
            {
              "alias": "",
              "format": "time_series",
              "rawSql": "with T1 as (\n\tselect\n\t\tROW_NUMBER() OVER (ORDER BY ts ASC) RowNumber,\n\t\tcast(dateadd(second,ts/1000,'19700101') as date) as Date,\n\t\tsum(${metric:csv}) as ${metric:csv}\n\tfrom covid_data.dbo.daily_global dg\n\twhere $__unixEpochFilter(ts/1000)\n\tgroup by ts\n),\nT2 as (\n\tselect\n\tRowNumber,\n\tdate,\n\tavg(${metric:csv}) over (order by date asc rows 5 PRECEDING ) as MAVG\n\tfrom T1\n)\nselect\n\tdate as time,\n\tIIF(RowNumber > 4, MAVG, NULL) \"Moving AVG 5\"\nfrom T2\norder by date",
              "refId": "B"
            },
            {
              "alias": "",
              "format": "time_series",
              "rawSql": "with T1 as (\n\tselect\n\t\tROW_NUMBER() OVER (ORDER BY ts ASC) RowNumber,\n\t\tcast(dateadd(second,ts/1000,'19700101') as date) as Date,\n\t\tsum(${metric:csv}) as ${metric:csv}\n\tfrom covid_data.dbo.daily_global dg\n\twhere $__unixEpochFilter(ts/1000)\n\tgroup by ts\n),\nT2 as (\n\tselect\n\tRowNumber,\n\tdate,\n\tavg(${metric:csv}) over (order by date asc rows 30 PRECEDING ) as MAVG\n\tfrom T1\n)\nselect\n\tdate as time,\n\tIIF(RowNumber > 29, MAVG, NULL) \"Moving AVG 30\"\nfrom T2\norder by date",
              "refId": "C"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "New Daily $metric (Linear Scale)",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:2180",
              "format": "none",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "$$hashKey": "object:2181",
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_MICROSOFT_SQL SERVER}",
          "description": "",
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 16,
            "w": 12,
            "x": 12,
            "y": 2
          },
          "hiddenSeries": false,
          "id": 38,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": false,
            "max": true,
            "min": true,
            "rightSide": false,
            "show": true,
            "total": true,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "dataLinks": []
          },
          "percentage": false,
          "pluginVersion": "6.7.1",
          "pointradius": 1,
          "points": true,
          "renderer": "flot",
          "scopedVars": {
            "metric": {
              "selected": false,
              "text": "Cases",
              "value": "Cases"
            }
          },
          "seriesOverrides": [
            {
              "$$hashKey": "object:2147",
              "alias": "Moving AVG 5",
              "dashes": true,
              "fill": 0,
              "points": false
            },
            {
              "$$hashKey": "object:2148",
              "alias": "Moving AVG 30",
              "dashes": true,
              "fill": 0,
              "points": false
            },
            {
              "$$hashKey": "object:2149",
              "alias": "New Daily Deaths"
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "",
              "format": "time_series",
              "rawSql": "select\nsum(${metric:csv}) as \"New Daily ${metric:csv}\",\nts as time\nfrom daily_global\nwhere $__unixEpochFilter(ts/1000)\ngroup by ts\norder by ts",
              "refId": "A"
            },
            {
              "alias": "",
              "format": "time_series",
              "rawSql": "with T1 as (\n\tselect\n\t\tROW_NUMBER() OVER (ORDER BY ts ASC) RowNumber,\n\t\tcast(dateadd(second,ts/1000,'19700101') as date) as Date,\n\t\tsum(${metric:csv}) as ${metric:csv}\n\tfrom covid_data.dbo.daily_global dg\n\twhere $__unixEpochFilter(ts/1000)\n\tgroup by ts\n),\nT2 as (\n\tselect\n\tRowNumber,\n\tdate,\n\tavg(${metric:csv}) over (order by date asc rows 5 PRECEDING ) as MAVG\n\tfrom T1\n)\nselect\n\tdate as time,\n\tIIF(RowNumber > 4, MAVG, NULL) \"Moving AVG 5\"\nfrom T2\norder by date",
              "refId": "B"
            },
            {
              "alias": "",
              "format": "time_series",
              "rawSql": "with T1 as (\n\tselect\n\t\tROW_NUMBER() OVER (ORDER BY ts ASC) RowNumber,\n\t\tcast(dateadd(second,ts/1000,'19700101') as date) as Date,\n\t\tsum(${metric:csv}) as ${metric:csv}\n\tfrom covid_data.dbo.daily_global dg\n\twhere $__unixEpochFilter(ts/1000)\n\tgroup by ts\n),\nT2 as (\n\tselect\n\tRowNumber,\n\tdate,\n\tavg(${metric:csv}) over (order by date asc rows 30 PRECEDING ) as MAVG\n\tfrom T1\n)\nselect\n\tdate as time,\n\tIIF(RowNumber > 29, MAVG, NULL) \"Moving AVG 30\"\nfrom T2\norder by date",
              "refId": "C"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "New Daily ${metric:csv} (Logarithmic Scale)",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:2180",
              "format": "none",
              "label": null,
              "logBase": 10,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "$$hashKey": "object:2181",
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": true,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_MICROSOFT_SQL SERVER}",
          "description": "",
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 16,
            "w": 12,
            "x": 0,
            "y": 18
          },
          "hiddenSeries": false,
          "id": 43,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": false,
            "max": true,
            "min": true,
            "rightSide": false,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": false,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "dataLinks": []
          },
          "percentage": false,
          "pluginVersion": "6.7.1",
          "pointradius": 1,
          "points": false,
          "renderer": "flot",
          "scopedVars": {
            "metric": {
              "selected": false,
              "text": "Cases",
              "value": "Cases"
            }
          },
          "seriesOverrides": [
            {
              "alias": "Percentage Change",
              "bars": true,
              "lines": false,
              "yaxis": 2,
              "zindex": -3
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "",
              "format": "time_series",
              "hide": false,
              "rawSql": "with t1 as\n(\n\t\tselect\n\t\t\tsum(${metric:csv}) as ${metric:csv},\n\t\t\tts as time\n\t\tfrom daily_global\n\t\twhere $__unixEpochFilter(ts/1000)\n\t\tgroup by ts\n),\nt2 as\n(\n\tselect time,\n\t\t${metric:csv},\n\t\t LAG(${metric:csv},1) OVER (\n\t\t \tORDER BY time \n\t\t ) ${metric:csv}Prev\n\tfrom t1\n)\nselect\ntime,\n${metric:csv}-COALESCE (${metric:csv}Prev,0) as \"Daily Increase\"\nfrom t2\norder by time",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Daily Increase",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "none",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "percent",
              "label": "",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": true,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": true,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_MICROSOFT_SQL SERVER}",
          "description": "",
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 16,
            "w": 12,
            "x": 12,
            "y": 18
          },
          "hiddenSeries": false,
          "id": 49,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": false,
            "max": true,
            "min": true,
            "rightSide": false,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": false,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "dataLinks": []
          },
          "percentage": false,
          "pluginVersion": "6.7.1",
          "pointradius": 1,
          "points": false,
          "renderer": "flot",
          "scopedVars": {
            "metric": {
              "selected": false,
              "text": "Cases",
              "value": "Cases"
            }
          },
          "seriesOverrides": [
            {
              "alias": "Percentage Change",
              "bars": true,
              "lines": false,
              "yaxis": 1,
              "zindex": -3
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "",
              "format": "time_series",
              "rawSql": "with t1 as\n(\n\t\tselect\n\t\t\tsum(${metric:csv}) as ${metric:csv},\n\t\t\tcast(dateadd(second,ts/1000,'19700101') as date) as time\n\t\tfrom daily_global\n  where $__unixEpochFilter(ts/1000)\n\t\tgroup by ts\n),\nt2 as\n(\n\tselect time,\n\t\t${metric:csv},\n\t\t LAG(${metric:csv},1) OVER (\n\t\t \tORDER BY time \n\t\t ) ${metric:csv}Prev\n\tfrom t1\n)\nselect\ntime,\ncase\n\twhen \t${metric:csv}Prev is null then null\n\twhen\t${metric:csv}Prev = 0 then null\n\telse \t(${metric:csv}-${metric:csv}Prev)*100.0/${metric:csv}Prev\nend \"Percentage Change\"\nfrom t2\norder by time",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Percentage Change",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "percent",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "percent",
              "label": "",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ],
          "yaxis": {
            "align": true,
            "alignLevel": null
          }
        }
      ],
      "repeat": "metric",
      "title": "Daily $metric Details",
      "type": "row"
    },
    {
      "collapsed": true,
      "datasource": "${DS_MICROSOFT_SQL SERVER}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 3
      },
      "id": 56,
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_MICROSOFT_SQL SERVER}",
          "description": "",
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 16,
            "w": 12,
            "x": 0,
            "y": 4
          },
          "hiddenSeries": false,
          "id": 63,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": false,
            "max": true,
            "min": true,
            "rightSide": false,
            "show": true,
            "total": true,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "dataLinks": []
          },
          "percentage": false,
          "pluginVersion": "6.7.1",
          "pointradius": 1,
          "points": true,
          "renderer": "flot",
          "scopedVars": {
            "metric": {
              "selected": false,
              "text": "Cases",
              "value": "Cases"
            }
          },
          "seriesOverrides": [
            {
              "$$hashKey": "object:2147",
              "alias": "Moving AVG 5",
              "dashes": true,
              "fill": 0,
              "points": false
            },
            {
              "$$hashKey": "object:2148",
              "alias": "Moving AVG 30",
              "dashes": true,
              "fill": 0,
              "points": false
            },
            {
              "$$hashKey": "object:2149",
              "alias": "New Daily Deaths"
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "",
              "format": "time_series",
              "rawSql": "select\nsum(${metric:csv}) as \"New Daily ${metric:csv}\",\nts as time\nfrom daily_global\nwhere $__unixEpochFilter(ts/1000)\nand geoid = '$country'\ngroup by ts\norder by ts",
              "refId": "A"
            },
            {
              "alias": "",
              "format": "time_series",
              "rawSql": "with T1 as (\n\tselect\n\t\tROW_NUMBER() OVER (ORDER BY ts ASC) RowNumber,\n\t\tcast(dateadd(second,ts/1000,'19700101') as date) as Date,\n\t\tsum(${metric:csv}) as ${metric:csv}\n\tfrom covid_data.dbo.daily_global dg\n\twhere $__unixEpochFilter(ts/1000)\n\tand geoid = '$country'\n\tgroup by ts\n),\nT2 as (\n\tselect\n\tRowNumber,\n\tdate,\n\tavg(${metric:csv}) over (order by date asc rows 5 PRECEDING ) as MAVG\n\tfrom T1\n)\nselect\n\tdate as time,\n\tIIF(RowNumber > 4, MAVG, NULL) \"Moving AVG 5\"\nfrom T2\norder by date",
              "refId": "B"
            },
            {
              "alias": "",
              "format": "time_series",
              "rawSql": "with T1 as (\n\tselect\n\t\tROW_NUMBER() OVER (ORDER BY ts ASC) RowNumber,\n\t\tcast(dateadd(second,ts/1000,'19700101') as date) as Date,\n\t\tsum(${metric:csv}) as ${metric:csv}\n\tfrom covid_data.dbo.daily_global dg\n\twhere $__unixEpochFilter(ts/1000)\n\tand geoid = '$country'\n\tgroup by ts\n),\nT2 as (\n\tselect\n\tRowNumber,\n\tdate,\n\tavg(${metric:csv}) over (order by date asc rows 30 PRECEDING ) as MAVG\n\tfrom T1\n)\nselect\n\tdate as time,\n\tIIF(RowNumber > 29, MAVG, NULL) \"Moving AVG 30\"\nfrom T2\norder by date",
              "refId": "C"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "New Daily $metric (Linear Scale)",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:2180",
              "format": "none",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "$$hashKey": "object:2181",
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_MICROSOFT_SQL SERVER}",
          "description": "",
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 16,
            "w": 12,
            "x": 12,
            "y": 4
          },
          "hiddenSeries": false,
          "id": 72,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": false,
            "max": true,
            "min": true,
            "rightSide": false,
            "show": true,
            "total": true,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "dataLinks": []
          },
          "percentage": false,
          "pluginVersion": "6.7.1",
          "pointradius": 1,
          "points": true,
          "renderer": "flot",
          "scopedVars": {
            "metric": {
              "selected": false,
              "text": "Cases",
              "value": "Cases"
            }
          },
          "seriesOverrides": [
            {
              "$$hashKey": "object:2147",
              "alias": "Moving AVG 5",
              "dashes": true,
              "fill": 0,
              "points": false
            },
            {
              "$$hashKey": "object:2148",
              "alias": "Moving AVG 30",
              "dashes": true,
              "fill": 0,
              "points": false
            },
            {
              "$$hashKey": "object:2149",
              "alias": "New Daily Deaths"
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "",
              "format": "time_series",
              "rawSql": "select\nsum(${metric:csv}) as \"New Daily ${metric:csv}\",\nts as time\nfrom daily_global\nwhere $__unixEpochFilter(ts/1000)\nand geoid = '$country'\ngroup by ts\norder by ts",
              "refId": "A"
            },
            {
              "alias": "",
              "format": "time_series",
              "rawSql": "with T1 as (\n\tselect\n\t\tROW_NUMBER() OVER (ORDER BY ts ASC) RowNumber,\n\t\tcast(dateadd(second,ts/1000,'19700101') as date) as Date,\n\t\tsum(${metric:csv}) as ${metric:csv}\n\tfrom covid_data.dbo.daily_global dg\n\twhere $__unixEpochFilter(ts/1000)\n\tand geoid = '$country'\n\tgroup by ts\n),\nT2 as (\n\tselect\n\tRowNumber,\n\tdate,\n\tavg(${metric:csv}) over (order by date asc rows 5 PRECEDING ) as MAVG\n\tfrom T1\n)\nselect\n\tdate as time,\n\tIIF(RowNumber > 4, MAVG, NULL) \"Moving AVG 5\"\nfrom T2\norder by date",
              "refId": "B"
            },
            {
              "alias": "",
              "format": "time_series",
              "rawSql": "with T1 as (\n\tselect\n\t\tROW_NUMBER() OVER (ORDER BY ts ASC) RowNumber,\n\t\tcast(dateadd(second,ts/1000,'19700101') as date) as Date,\n\t\tsum(${metric:csv}) as ${metric:csv}\n\tfrom covid_data.dbo.daily_global dg\n\twhere $__unixEpochFilter(ts/1000)\n\tand geoid = '$country'\n\tgroup by ts\n),\nT2 as (\n\tselect\n\tRowNumber,\n\tdate,\n\tavg(${metric:csv}) over (order by date asc rows 30 PRECEDING ) as MAVG\n\tfrom T1\n)\nselect\n\tdate as time,\n\tIIF(RowNumber > 29, MAVG, NULL) \"Moving AVG 30\"\nfrom T2\norder by date",
              "refId": "C"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "New Daily ${metric:csv} (Logarithmic Scale)",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:2180",
              "format": "none",
              "label": null,
              "logBase": 10,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "$$hashKey": "object:2181",
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": true,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_MICROSOFT_SQL SERVER}",
          "description": "",
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 16,
            "w": 12,
            "x": 0,
            "y": 20
          },
          "hiddenSeries": false,
          "id": 82,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": false,
            "max": true,
            "min": true,
            "rightSide": false,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": false,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "dataLinks": []
          },
          "percentage": false,
          "pluginVersion": "6.7.1",
          "pointradius": 1,
          "points": false,
          "renderer": "flot",
          "scopedVars": {
            "metric": {
              "selected": false,
              "text": "Cases",
              "value": "Cases"
            }
          },
          "seriesOverrides": [
            {
              "alias": "Percentage Change",
              "bars": true,
              "lines": false,
              "yaxis": 2,
              "zindex": -3
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "",
              "format": "time_series",
              "hide": false,
              "rawSql": "with t1 as\n(\n\t\tselect\n\t\t\tsum(${metric:csv}) as ${metric:csv},\n\t\t\tts as time\n\t\tfrom daily_global\n\t\twhere $__unixEpochFilter(ts/1000)\n\t\tand geoid = '$country'\n\t\tgroup by ts\n),\nt2 as\n(\n\tselect time,\n\t\t${metric:csv},\n\t\t LAG(${metric:csv},1) OVER (\n\t\t \tORDER BY time \n\t\t ) ${metric:csv}Prev\n\tfrom t1\n)\nselect\ntime,\n${metric:csv}-COALESCE (${metric:csv}Prev,0) as \"Daily Increase\"\nfrom t2\norder by time",
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Daily Increase",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "none",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "percent",
              "label": "",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": true,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": true,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_MICROSOFT_SQL SERVER}",
          "description": "",
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 16,
            "w": 12,
            "x": 12,
            "y": 20
          },
          "hiddenSeries": false,
          "id": 84,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": false,
            "max": true,
            "min": true,
            "rightSide": false,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": false,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "dataLinks": []
          },
          "percentage": false,
          "pluginVersion": "6.7.1",
          "pointradius": 1,
          "points": false,
          "renderer": "flot",
          "scopedVars": {
            "metric": {
              "selected": false,
              "text": "Cases",
              "value": "Cases"
            }
          },
          "seriesOverrides": [
            {
              "alias": "Percentage Change",
              "bars": true,
              "lines": false,
              "yaxis": 1,
              "zindex": -3
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "",
              "format": "time_series",
              "rawSql": "with t1 as\n(\n\t\tselect\n\t\t\tsum(${metric:csv}) as ${metric:csv},\n\t\t\tcast(dateadd(second,ts/1000,'19700101') as date) as time\n\t\tfrom daily_global\n  where $__unixEpochFilter(ts/1000)\n  and geoid = '$country'\n\t\tgroup by ts\n),\nt2 as\n(\n\tselect time,\n\t\t${metric:csv},\n\t\t LAG(${metric:csv},1) OVER (\n\t\t \tORDER BY time \n\t\t ) ${metric:csv}Prev\n\tfrom t1\n)\nselect\ntime,\ncase\n\twhen \t${metric:csv}Prev is null then null\n\twhen\t${metric:csv}Prev = 0 then null\n\telse \t(${metric:csv}-${metric:csv}Prev)*100.0/${metric:csv}Prev\nend \"Percentage Change\"\nfrom t2\norder by time",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Percentage Change",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "percent",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "percent",
              "label": "",
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ],
          "yaxis": {
            "align": true,
            "alignLevel": null
          }
        }
      ],
      "repeat": "metric",
      "title": "Daily $metric Details - $country",
      "type": "row"
    }
  ],
  "refresh": false,
  "schemaVersion": 22,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {
          "text": "All",
          "value": [
            "$__all"
          ]
        },
        "hide": 2,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "metric",
        "options": [
          {
            "selected": true,
            "text": "All",
            "value": "$__all"
          },
          {
            "selected": false,
            "text": "Cases",
            "value": "Cases"
          },
          {
            "selected": false,
            "text": "Deaths",
            "value": "Deaths"
          }
        ],
        "query": "Cases, Deaths",
        "skipUrlSync": false,
        "type": "custom"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_MICROSOFT_SQL SERVER}",
        "definition": "SELECT replace(country,'_',' ') __text, geoid __value from daily_global order by country",
        "hide": 0,
        "includeAll": false,
        "index": -1,
        "label": "Country",
        "multi": false,
        "name": "country",
        "options": [],
        "query": "SELECT replace(country,'_',' ') __text, geoid __value from daily_global order by country",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-90d",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "utc",
  "title": "Covid-19",
  "uid": "I_KtD7CWz",
  "variables": {
    "list": []
  },
  "version": 9,
  "description": "Covid 19 spread using daily report of ECDC."
}