fixed formatting and updated the dashboard again
This commit is contained in:
parent
51f2d0b677
commit
a4ebeca3b7
@ -259,7 +259,7 @@
|
|||||||
"description": "% of Ontario Population partially or Fully Vaccinated.",
|
"description": "% of Ontario Population partially or Fully Vaccinated.",
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"decimals": 0,
|
"decimals": 1,
|
||||||
"mappings": [],
|
"mappings": [],
|
||||||
"thresholds": {
|
"thresholds": {
|
||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
@ -388,5 +388,5 @@
|
|||||||
"timezone": "",
|
"timezone": "",
|
||||||
"title": "Ontario Vaccination Stats",
|
"title": "Ontario Vaccination Stats",
|
||||||
"uid": "vhnVv3lMk",
|
"uid": "vhnVv3lMk",
|
||||||
"version": 38
|
"version": 40
|
||||||
}
|
}
|
@ -1,396 +1,463 @@
|
|||||||
{
|
{
|
||||||
"dashboard": {
|
"dashboard":
|
||||||
"annotations": {
|
|
||||||
"list": [
|
|
||||||
{
|
|
||||||
"builtIn": 1,
|
|
||||||
"datasource": "-- Grafana --",
|
|
||||||
"enable": true,
|
|
||||||
"hide": true,
|
|
||||||
"iconColor": "rgba(0, 211, 255, 1)",
|
|
||||||
"name": "Annotations & Alerts",
|
|
||||||
"type": "dashboard"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"editable": true,
|
|
||||||
"gnetId": null,
|
|
||||||
"graphTooltip": 0,
|
|
||||||
"id": 25,
|
|
||||||
"links": [],
|
|
||||||
"panels": [
|
|
||||||
{
|
{
|
||||||
"cacheTimeout": null,
|
"annotations":
|
||||||
"datasource": null,
|
{
|
||||||
"description": "~Days left until everyone 12+ Is partially vaccinated.\n\nThis divides the remaining population without any vaccination by the average doses administered over the past 3 days.",
|
"list":
|
||||||
"fieldConfig": {
|
[
|
||||||
"defaults": {
|
{
|
||||||
"mappings": [
|
"builtIn": 1,
|
||||||
|
"datasource": "-- Grafana --",
|
||||||
|
"enable": true,
|
||||||
|
"hide": true,
|
||||||
|
"iconColor": "rgba(0, 211, 255, 1)",
|
||||||
|
"name": "Annotations & Alerts",
|
||||||
|
"type": "dashboard"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"editable": true,
|
||||||
|
"gnetId": null,
|
||||||
|
"graphTooltip": 0,
|
||||||
|
"id": 25,
|
||||||
|
"links":
|
||||||
|
[],
|
||||||
|
"panels":
|
||||||
|
[
|
||||||
{
|
{
|
||||||
"id": 0,
|
"cacheTimeout": null,
|
||||||
"op": "=",
|
"datasource": null,
|
||||||
"text": "N/A",
|
"description": "~Days left until everyone 12+ Is partially vaccinated.\n\nThis divides the remaining population without any vaccination by the average doses administered over the past 3 days.",
|
||||||
"type": 1,
|
"fieldConfig":
|
||||||
"value": "null"
|
{
|
||||||
|
"defaults":
|
||||||
|
{
|
||||||
|
"mappings":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 0,
|
||||||
|
"op": "=",
|
||||||
|
"text": "N/A",
|
||||||
|
"type": 1,
|
||||||
|
"value": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thresholds":
|
||||||
|
{
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "#EAB839",
|
||||||
|
"value": 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "none"
|
||||||
|
},
|
||||||
|
"overrides":
|
||||||
|
[]
|
||||||
|
},
|
||||||
|
"gridPos":
|
||||||
|
{
|
||||||
|
"h": 6,
|
||||||
|
"w": 5,
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 8,
|
||||||
|
"interval": null,
|
||||||
|
"links":
|
||||||
|
[],
|
||||||
|
"maxDataPoints": 100,
|
||||||
|
"options":
|
||||||
|
{
|
||||||
|
"colorMode": "value",
|
||||||
|
"graphMode": "area",
|
||||||
|
"justifyMode": "auto",
|
||||||
|
"orientation": "horizontal",
|
||||||
|
"reduceOptions":
|
||||||
|
{
|
||||||
|
"calcs":
|
||||||
|
[
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"fields": "/^{instance=\"127.0.0.1:8080\", job=\"ontvacstat\"}$/",
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"text":
|
||||||
|
{},
|
||||||
|
"textMode": "auto"
|
||||||
|
},
|
||||||
|
"pluginVersion": "7.5.1",
|
||||||
|
"targets":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"exemplar": true,
|
||||||
|
"expr": "((ontvacstat_eligible_population - ontvacstat_total_individuals_fully_vaccinated) - (ontvacstat_total_doses_administered - ontvacstat_total_doses_in_fully_vaccinated_individuals)) / avg_over_time(ontvacstat_previous_day_doses_administered[7d])",
|
||||||
|
"format": "time_series",
|
||||||
|
"interval": "",
|
||||||
|
"intervalFactor": 1,
|
||||||
|
"legendFormat": "",
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "~ Days Left",
|
||||||
|
"type": "stat"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": null,
|
||||||
|
"fieldConfig":
|
||||||
|
{
|
||||||
|
"defaults":
|
||||||
|
{
|
||||||
|
"mappings":
|
||||||
|
[],
|
||||||
|
"thresholds":
|
||||||
|
{
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "#EAB839",
|
||||||
|
"value": 10000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": 110000
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"overrides":
|
||||||
|
[]
|
||||||
|
},
|
||||||
|
"gridPos":
|
||||||
|
{
|
||||||
|
"h": 6,
|
||||||
|
"w": 6,
|
||||||
|
"x": 5,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 4,
|
||||||
|
"links":
|
||||||
|
[],
|
||||||
|
"options":
|
||||||
|
{
|
||||||
|
"colorMode": "value",
|
||||||
|
"graphMode": "area",
|
||||||
|
"justifyMode": "auto",
|
||||||
|
"orientation": "auto",
|
||||||
|
"reduceOptions":
|
||||||
|
{
|
||||||
|
"calcs":
|
||||||
|
[
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"text":
|
||||||
|
{},
|
||||||
|
"textMode": "auto"
|
||||||
|
},
|
||||||
|
"pluginVersion": "7.5.1",
|
||||||
|
"targets":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"exemplar": true,
|
||||||
|
"expr": "ontvacstat_previous_day_doses_administered",
|
||||||
|
"format": "time_series",
|
||||||
|
"interval": "",
|
||||||
|
"intervalFactor": 1,
|
||||||
|
"legendFormat": "Previous Day Doses Administered",
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timeFrom": null,
|
||||||
|
"timeShift": null,
|
||||||
|
"title": "Doses Administered Yesterday",
|
||||||
|
"type": "stat"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aliasColors":
|
||||||
|
{},
|
||||||
|
"bars": false,
|
||||||
|
"dashLength": 10,
|
||||||
|
"dashes": false,
|
||||||
|
"datasource": null,
|
||||||
|
"fieldConfig":
|
||||||
|
{
|
||||||
|
"defaults":
|
||||||
|
{},
|
||||||
|
"overrides":
|
||||||
|
[]
|
||||||
|
},
|
||||||
|
"fill": 1,
|
||||||
|
"fillGradient": 0,
|
||||||
|
"gridPos":
|
||||||
|
{
|
||||||
|
"h": 7,
|
||||||
|
"w": 11,
|
||||||
|
"x": 0,
|
||||||
|
"y": 6
|
||||||
|
},
|
||||||
|
"hiddenSeries": false,
|
||||||
|
"id": 10,
|
||||||
|
"legend":
|
||||||
|
{
|
||||||
|
"avg": false,
|
||||||
|
"current": false,
|
||||||
|
"max": false,
|
||||||
|
"min": false,
|
||||||
|
"show": true,
|
||||||
|
"total": false,
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"linewidth": 1,
|
||||||
|
"nullPointMode": "connected",
|
||||||
|
"options":
|
||||||
|
{
|
||||||
|
"alertThreshold": true
|
||||||
|
},
|
||||||
|
"percentage": false,
|
||||||
|
"pluginVersion": "7.5.1",
|
||||||
|
"pointradius": 2,
|
||||||
|
"points": false,
|
||||||
|
"renderer": "flot",
|
||||||
|
"seriesOverrides":
|
||||||
|
[],
|
||||||
|
"spaceLength": 10,
|
||||||
|
"stack": false,
|
||||||
|
"steppedLine": false,
|
||||||
|
"targets":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"exemplar": true,
|
||||||
|
"expr": "avg_over_time(ontvacstat_previous_day_doses_administered[3d:1d])",
|
||||||
|
"interval": "",
|
||||||
|
"intervalFactor": 1,
|
||||||
|
"legendFormat": "3d:1d Avg",
|
||||||
|
"refId": "A"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thresholds":
|
||||||
|
[],
|
||||||
|
"timeFrom": null,
|
||||||
|
"timeRegions":
|
||||||
|
[],
|
||||||
|
"timeShift": null,
|
||||||
|
"title": "Vacination Rate",
|
||||||
|
"tooltip":
|
||||||
|
{
|
||||||
|
"shared": true,
|
||||||
|
"sort": 0,
|
||||||
|
"value_type": "individual"
|
||||||
|
},
|
||||||
|
"type": "graph",
|
||||||
|
"xaxis":
|
||||||
|
{
|
||||||
|
"buckets": null,
|
||||||
|
"mode": "time",
|
||||||
|
"name": null,
|
||||||
|
"show": true,
|
||||||
|
"values":
|
||||||
|
[]
|
||||||
|
},
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": null,
|
||||||
|
"description": "% of Ontario Population partially or Fully Vaccinated.",
|
||||||
|
"fieldConfig":
|
||||||
|
{
|
||||||
|
"defaults":
|
||||||
|
{
|
||||||
|
"decimals": 1,
|
||||||
|
"mappings":
|
||||||
|
[],
|
||||||
|
"thresholds":
|
||||||
|
{
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"color": "dark-red",
|
||||||
|
"value": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "semi-dark-red",
|
||||||
|
"value": 40
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "light-red",
|
||||||
|
"value": 50
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "semi-dark-yellow",
|
||||||
|
"value": 60
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "light-yellow",
|
||||||
|
"value": 70
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "light-green",
|
||||||
|
"value": 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "semi-dark-green",
|
||||||
|
"value": 90
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "percent"
|
||||||
|
},
|
||||||
|
"overrides":
|
||||||
|
[]
|
||||||
|
},
|
||||||
|
"gridPos":
|
||||||
|
{
|
||||||
|
"h": 8,
|
||||||
|
"w": 11,
|
||||||
|
"x": 0,
|
||||||
|
"y": 13
|
||||||
|
},
|
||||||
|
"id": 2,
|
||||||
|
"links":
|
||||||
|
[],
|
||||||
|
"options":
|
||||||
|
{
|
||||||
|
"displayMode": "lcd",
|
||||||
|
"orientation": "horizontal",
|
||||||
|
"reduceOptions":
|
||||||
|
{
|
||||||
|
"calcs":
|
||||||
|
[
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
},
|
||||||
|
"showUnfilled": true,
|
||||||
|
"text":
|
||||||
|
{}
|
||||||
|
},
|
||||||
|
"pluginVersion": "7.5.1",
|
||||||
|
"targets":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"exemplar": true,
|
||||||
|
"expr": "(ontvacstat_total_doses_administered - ontvacstat_total_doses_in_fully_vaccinated_individuals) / (ontvacstat_eligible_population) * 100",
|
||||||
|
"format": "time_series",
|
||||||
|
"interval": "",
|
||||||
|
"intervalFactor": 1,
|
||||||
|
"legendFormat": "Partially Vaccinated",
|
||||||
|
"refId": "A"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"exemplar": true,
|
||||||
|
"expr": "ontvacstat_total_individuals_fully_vaccinated / ontvacstat_eligible_population * 100",
|
||||||
|
"format": "time_series",
|
||||||
|
"interval": "",
|
||||||
|
"intervalFactor": 1,
|
||||||
|
"legendFormat": "Fully Vaccinated",
|
||||||
|
"refId": "B"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"exemplar": true,
|
||||||
|
"expr": "(ontvacstat_total_doses_administered - ontvacstat_total_doses_in_fully_vaccinated_individuals + ontvacstat_total_individuals_fully_vaccinated) / (ontvacstat_eligible_population) * 100",
|
||||||
|
"hide": false,
|
||||||
|
"interval": "",
|
||||||
|
"legendFormat": "Combined",
|
||||||
|
"refId": "C"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timeFrom": null,
|
||||||
|
"timeShift": null,
|
||||||
|
"title": "Total Vaccinations & Fully Vaccinated (12+)",
|
||||||
|
"type": "bargauge"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"thresholds": {
|
"refresh": "15m",
|
||||||
"mode": "absolute",
|
"schemaVersion": 27,
|
||||||
"steps": [
|
"style": "dark",
|
||||||
{
|
"tags":
|
||||||
"color": "green",
|
[],
|
||||||
"value": null
|
"templating":
|
||||||
},
|
{
|
||||||
{
|
"list":
|
||||||
"color": "#EAB839",
|
[]
|
||||||
"value": 80
|
},
|
||||||
},
|
"time":
|
||||||
{
|
{
|
||||||
"color": "red",
|
"from": "now-3d",
|
||||||
"value": 100
|
"to": "now"
|
||||||
}
|
},
|
||||||
|
"timepicker":
|
||||||
|
{
|
||||||
|
"refresh_intervals":
|
||||||
|
[
|
||||||
|
"15m",
|
||||||
|
"30m",
|
||||||
|
"1h",
|
||||||
|
"2h",
|
||||||
|
"1d"
|
||||||
|
],
|
||||||
|
"time_options":
|
||||||
|
[
|
||||||
|
"5m",
|
||||||
|
"15m",
|
||||||
|
"1h",
|
||||||
|
"6h",
|
||||||
|
"12h",
|
||||||
|
"24h",
|
||||||
|
"2d",
|
||||||
|
"7d",
|
||||||
|
"30d"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"unit": "none"
|
|
||||||
},
|
},
|
||||||
"overrides": []
|
"timezone": "",
|
||||||
},
|
"title": "Ontario Vaccination Stats",
|
||||||
"gridPos": {
|
"uid": "vhnVv3lMk",
|
||||||
"h": 6,
|
"version": 40
|
||||||
"w": 5,
|
|
||||||
"x": 0,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
"id": 8,
|
|
||||||
"interval": null,
|
|
||||||
"links": [],
|
|
||||||
"maxDataPoints": 100,
|
|
||||||
"options": {
|
|
||||||
"colorMode": "value",
|
|
||||||
"graphMode": "area",
|
|
||||||
"justifyMode": "auto",
|
|
||||||
"orientation": "horizontal",
|
|
||||||
"reduceOptions": {
|
|
||||||
"calcs": [
|
|
||||||
"lastNotNull"
|
|
||||||
],
|
|
||||||
"fields": "/^{instance=\"127.0.0.1:8080\", job=\"ontvacstat\"}$/",
|
|
||||||
"values": false
|
|
||||||
},
|
|
||||||
"text": {},
|
|
||||||
"textMode": "auto"
|
|
||||||
},
|
|
||||||
"pluginVersion": "7.5.1",
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"exemplar": true,
|
|
||||||
"expr": "((ontvacstat_eligible_population - ontvacstat_total_individuals_fully_vaccinated) - (ontvacstat_total_doses_administered - ontvacstat_total_doses_in_fully_vaccinated_individuals)) / avg_over_time(ontvacstat_previous_day_doses_administered[7d])",
|
|
||||||
"format": "time_series",
|
|
||||||
"interval": "",
|
|
||||||
"intervalFactor": 1,
|
|
||||||
"legendFormat": "",
|
|
||||||
"refId": "A"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "~ Days Left",
|
|
||||||
"type": "stat"
|
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"datasource": null,
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "#EAB839",
|
|
||||||
"value": 10000
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": 110000
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 6,
|
|
||||||
"w": 6,
|
|
||||||
"x": 5,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
"id": 4,
|
|
||||||
"links": [],
|
|
||||||
"options": {
|
|
||||||
"colorMode": "value",
|
|
||||||
"graphMode": "area",
|
|
||||||
"justifyMode": "auto",
|
|
||||||
"orientation": "auto",
|
|
||||||
"reduceOptions": {
|
|
||||||
"calcs": [
|
|
||||||
"lastNotNull"
|
|
||||||
],
|
|
||||||
"fields": "",
|
|
||||||
"values": false
|
|
||||||
},
|
|
||||||
"text": {},
|
|
||||||
"textMode": "auto"
|
|
||||||
},
|
|
||||||
"pluginVersion": "7.5.1",
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"exemplar": true,
|
|
||||||
"expr": "ontvacstat_previous_day_doses_administered",
|
|
||||||
"format": "time_series",
|
|
||||||
"interval": "",
|
|
||||||
"intervalFactor": 1,
|
|
||||||
"legendFormat": "Previous Day Doses Administered",
|
|
||||||
"refId": "A"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"timeFrom": null,
|
|
||||||
"timeShift": null,
|
|
||||||
"title": "Doses Administered Yesterday",
|
|
||||||
"type": "stat"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"aliasColors": {},
|
|
||||||
"bars": false,
|
|
||||||
"dashLength": 10,
|
|
||||||
"dashes": false,
|
|
||||||
"datasource": null,
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"fill": 1,
|
|
||||||
"fillGradient": 0,
|
|
||||||
"gridPos": {
|
|
||||||
"h": 7,
|
|
||||||
"w": 11,
|
|
||||||
"x": 0,
|
|
||||||
"y": 6
|
|
||||||
},
|
|
||||||
"hiddenSeries": false,
|
|
||||||
"id": 10,
|
|
||||||
"legend": {
|
|
||||||
"avg": false,
|
|
||||||
"current": false,
|
|
||||||
"max": false,
|
|
||||||
"min": false,
|
|
||||||
"show": true,
|
|
||||||
"total": false,
|
|
||||||
"values": false
|
|
||||||
},
|
|
||||||
"lines": true,
|
|
||||||
"linewidth": 1,
|
|
||||||
"nullPointMode": "connected",
|
|
||||||
"options": {
|
|
||||||
"alertThreshold": true
|
|
||||||
},
|
|
||||||
"percentage": false,
|
|
||||||
"pluginVersion": "7.5.1",
|
|
||||||
"pointradius": 2,
|
|
||||||
"points": false,
|
|
||||||
"renderer": "flot",
|
|
||||||
"seriesOverrides": [],
|
|
||||||
"spaceLength": 10,
|
|
||||||
"stack": false,
|
|
||||||
"steppedLine": false,
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"exemplar": true,
|
|
||||||
"expr": "avg_over_time(ontvacstat_previous_day_doses_administered[3d:1d])",
|
|
||||||
"interval": "",
|
|
||||||
"intervalFactor": 1,
|
|
||||||
"legendFormat": "3d:1d Avg",
|
|
||||||
"refId": "A"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"thresholds": [],
|
|
||||||
"timeFrom": null,
|
|
||||||
"timeRegions": [],
|
|
||||||
"timeShift": null,
|
|
||||||
"title": "Vacination Rate",
|
|
||||||
"tooltip": {
|
|
||||||
"shared": true,
|
|
||||||
"sort": 0,
|
|
||||||
"value_type": "individual"
|
|
||||||
},
|
|
||||||
"type": "graph",
|
|
||||||
"xaxis": {
|
|
||||||
"buckets": null,
|
|
||||||
"mode": "time",
|
|
||||||
"name": null,
|
|
||||||
"show": true,
|
|
||||||
"values": []
|
|
||||||
},
|
|
||||||
"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
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": null,
|
|
||||||
"description": "% of Ontario Population partially or Fully Vaccinated.",
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"decimals": 0,
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "dark-red",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "semi-dark-red",
|
|
||||||
"value": 40
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "light-red",
|
|
||||||
"value": 50
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "semi-dark-yellow",
|
|
||||||
"value": 60
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "light-yellow",
|
|
||||||
"value": 70
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "light-green",
|
|
||||||
"value": 80
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "semi-dark-green",
|
|
||||||
"value": 90
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "percent"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 8,
|
|
||||||
"w": 11,
|
|
||||||
"x": 0,
|
|
||||||
"y": 13
|
|
||||||
},
|
|
||||||
"id": 2,
|
|
||||||
"links": [],
|
|
||||||
"options": {
|
|
||||||
"displayMode": "lcd",
|
|
||||||
"orientation": "horizontal",
|
|
||||||
"reduceOptions": {
|
|
||||||
"calcs": [
|
|
||||||
"lastNotNull"
|
|
||||||
],
|
|
||||||
"fields": "",
|
|
||||||
"values": false
|
|
||||||
},
|
|
||||||
"showUnfilled": true,
|
|
||||||
"text": {}
|
|
||||||
},
|
|
||||||
"pluginVersion": "7.5.1",
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"exemplar": true,
|
|
||||||
"expr": "(ontvacstat_total_doses_administered - ontvacstat_total_doses_in_fully_vaccinated_individuals) / (ontvacstat_eligible_population) * 100",
|
|
||||||
"format": "time_series",
|
|
||||||
"interval": "",
|
|
||||||
"intervalFactor": 1,
|
|
||||||
"legendFormat": "Partially Vaccinated",
|
|
||||||
"refId": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"exemplar": true,
|
|
||||||
"expr": "ontvacstat_total_individuals_fully_vaccinated / ontvacstat_eligible_population * 100",
|
|
||||||
"format": "time_series",
|
|
||||||
"interval": "",
|
|
||||||
"intervalFactor": 1,
|
|
||||||
"legendFormat": "Fully Vaccinated",
|
|
||||||
"refId": "B"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"exemplar": true,
|
|
||||||
"expr": "(ontvacstat_total_doses_administered - ontvacstat_total_doses_in_fully_vaccinated_individuals + ontvacstat_total_individuals_fully_vaccinated) / (ontvacstat_eligible_population) * 100",
|
|
||||||
"hide": false,
|
|
||||||
"interval": "",
|
|
||||||
"legendFormat": "Combined",
|
|
||||||
"refId": "C"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"timeFrom": null,
|
|
||||||
"timeShift": null,
|
|
||||||
"title": "Total Vaccinations & Fully Vaccinated (12+)",
|
|
||||||
"type": "bargauge"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"refresh": "15m",
|
|
||||||
"schemaVersion": 27,
|
|
||||||
"style": "dark",
|
|
||||||
"tags": [],
|
|
||||||
"templating": {
|
|
||||||
"list": []
|
|
||||||
},
|
|
||||||
"time": {
|
|
||||||
"from": "now-3d",
|
|
||||||
"to": "now"
|
|
||||||
},
|
|
||||||
"timepicker": {
|
|
||||||
"refresh_intervals": [
|
|
||||||
"15m",
|
|
||||||
"30m",
|
|
||||||
"1h",
|
|
||||||
"2h",
|
|
||||||
"1d"
|
|
||||||
],
|
|
||||||
"time_options": [
|
|
||||||
"5m",
|
|
||||||
"15m",
|
|
||||||
"1h",
|
|
||||||
"6h",
|
|
||||||
"12h",
|
|
||||||
"24h",
|
|
||||||
"2d",
|
|
||||||
"7d",
|
|
||||||
"30d"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"timezone": "",
|
|
||||||
"title": "Ontario Vaccination Stats",
|
|
||||||
"uid": "vhnVv3lMk",
|
|
||||||
"version": 38
|
|
||||||
},
|
|
||||||
"expires": 86400,
|
"expires": 86400,
|
||||||
"key": "ontvacstats"
|
"key": "ontvacstats"
|
||||||
}
|
}
|
9
main.go
9
main.go
@ -37,7 +37,7 @@ type OntCovidData struct {
|
|||||||
ID int `json:"_id"`
|
ID int `json:"_id"`
|
||||||
ReportDate string `json:"report_date"`
|
ReportDate string `json:"report_date"`
|
||||||
PreviousDayDosesAdministered int `json:"previous_day_total_doses_administered"`
|
PreviousDayDosesAdministered int `json:"previous_day_total_doses_administered"`
|
||||||
PreviousDayAtLeastOne int `json:"previous_day_at_least_one"`
|
PreviousDayAtLeastOne int `json:"previous_day_at_least_one"`
|
||||||
PreviousDayFullyVaccinated int `json:"previous_day_fully_vaccinated"`
|
PreviousDayFullyVaccinated int `json:"previous_day_fully_vaccinated"`
|
||||||
TotalDosesAdministered int `json:"total_doses_administered"`
|
TotalDosesAdministered int `json:"total_doses_administered"`
|
||||||
TotalDosesAtLeastOne int `json:"total_individuals_at_least_one"`
|
TotalDosesAtLeastOne int `json:"total_individuals_at_least_one"`
|
||||||
@ -55,10 +55,10 @@ type OntCovidData struct {
|
|||||||
|
|
||||||
var records struct {
|
var records struct {
|
||||||
PreviousDayDosesAdministered func() prometheus.Gauge `name:"previous_day_doses_administered" help:"Previous day doses administered"`
|
PreviousDayDosesAdministered func() prometheus.Gauge `name:"previous_day_doses_administered" help:"Previous day doses administered"`
|
||||||
PreviousDayAtLeastOne func() prometheus.Gauge `name:"previous_day_at_least_one" help:"Previous day doses administered at least one shot"`
|
PreviousDayAtLeastOne func() prometheus.Gauge `name:"previous_day_at_least_one" help:"Previous day doses administered at least one shot"`
|
||||||
PreviousDayFullyVaccinated func() prometheus.Gauge `name:"previous_day_fully_vaccinated" help:"Previous day doses administered fully vaccinated"`
|
PreviousDayFullyVaccinated func() prometheus.Gauge `name:"previous_day_fully_vaccinated" help:"Previous day doses administered fully vaccinated"`
|
||||||
TotalDosesAdministered func() prometheus.Gauge `name:"total_doses_administered" help:"Total doses administered"`
|
TotalDosesAdministered func() prometheus.Gauge `name:"total_doses_administered" help:"Total doses administered"`
|
||||||
TotalDosesAtLeastOne func() prometheus.Gauge `name:"total_individuals_at_least_one" help:"Total at least one dose in individuals"`
|
TotalDosesAtLeastOne func() prometheus.Gauge `name:"total_individuals_at_least_one" help:"Total at least one dose in individuals"`
|
||||||
TotalDosesInFullyVaccinatedIndividuals func() prometheus.Gauge `name:"total_doses_in_fully_vaccinated_individuals" help:"Total does in fully vaccinated individuals"`
|
TotalDosesInFullyVaccinatedIndividuals func() prometheus.Gauge `name:"total_doses_in_fully_vaccinated_individuals" help:"Total does in fully vaccinated individuals"`
|
||||||
TotalIndividualsFullyVaccinated func() prometheus.Gauge `name:"total_individuals_fully_vaccinated" help:"Total individuals fully vaccinated"`
|
TotalIndividualsFullyVaccinated func() prometheus.Gauge `name:"total_individuals_fully_vaccinated" help:"Total individuals fully vaccinated"`
|
||||||
EligiblePopulation func() prometheus.Gauge `name:"eligible_population" help:"Total population eligible for the vaccination"`
|
EligiblePopulation func() prometheus.Gauge `name:"eligible_population" help:"Total population eligible for the vaccination"`
|
||||||
@ -70,7 +70,7 @@ func init() {
|
|||||||
|
|
||||||
func updateMetrics() {
|
func updateMetrics() {
|
||||||
data_url := "https://data.ontario.ca/api/3/action/datastore_search?sort=report_date+desc&limit=1&resource_id=8a89caa9-511c-4568-af89-7f2174b4378c"
|
data_url := "https://data.ontario.ca/api/3/action/datastore_search?sort=report_date+desc&limit=1&resource_id=8a89caa9-511c-4568-af89-7f2174b4378c"
|
||||||
eligiblePopulation := int64(12932471) // Ontario population 12+ (https://www150.statcan.gc.ca/t1/tbl1/en/cv!recreate.action?pid=1710000501&selectedNodeIds=1D7,3D16,3D17,3D18,3D20,3D21,3D22,3D101&checkedLevels=1D1&refPeriods=20160101,20200101&dimensionLayouts=layout2,layout2,layout3,layout2&vectorDisplay=false)
|
eligiblePopulation := int64(12932471) // Ontario population 12+ (https://www150.statcan.gc.ca/t1/tbl1/en/cv!recreate.action?pid=1710000501&selectedNodeIds=1D7,3D16,3D17,3D18,3D20,3D21,3D22,3D101&checkedLevels=1D1&refPeriods=20160101,20200101&dimensionLayouts=layout2,layout2,layout3,layout2&vectorDisplay=false)
|
||||||
resp, getErr := http.Get(data_url)
|
resp, getErr := http.Get(data_url)
|
||||||
if getErr != nil {
|
if getErr != nil {
|
||||||
log.Println(getErr)
|
log.Println(getErr)
|
||||||
@ -88,7 +88,6 @@ func updateMetrics() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
records.PreviousDayDosesAdministered().Set(float64(data.Result.Records[0].PreviousDayDosesAdministered))
|
records.PreviousDayDosesAdministered().Set(float64(data.Result.Records[0].PreviousDayDosesAdministered))
|
||||||
records.PreviousDayAtLeastOne().Set(float64(data.Result.Records[0].PreviousDayAtLeastOne))
|
records.PreviousDayAtLeastOne().Set(float64(data.Result.Records[0].PreviousDayAtLeastOne))
|
||||||
records.PreviousDayFullyVaccinated().Set(float64(data.Result.Records[0].PreviousDayFullyVaccinated))
|
records.PreviousDayFullyVaccinated().Set(float64(data.Result.Records[0].PreviousDayFullyVaccinated))
|
||||||
|
Reference in New Issue
Block a user