From 636493f94c7bf34879902081050a2655f16da8ba Mon Sep 17 00:00:00 2001 From: Axel Date: Thu, 11 Jan 2024 22:12:25 +0100 Subject: [PATCH] Update dashboard.json --- grafana/dashboard.json | 2202 +++++++++++++++++++++++++++++----------- 1 file changed, 1581 insertions(+), 621 deletions(-) diff --git a/grafana/dashboard.json b/grafana/dashboard.json index 589f2e1..7068158 100644 --- a/grafana/dashboard.json +++ b/grafana/dashboard.json @@ -21,7 +21,7 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "10.2.0" + "version": "10.2.2" }, { "type": "datasource", @@ -37,8 +37,8 @@ }, { "type": "panel", - "id": "table", - "name": "Table", + "id": "text", + "name": "Text", "version": "" }, { @@ -84,6 +84,156 @@ "links": [], "liveNow": false, "panels": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "gridPos": { + "h": 1, + "w": 3, + "x": 0, + "y": 0 + }, + "id": 57, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "markdown" + }, + "pluginVersion": "10.2.2", + "title": "Wishlists (Total)", + "type": "text" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "gridPos": { + "h": 1, + "w": 3, + "x": 3, + "y": 0 + }, + "id": 58, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "markdown" + }, + "pluginVersion": "10.2.2", + "title": "Wishlists (Current Period)", + "type": "text" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "gridPos": { + "h": 1, + "w": 3, + "x": 6, + "y": 0 + }, + "id": 59, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "markdown" + }, + "pluginVersion": "10.2.2", + "title": "Copies (Total)", + "type": "text" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "gridPos": { + "h": 1, + "w": 3, + "x": 9, + "y": 0 + }, + "id": 66, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "markdown" + }, + "pluginVersion": "10.2.2", + "title": "Copies (Current Period)", + "type": "text" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "gridPos": { + "h": 1, + "w": 3, + "x": 12, + "y": 0 + }, + "id": 76, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "markdown" + }, + "pluginVersion": "10.2.2", + "title": "Refund % (Total, Graph show trend)", + "type": "text" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "gridPos": { + "h": 1, + "w": 3, + "x": 15, + "y": 0 + }, + "id": 88, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "markdown" + }, + "pluginVersion": "10.2.2", + "title": "Followers", + "type": "text" + }, { "datasource": { "type": "postgres", @@ -92,43 +242,16 @@ "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" + "mode": "thresholds" }, "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 6, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "always", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" } }, - "links": [], "mappings": [], - "min": 1, "thresholds": { "mode": "absolute", "steps": [ @@ -141,31 +264,99 @@ "value": 80 } ] - }, - "unit": "short" + } }, "overrides": [] }, "gridPos": { - "h": 14, - "w": 8, - "x": 0, + "h": 10, + "w": 6, + "x": 18, "y": 0 }, - "id": 2, + "id": 40, "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "basemap": { + "config": {}, + "name": "Layer 0", + "type": "default" + }, + "controls": { + "mouseWheelZoom": true, + "showAttribution": true, + "showDebug": false, + "showMeasure": false, + "showScale": false, + "showZoom": true }, + "layers": [ + { + "config": { + "showLegend": false, + "style": { + "color": { + "fixed": "dark-green" + }, + "opacity": 0.2, + "rotation": { + "fixed": 0, + "max": 360, + "min": -360, + "mode": "mod" + }, + "size": { + "field": "sum", + "fixed": 5, + "max": 15, + "min": 2 + }, + "symbol": { + "fixed": "img/icons/marker/circle.svg", + "mode": "fixed" + }, + "symbolAlign": { + "horizontal": "center" + }, + "text": { + "field": "count", + "fixed": "", + "mode": "fixed" + }, + "textConfig": { + "fontSize": 8, + "offsetX": 0, + "offsetY": 0, + "textAlign": "center", + "textBaseline": "middle" + } + } + }, + "filterData": { + "id": "byRefId", + "options": "A" + }, + "location": { + "lookup": "country", + "mode": "lookup" + }, + "name": "Copies sold", + "tooltip": true, + "type": "markers" + } + ], "tooltip": { - "mode": "multi", - "sort": "none" + "mode": "details" + }, + "view": { + "allLayers": true, + "id": "coords", + "lat": 34.195177, + "lon": 25.820759, + "shared": false, + "zoom": 0.86 } }, - "pluginVersion": "9.3.6", + "pluginVersion": "10.2.2", "targets": [ { "datasource": { @@ -173,42 +364,994 @@ "uid": "${DS_LUMEN}" }, "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": [ - "game" - ], - "type": "column" - }, - { - "params": [ - "datelocal" - ], - "type": "column" - } - ], - "metricColumn": "none", + "format": "table", "rawQuery": true, - "rawSql": "SELECT\n datelocal AS \"time\",\n (SELECT SUM(adds) - SUM(deletes) - SUM(purchases_and_activations) - SUM(gifts) FROM steam_wishlists as subquery WHERE subquery.datelocal <= currquery.datelocal and subquery.game = currquery.game) as \"value\",\n game as \"metric\"\nFROM steam_wishlists as currquery\nWHERE\n $__timeFilter(currquery.datelocal)\nORDER BY 1", + "rawSql": "SELECT SUM(net_units_sold), REPLACE(country, 'Russian Federation', 'Russia') as country FROM steam_sold GROUP BY country", "refId": "A", - "select": [ + "sql": { + "columns": [ + { + "name": "COUNT", + "parameters": [ + { + "name": "country", + "type": "functionParameter" + } + ], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "steam_sold" + } + ], + "title": "Countries (copies sold, all time)", + "type": "geomap" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "rgb(237, 215, 80)", + "value": -5 + }, + { + "color": "dark-green", + "value": 5 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 0, + "y": 1 + }, + "id": 7, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "repeat": "games", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "editorMode": "code", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(datelocal,$__interval),\n sum(adds) - sum(deletes) - SUM(purchases_and_activations) - SUM(gifts)\nFROM steam_wishlists\nWHERE\n game = $games \nGROUP BY 1\nORDER BY 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "adds" + ], + "type": "column" + }, + { + "params": [ + "sum" + ], + "type": "aggregate" + }, + { + "params": [ + "sum" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "deletes" + ], + "type": "column" + }, + { + "params": [ + "sum" + ], + "type": "aggregate" + }, + { + "params": [ + "deletes" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "deletes" + ], + "type": "column" + }, + { + "params": [ + "sum" + ], + "type": "aggregate" + }, + { + "params": [ + "deletes" + ], + "type": "alias" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "steam_wishlists", + "timeColumn": "datelocal", + "timeColumnType": "date", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "$games", + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "rgb(237, 215, 80)", + "value": -5 + }, + { + "color": "dark-green", + "value": 5 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 3, + "y": 1 + }, + "id": 50, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "repeat": "games", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "editorMode": "code", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(datelocal,$__interval),\n sum(adds) - sum(deletes) - SUM(purchases_and_activations) - SUM(gifts)\nFROM steam_wishlists\nWHERE\n $__timeFilter(datelocal) AND\n game = $games \nGROUP BY 1\nORDER BY 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "adds" + ], + "type": "column" + }, + { + "params": [ + "sum" + ], + "type": "aggregate" + }, + { + "params": [ + "sum" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "deletes" + ], + "type": "column" + }, + { + "params": [ + "sum" + ], + "type": "aggregate" + }, + { + "params": [ + "deletes" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "deletes" + ], + "type": "column" + }, + { + "params": [ + "sum" + ], + "type": "aggregate" + }, + { + "params": [ + "deletes" + ], + "type": "alias" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "steam_wishlists", + "timeColumn": "datelocal", + "timeColumnType": "date", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "$games", + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "rgb(87, 168, 242)", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 6, + "y": 1 + }, + "id": 8, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "repeat": "games", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "editorMode": "code", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(date, $__interval),\n sum(net_units_sold)\nFROM steam_sold\nWHERE\n game = $games\nGROUP BY 1\nORDER BY 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "adds" + ], + "type": "column" + }, + { + "params": [ + "sum" + ], + "type": "aggregate" + }, + { + "params": [ + "sum" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "deletes" + ], + "type": "column" + }, + { + "params": [ + "sum" + ], + "type": "aggregate" + }, + { + "params": [ + "deletes" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "deletes" + ], + "type": "column" + }, + { + "params": [ + "sum" + ], + "type": "aggregate" + }, + { + "params": [ + "deletes" + ], + "type": "alias" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "steam_wishlists", + "timeColumn": "datelocal", + "timeColumnType": "date", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "$games", + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "rgb(87, 168, 242)", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 9, + "y": 1 + }, + "id": 67, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "repeat": "games", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "editorMode": "code", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n $__timeGroupAlias(date, $__interval),\n sum(net_units_sold)\nFROM steam_sold\nWHERE\n $__timeFilter(date) AND \n game = $games\nGROUP BY 1\nORDER BY 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "adds" + ], + "type": "column" + }, + { + "params": [ + "sum" + ], + "type": "aggregate" + }, + { + "params": [ + "sum" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "deletes" + ], + "type": "column" + }, + { + "params": [ + "sum" + ], + "type": "aggregate" + }, + { + "params": [ + "deletes" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "deletes" + ], + "type": "column" + }, + { + "params": [ + "sum" + ], + "type": "aggregate" + }, + { + "params": [ + "deletes" + ], + "type": "alias" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "steam_wishlists", + "timeColumn": "datelocal", + "timeColumnType": "date", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "$games", + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "rgb(87, 168, 242)", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 12, + "y": 1 + }, + "id": 77, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "/^value$/", + "values": false + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "repeat": "games", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "editorMode": "code", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n date AS \"time\",\n (SELECT 100.0 * SUM(chargebacks_returns) / SUM(gross_units_sold) FROM steam_sold as subquery WHERE subquery.date <= currquery.date and subquery.game = currquery.game) as \"value\"\nFROM steam_sold as currquery\nWHERE\n game = $games\nORDER BY 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "adds" + ], + "type": "column" + }, + { + "params": [ + "sum" + ], + "type": "aggregate" + }, + { + "params": [ + "sum" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "deletes" + ], + "type": "column" + }, + { + "params": [ + "sum" + ], + "type": "aggregate" + }, + { + "params": [ + "deletes" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "deletes" + ], + "type": "column" + }, + { + "params": [ + "sum" + ], + "type": "aggregate" + }, + { + "params": [ + "deletes" + ], + "type": "alias" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "steam_wishlists", + "timeColumn": "datelocal", + "timeColumnType": "date", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "$games", + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "rgb(87, 168, 242)", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 15, + "y": 1 + }, + "id": 89, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "repeat": "games", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "editorMode": "code", + "format": "time_series", + "group": [ + { + "params": [ + "$__interval", + "none" + ], + "type": "time" + } + ], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n datelocal as time,\n amount\nFROM steam_followers\nWHERE game = $games\nORDER BY 1\n ", + "refId": "A", + "select": [ + [ + { + "params": [ + "adds" + ], + "type": "column" + }, + { + "params": [ + "sum" + ], + "type": "aggregate" + }, + { + "params": [ + "sum" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "deletes" + ], + "type": "column" + }, + { + "params": [ + "sum" + ], + "type": "aggregate" + }, + { + "params": [ + "deletes" + ], + "type": "alias" + } + ], [ { "params": [ - "adds" + "deletes" ], "type": "column" }, { "params": [ - "avg" + "sum" ], "type": "aggregate" }, { "params": [ - "adds" + "deletes" ], "type": "alias" } @@ -243,8 +1386,8 @@ ] } ], - "title": "Active Wishlists (not deleted, not converted)", - "type": "timeseries" + "title": "$games", + "type": "stat" }, { "datasource": { @@ -306,15 +1449,61 @@ }, "unit": "short" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Alchemistry" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Extortion" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Manufactur’ inc." + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + } + ] }, "gridPos": { - "h": 14, + "h": 12, "w": 8, - "x": 8, - "y": 0 + "x": 0, + "y": 10 }, - "id": 34, + "id": 2, "options": { "legend": { "calcs": [], @@ -352,7 +1541,7 @@ ], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n datelocal AS \"time\",\n amount as \"value\",\n game as \"metric\"\nFROM steam_followers as currquery\nWHERE\n $__timeFilter(currquery.datelocal)\nORDER BY 1", + "rawSql": "SELECT\n datelocal AS \"time\",\n (SELECT SUM(adds) - SUM(deletes) - SUM(purchases_and_activations) - SUM(gifts) FROM steam_wishlists as subquery WHERE subquery.datelocal <= currquery.datelocal and subquery.game = currquery.game) as \"value\",\n game as \"metric\"\nFROM steam_wishlists as currquery\nWHERE\n $__timeFilter(currquery.datelocal)\nORDER BY 1", "refId": "A", "select": [ [ @@ -405,7 +1594,7 @@ ] } ], - "title": "Followers", + "title": "Active Wishlists (not deleted, not converted)", "type": "timeseries" }, { @@ -435,9 +1624,6 @@ }, "insertNulls": false, "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, "lineWidth": 1, "pointSize": 6, "scaleDistribution": { @@ -455,6 +1641,7 @@ }, "links": [], "mappings": [], + "min": 1, "thresholds": { "mode": "absolute", "steps": [ @@ -470,163 +1657,74 @@ }, "unit": "short" }, - "overrides": [] - }, - "gridPos": { - "h": 14, - "w": 8, - "x": 16, - "y": 0 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "9.3.6", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "${DS_LUMEN}" - }, - "editorMode": "code", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n date AS \"time\",\r\n (SELECT SUM(net_units_sold) FROM steam_sold as subquery WHERE subquery.date <= currquery.date and subquery.game = currquery.game) as \"value\",\r\n CONCAT(game, ' (net units)') as \"metric\"\r\nFROM steam_sold as currquery\r\nWHERE\r\n $__timeFilter(currquery.date)\r\nORDER BY 1", - "refId": "A", - "select": [ - [ + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Alchemistry" + }, + "properties": [ { - "params": [ - "duration" - ], - "type": "column" + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } } ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "table": "focus_stats", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "${DS_LUMEN}" }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n date AS \"time\",\r\n (SELECT SUM(net_steam_sale_usd) FROM steam_sold as subquery WHERE subquery.date <= currquery.date and subquery.game = currquery.game) as \"value\",\r\n CONCAT(game, ' ($ net sale before taxes & steam cut)') as \"metric\"\r\nFROM steam_sold as currquery\r\nWHERE\r\n $__timeFilter(currquery.date)\r\nORDER BY 1", - "refId": "B", - "select": [ - [ + { + "matcher": { + "id": "byName", + "options": "Extortion" + }, + "properties": [ { - "params": [ - "duration" - ], - "type": "column" + "id": "color", + "value": { + "fixedColor": "dark-yellow", + "mode": "fixed" + } } ] - ], - "table": "focus_stats", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Copies sold | Net $ sold before taxes & steam cut", - "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "${DS_LUMEN}" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, + }, + { + "matcher": { + "id": "byName", + "options": "Manufactur’ inc." + }, + "properties": [ { - "color": "rgb(237, 215, 80)", - "value": 80 + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } } ] } - }, - "overrides": [] + ] }, "gridPos": { - "h": 3, + "h": 12, "w": 8, - "x": 0, - "y": 14 + "x": 8, + "y": 10 }, - "id": 7, + "id": 34, "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "sum" - ], - "fields": "", - "values": false + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - "textMode": "auto" + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "pluginVersion": "10.2.0", - "repeat": "games", - "repeatDirection": "h", + "pluginVersion": "9.3.6", "targets": [ { "datasource": { @@ -638,73 +1736,38 @@ "group": [ { "params": [ - "$__interval", - "none" + "game" ], - "type": "time" - } - ], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__timeGroupAlias(datelocal,$__interval),\n sum(adds) - sum(deletes) - SUM(purchases_and_activations) - SUM(gifts)\nFROM steam_wishlists\nWHERE\n $__timeFilter(datelocal)\n AND game = $games \nGROUP BY 1\nORDER BY 1", - "refId": "A", - "select": [ - [ - { - "params": [ - "adds" - ], - "type": "column" - }, - { - "params": [ - "sum" - ], - "type": "aggregate" - }, - { - "params": [ - "sum" - ], - "type": "alias" - } - ], - [ - { - "params": [ - "deletes" - ], - "type": "column" - }, - { - "params": [ - "sum" - ], - "type": "aggregate" - }, - { - "params": [ - "deletes" - ], - "type": "alias" - } - ], + "type": "column" + }, + { + "params": [ + "datelocal" + ], + "type": "column" + } + ], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n datelocal AS \"time\",\n amount as \"value\",\n game as \"metric\"\nFROM steam_followers as currquery\nWHERE\n $__timeFilter(currquery.datelocal)\nORDER BY 1", + "refId": "A", + "select": [ [ { "params": [ - "deletes" + "adds" ], "type": "column" }, { "params": [ - "sum" + "avg" ], "type": "aggregate" }, { "params": [ - "deletes" + "adds" ], "type": "alias" } @@ -739,8 +1802,8 @@ ] } ], - "title": "$games (Wishlists)", - "type": "stat" + "title": "Followers", + "type": "timeseries" }, { "datasource": { @@ -749,6 +1812,45 @@ }, "fieldConfig": { "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 6, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "always", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], "mappings": [], "thresholds": { "mode": "absolute", @@ -758,38 +1860,126 @@ "value": null }, { - "color": "rgb(87, 168, 242)", + "color": "red", "value": 80 } ] - } + }, + "unit": "short" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Alchemistry (net units)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Alchemistry ($ net sale before taxes & steam cut)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Alchemistry ($ gross)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Extortion (net units)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Extortion ($ net sale before taxes & steam cut)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-orange", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Extortion ($ gross)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-yellow", + "mode": "fixed" + } + } + ] + } + ] }, "gridPos": { - "h": 3, + "h": 12, "w": 8, - "x": 0, - "y": 17 + "x": 16, + "y": 10 }, - "id": 8, + "id": 4, "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "sum" - ], - "fields": "", - "values": false + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - "textMode": "auto" + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "pluginVersion": "10.2.0", - "repeat": "games", - "repeatDirection": "h", + "pluginVersion": "9.3.6", "targets": [ { "datasource": { @@ -798,78 +1988,68 @@ }, "editorMode": "code", "format": "time_series", - "group": [ - { - "params": [ - "$__interval", - "none" - ], - "type": "time" - } - ], + "group": [], "metricColumn": "none", "rawQuery": true, - "rawSql": "SELECT\n $__timeGroupAlias(date, $__interval),\n sum(net_units_sold)\nFROM steam_sold\nWHERE\n $__timeFilter(date)\n AND game = $games\nGROUP BY 1\nORDER BY 1", + "rawSql": "SELECT\r\n date AS \"time\",\r\n (SELECT SUM(net_units_sold) FROM steam_sold as subquery WHERE subquery.date <= currquery.date and subquery.game = currquery.game) as \"value\",\r\n CONCAT(game, ' (net units)') as \"metric\"\r\nFROM steam_sold as currquery\r\nWHERE\r\n $__timeFilter(currquery.date)\r\nORDER BY 1", "refId": "A", "select": [ [ { "params": [ - "adds" + "duration" ], "type": "column" - }, - { - "params": [ - "sum" - ], - "type": "aggregate" - }, + } + ] + ], + "sql": { + "columns": [ { - "params": [ - "sum" - ], - "type": "alias" + "parameters": [], + "type": "function" } ], - [ - { - "params": [ - "deletes" - ], - "type": "column" - }, - { - "params": [ - "sum" - ], - "type": "aggregate" - }, + "groupBy": [ { - "params": [ - "deletes" - ], - "type": "alias" + "property": { + "type": "string" + }, + "type": "groupBy" } ], + "limit": 50 + }, + "table": "focus_stats", + "timeColumn": "date", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\r\n date AS \"time\",\r\n (SELECT SUM(net_steam_sale_usd) FROM steam_sold as subquery WHERE subquery.date <= currquery.date and subquery.game = currquery.game) as \"value\",\r\n CONCAT(game, ' ($ net sale before taxes & steam cut)') as \"metric\"\r\nFROM steam_sold as currquery\r\nWHERE\r\n $__timeFilter(currquery.date)\r\nORDER BY 1", + "refId": "B", + "select": [ [ { "params": [ - "deletes" + "duration" ], "type": "column" - }, - { - "params": [ - "sum" - ], - "type": "aggregate" - }, - { - "params": [ - "deletes" - ], - "type": "alias" } ] ], @@ -889,21 +2069,50 @@ } ], "limit": 50 - }, - "table": "steam_wishlists", - "timeColumn": "datelocal", - "timeColumnType": "date", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] + }, + "table": "focus_stats", + "timeColumn": "date", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_LUMEN}" + }, + "editorMode": "code", + "format": "time_series", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT\r\n date AS \"time\",\r\n (SELECT SUM(gross_steam_sale_usd) FROM steam_sold as subquery WHERE subquery.date <= currquery.date and subquery.game = currquery.game) as \"value\",\r\n CONCAT(game, ' ($ gross)') as \"metric\"\r\nFROM steam_sold as currquery\r\nWHERE\r\n $__timeFilter(currquery.date)\r\nORDER BY 1", + "refId": "C", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } } ], - "title": "$games (Copies)", - "type": "stat" + "title": "Copies sold | Net $ sold before taxes & steam cut", + "type": "timeseries" }, { "datasource": { @@ -958,10 +2167,10 @@ "overrides": [] }, "gridPos": { - "h": 19, + "h": 12, "w": 8, "x": 0, - "y": 20 + "y": 22 }, "id": 24, "options": { @@ -1144,10 +2353,10 @@ "overrides": [] }, "gridPos": { - "h": 19, + "h": 12, "w": 8, "x": 8, - "y": 20 + "y": 22 }, "id": 35, "options": { @@ -1330,10 +2539,10 @@ "overrides": [] }, "gridPos": { - "h": 19, + "h": 12, "w": 8, "x": 16, - "y": 20 + "y": 22 }, "id": 29, "options": { @@ -1511,8 +2720,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1528,7 +2736,7 @@ "h": 22, "w": 24, "x": 0, - "y": 39 + "y": 34 }, "id": 11, "options": { @@ -1628,8 +2836,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1644,7 +2851,7 @@ "h": 10, "w": 24, "x": 0, - "y": 61 + "y": 56 }, "id": 13, "options": { @@ -1793,8 +3000,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -1809,7 +3015,7 @@ "h": 10, "w": 24, "x": 0, - "y": 71 + "y": 66 }, "id": 14, "options": { @@ -1910,252 +3116,6 @@ ], "title": "Copies - 1y", "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "${DS_LUMEN}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 22, - "w": 14, - "x": 0, - "y": 81 - }, - "id": 40, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "default" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "showLegend": true, - "style": { - "color": { - "fixed": "dark-green" - }, - "opacity": 0.2, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "field": "sum", - "fixed": 5, - "max": 15, - "min": 2 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "text": { - "field": "count", - "fixed": "", - "mode": "fixed" - }, - "textConfig": { - "fontSize": 8, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "filterData": { - "id": "byRefId", - "options": "A" - }, - "location": { - "lookup": "country", - "mode": "lookup" - }, - "name": "Copies sold", - "tooltip": true, - "type": "markers" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "coords", - "lat": 28.975531, - "lon": 12.49205, - "zoom": 1.69 - } - }, - "pluginVersion": "10.2.0", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "${DS_LUMEN}" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT SUM(net_units_sold), REPLACE(country, 'Russian Federation', 'Russia') as country FROM steam_sold GROUP BY country", - "refId": "A", - "sql": { - "columns": [ - { - "name": "COUNT", - "parameters": [ - { - "name": "country", - "type": "functionParameter" - } - ], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "table": "steam_sold" - } - ], - "title": "Countries (copies sold)", - "type": "geomap" - }, - { - "datasource": { - "type": "postgres", - "uid": "${DS_LUMEN}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 22, - "w": 6, - "x": 14, - "y": 81 - }, - "id": 45, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.2.0", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "${DS_LUMEN}" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT SUM(net_units_sold) as \"Total\", country as \"Country\" FROM steam_sold GROUP BY country ORDER BY 1 DESC", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Top countries (copies sold)", - "type": "table" } ], "refresh": "", @@ -2186,13 +3146,13 @@ ] }, "time": { - "from": "2020-05-14T22:00:00.000Z", + "from": "now-6M", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Steam summary", "uid": "iqXsNB1nk", - "version": 2, + "version": 7, "weekStart": "" }