{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "datasource",
          "uid": "grafana"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      },
      {
        "datasource": {
          "type": "postgres",
          "uid": "P172949F98CB31475"
        },
        "enable": true,
        "hide": false,
        "iconColor": "rgba(255, 96, 96, 1)",
        "limit": 100,
        "name": "Releases",
        "query": "SELECT title, description from annotations WHERE $timeFilter order by time asc",
        "rawQuery": "select extract(epoch from time) AS time, title as text, description as tags from sannotations where $__timeFilter(time)",
        "showIn": 0,
        "tagsColumn": "title,description",
        "textColumn": "",
        "titleColumn": "[[full_name]] Release",
        "type": "alert"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": 34,
  "iteration": 1727595998985,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "type": "postgres",
        "uid": "P172949F98CB31475"
      },
      "description": "[[full_name]] [[metric]] projects countries stats",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "Value",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "bars",
            "fillOpacity": 100,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "stepAfter",
            "lineWidth": 0,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "normal"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 21,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "links": [],
      "options": {
        "legend": {
          "calcs": [
            "mean",
            "lastNotNull",
            "max",
            "min"
          ],
          "displayMode": "table",
          "placement": "right"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "8.5.27",
      "targets": [
        {
          "alias": "",
          "datasource": {
            "type": "postgres",
            "uid": "P172949F98CB31475"
          },
          "dsType": "influxdb",
          "format": "time_series",
          "group": [],
          "groupBy": [],
          "measurement": "notused",
          "metricColumn": "none",
          "orderByTime": "ASC",
          "policy": "default",
          "rawQuery": true,
          "rawSql": "with countries as (\n  select unnest(string_to_array('${countries:csv}', ',')) as country\n), dates as (\n  select\n    distinct time\n  from\n    sprjcntr\n  where\n    period = 'q'\n)\nselect\n  d.time,\n  [[columns]]\nfrom\n  sprjcntr s,\n  countries c,\n  dates d\nwhere\n  $__timeFilter(d.time)\n  and s.time <= d.time\n  and s.period = 'q'\n  and s.series = 'prjcntr' || c.country || '[[metric]]'\ngroup by\n  d.time\norder by\n  d.time",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": [],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "[[full_name]] [[metric]] projects countries stats",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "P172949F98CB31475"
      },
      "description": "[[full_name]] [[metric]] countries stats",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "Value",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 5,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 21,
        "w": 24,
        "x": 0,
        "y": 21
      },
      "id": 4,
      "links": [],
      "options": {
        "legend": {
          "calcs": [
            "mean",
            "lastNotNull",
            "max",
            "min"
          ],
          "displayMode": "table",
          "placement": "right"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "8.5.27",
      "targets": [
        {
          "alias": "",
          "datasource": {
            "type": "postgres",
            "uid": "P172949F98CB31475"
          },
          "dsType": "influxdb",
          "format": "time_series",
          "group": [],
          "groupBy": [],
          "measurement": "notused",
          "metricColumn": "none",
          "orderByTime": "ASC",
          "policy": "default",
          "rawQuery": true,
          "rawSql": "with countries as (\n  select unnest(string_to_array('${countries:csv}', ',')) as country\n), dates as (\n  select\n    distinct time\n  from\n    sprjcntr\n  where\n    period = 'q'\n)\nselect\n  d.time,\n  [[columns]]\nfrom\n  sprjcntr s,\n  countries c,\n  dates d\nwhere\n  $__timeFilter(d.time)\n  and s.time <= d.time\n  and s.period = 'q'\n  and s.series = 'prjcntr' || c.country || '[[metric]]'\ngroup by\n  d.time\norder by\n  d.time",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": [],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "[[full_name]] [[metric]] project countries stats",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "P172949F98CB31475"
      },
      "description": "[[full_name]] [[metric]] project countries stats",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "Value",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "bars",
            "fillOpacity": 100,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "stepAfter",
            "lineWidth": 0,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "percent"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 21,
        "w": 24,
        "x": 0,
        "y": 42
      },
      "id": 3,
      "links": [],
      "options": {
        "legend": {
          "calcs": [
            "mean",
            "lastNotNull",
            "max",
            "min"
          ],
          "displayMode": "table",
          "placement": "right"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "desc"
        }
      },
      "pluginVersion": "8.5.27",
      "targets": [
        {
          "alias": "",
          "datasource": {
            "type": "postgres",
            "uid": "P172949F98CB31475"
          },
          "dsType": "influxdb",
          "format": "time_series",
          "group": [],
          "groupBy": [],
          "measurement": "notused",
          "metricColumn": "none",
          "orderByTime": "ASC",
          "policy": "default",
          "rawQuery": true,
          "rawSql": "with countries as (\n  select unnest(string_to_array('${countries:csv}', ',')) as country\n), dates as (\n  select\n    distinct time\n  from\n    sprjcntr\n  where\n    period = 'q'\n)\nselect\n  d.time,\n  [[columns]]\nfrom\n  sprjcntr s,\n  countries c,\n  dates d\nwhere\n  $__timeFilter(d.time)\n  and s.time <= d.time\n  and s.period = 'q'\n  and s.series = 'prjcntr' || c.country || '[[metric]]'\ngroup by\n  d.time\norder by\n  d.time",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": [],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "[[full_name]] [[metric]] project countries stats",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "P172949F98CB31475"
      },
      "gridPos": {
        "h": 16,
        "w": 24,
        "x": 0,
        "y": 63
      },
      "id": 1,
      "links": [],
      "options": {
        "content": "${docs:raw}",
        "mode": "html"
      },
      "pluginVersion": "8.5.27",
      "title": "Dashboard documentation",
      "type": "text"
    }
  ],
  "refresh": false,
  "schemaVersion": 36,
  "style": "dark",
  "tags": [
    "dashboard",
    "all"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "All CNCF",
          "value": "All CNCF"
        },
        "datasource": {
          "type": "postgres",
          "uid": "P172949F98CB31475"
        },
        "definition": "",
        "hide": 2,
        "includeAll": false,
        "multi": false,
        "name": "full_name",
        "options": [],
        "query": "select value_s from gha_vars where name = 'full_name'",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": true,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {
          "selected": true,
          "text": "Contributors",
          "value": "contributors"
        },
        "hide": 0,
        "includeAll": false,
        "label": "Metric",
        "multi": false,
        "name": "metric",
        "options": [
          {
            "selected": false,
            "text": "Contributions",
            "value": "contributions"
          },
          {
            "selected": true,
            "text": "Contributors",
            "value": "contributors"
          },
          {
            "selected": false,
            "text": "Users",
            "value": "users"
          },
          {
            "selected": false,
            "text": "Activity",
            "value": "events"
          },
          {
            "selected": false,
            "text": "Pushers",
            "value": "committers"
          },
          {
            "selected": false,
            "text": "Pushes",
            "value": "commits"
          },
          {
            "selected": false,
            "text": "Committers",
            "value": "rcommitters"
          },
          {
            "selected": false,
            "text": "Commits",
            "value": "rcommits"
          },
          {
            "selected": false,
            "text": "PR creators",
            "value": "prcreators"
          },
          {
            "selected": false,
            "text": "PRs",
            "value": "prs"
          },
          {
            "selected": false,
            "text": "Issue creators",
            "value": "issuecreators"
          },
          {
            "selected": false,
            "text": "Issues",
            "value": "issues"
          },
          {
            "selected": false,
            "text": "Commenters",
            "value": "commenters"
          },
          {
            "selected": false,
            "text": "Comments",
            "value": "comments"
          },
          {
            "selected": false,
            "text": "Reviewers",
            "value": "reviewers"
          },
          {
            "selected": false,
            "text": "Reviews",
            "value": "reviews"
          },
          {
            "selected": false,
            "text": "Watchers",
            "value": "watchers"
          },
          {
            "selected": false,
            "text": "Watches",
            "value": "watches"
          },
          {
            "selected": false,
            "text": "Forkers",
            "value": "forkers"
          },
          {
            "selected": false,
            "text": "Forks",
            "value": "forks"
          }
        ],
        "query": "contributions,contributors,users,events,committers,commits,rcommitters,rcommits,prcreators,prs,issuecreators,issues,commenters,comments,reviewers,reviews,watchers,watches,forkers,forks",
        "queryValue": "",
        "skipUrlSync": false,
        "type": "custom"
      },
      {
        "allValue": "",
        "current": {
          "selected": true,
          "text": [
            "United States",
            "United Kingdom",
            "China",
            "Germany",
            "India",
            "Poland",
            "Canada",
            "Japan",
            "Spain",
            "France"
          ],
          "value": [
            "United States",
            "United Kingdom",
            "China",
            "Germany",
            "India",
            "Poland",
            "Canada",
            "Japan",
            "Spain",
            "France"
          ]
        },
        "datasource": {
          "type": "postgres",
          "uid": "P172949F98CB31475"
        },
        "definition": "select country_name from tcountries order by time asc",
        "hide": 0,
        "includeAll": true,
        "label": "Countries",
        "multi": true,
        "name": "countries",
        "options": [],
        "query": "select country_name from tcountries order by time asc",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {
          "selected": true,
          "text": [
            "Kubernetes",
            "Istio",
            "OpenTelemetry",
            "KubeVirt",
            "Knative",
            "gRPC",
            "Envoy",
            "Helm",
            "Cilium",
            "Argo"
          ],
          "value": [
            "Kubernetes",
            "Istio",
            "OpenTelemetry",
            "KubeVirt",
            "Knative",
            "gRPC",
            "Envoy",
            "Helm",
            "Cilium",
            "Argo"
          ]
        },
        "datasource": {
          "type": "postgres",
          "uid": "P172949F98CB31475"
        },
        "definition": "select repo_group_name from trepo_groups order by time asc",
        "hide": 0,
        "includeAll": true,
        "label": "Projects",
        "multi": true,
        "name": "projects",
        "options": [],
        "query": "select repo_group_name from trepo_groups order by time asc",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {
          "selected": false,
          "text": "round(hll_cardinality(hll_union_agg(s.\"Kubernetes\"))) as \"Kubernetes\",round(hll_cardinality(hll_union_agg(s.\"Istio\"))) as \"Istio\",round(hll_cardinality(hll_union_agg(s.\"OpenTelemetry\"))) as \"OpenTelemetry\",round(hll_cardinality(hll_union_agg(s.\"KubeVirt\"))) as \"KubeVirt\",round(hll_cardinality(hll_union_agg(s.\"Knative\"))) as \"Knative\",round(hll_cardinality(hll_union_agg(s.\"gRPC\"))) as \"gRPC\",round(hll_cardinality(hll_union_agg(s.\"Envoy\"))) as \"Envoy\",round(hll_cardinality(hll_union_agg(s.\"Helm\"))) as \"Helm\",round(hll_cardinality(hll_union_agg(s.\"Cilium\"))) as \"Cilium\",round(hll_cardinality(hll_union_agg(s.\"Argo\"))) as \"Argo\"",
          "value": "round(hll_cardinality(hll_union_agg(s.\"Kubernetes\"))) as \"Kubernetes\",round(hll_cardinality(hll_union_agg(s.\"Istio\"))) as \"Istio\",round(hll_cardinality(hll_union_agg(s.\"OpenTelemetry\"))) as \"OpenTelemetry\",round(hll_cardinality(hll_union_agg(s.\"KubeVirt\"))) as \"KubeVirt\",round(hll_cardinality(hll_union_agg(s.\"Knative\"))) as \"Knative\",round(hll_cardinality(hll_union_agg(s.\"gRPC\"))) as \"gRPC\",round(hll_cardinality(hll_union_agg(s.\"Envoy\"))) as \"Envoy\",round(hll_cardinality(hll_union_agg(s.\"Helm\"))) as \"Helm\",round(hll_cardinality(hll_union_agg(s.\"Cilium\"))) as \"Cilium\",round(hll_cardinality(hll_union_agg(s.\"Argo\"))) as \"Argo\""
        },
        "datasource": {
          "type": "postgres",
          "uid": "P172949F98CB31475"
        },
        "definition": "with projects as (\n  select unnest(string_to_array('${projects:csv}', ',')) as project\n)\nselect string_agg('round(hll_cardinality(hll_union_agg(s.\"' || project || '\"))) as \"' || project || '\"', ',') from projects",
        "hide": 2,
        "includeAll": false,
        "label": "Projects",
        "multi": false,
        "name": "columns",
        "options": [],
        "query": "with projects as (\n  select unnest(string_to_array('${projects:csv}', ',')) as project\n)\nselect string_agg('round(hll_cardinality(hll_union_agg(s.\"' || project || '\"))) as \"' || project || '\"', ',') from projects",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {
          "selected": false,
          "text": "<h1 id=\"dashboard-header\">All CNCF project country statistics cumulative dashboard</h1>\n<p>Links:</p>\n<ul>\n<li>Metric <a href=\"https://github.com/cncf/devstats/blob/master/metrics/all/project_countries.sql\" target=\"_blank\">SQL file</a>.</li>\n<li>Committers metric <a href=\"https://github.com/cncf/devstats/blob/master/metrics/all/project_countries_commiters.sql\" target=\"_blank\">SQL file</a>.</li>\n<li>TSDB <a href=\"https://github.com/cncf/devstats/blob/master/metrics/all/metrics.yaml\" target=\"_blank\">series definition</a>. Search for <code>project_countries</code></li>\n<li>Grafana dashboard <a href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/all/project-country-statistics-cumulative.json\" target=\"_blank\">JSON</a>.</li>\n</ul>\n<h1 id=\"description\">Description</h1>\n<ul>\n<li>This dashboard shows projects countries statistics (quarterly cumulative).</li>\n<li>Contributor is defined as somebody who made a review, comment, commit, created PR or issue.</li>\n<li>Contribution is a review, comment, commit, issue or PR.</li>\n<li>We are determining contributor's country by using GitHub localization and searching for a country using <a href=\"http://www.geonames.org\" target=\"_blank\">geonames</a> database.</li>\n<li>You can select one, multiple or all countries to generate statistics for, quarter, year. Countries are displayed in order of top contributing ones.</li>\n<li>You can select one, multiple or all projects to be displayed (stacked, line chart and 100% stacked). Projects are displayed in order of top contributing ones.</li>\n<li>By default it generates statistics for top 10 projects in top 10 countries.</li>\n<li>You can choose to display contributors, contributions, users, issues, PRs, actvity, committers, commits etc.</li>\n<li>See <a href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\">here</a> for more informations about repository groups (projects).</li>\n<li>We are skipping bots activity, see <a href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\">excluding bots</a> for details.</li>\n</ul>",
          "value": "<h1 id=\"dashboard-header\">All CNCF project country statistics cumulative dashboard</h1>\n<p>Links:</p>\n<ul>\n<li>Metric <a href=\"https://github.com/cncf/devstats/blob/master/metrics/all/project_countries.sql\" target=\"_blank\">SQL file</a>.</li>\n<li>Committers metric <a href=\"https://github.com/cncf/devstats/blob/master/metrics/all/project_countries_commiters.sql\" target=\"_blank\">SQL file</a>.</li>\n<li>TSDB <a href=\"https://github.com/cncf/devstats/blob/master/metrics/all/metrics.yaml\" target=\"_blank\">series definition</a>. Search for <code>project_countries</code></li>\n<li>Grafana dashboard <a href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/all/project-country-statistics-cumulative.json\" target=\"_blank\">JSON</a>.</li>\n</ul>\n<h1 id=\"description\">Description</h1>\n<ul>\n<li>This dashboard shows projects countries statistics (quarterly cumulative).</li>\n<li>Contributor is defined as somebody who made a review, comment, commit, created PR or issue.</li>\n<li>Contribution is a review, comment, commit, issue or PR.</li>\n<li>We are determining contributor's country by using GitHub localization and searching for a country using <a href=\"http://www.geonames.org\" target=\"_blank\">geonames</a> database.</li>\n<li>You can select one, multiple or all countries to generate statistics for, quarter, year. Countries are displayed in order of top contributing ones.</li>\n<li>You can select one, multiple or all projects to be displayed (stacked, line chart and 100% stacked). Projects are displayed in order of top contributing ones.</li>\n<li>By default it generates statistics for top 10 projects in top 10 countries.</li>\n<li>You can choose to display contributors, contributions, users, issues, PRs, actvity, committers, commits etc.</li>\n<li>See <a href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\">here</a> for more informations about repository groups (projects).</li>\n<li>We are skipping bots activity, see <a href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\">excluding bots</a> for details.</li>\n</ul>"
        },
        "datasource": {
          "type": "postgres",
          "uid": "P172949F98CB31475"
        },
        "definition": "",
        "hide": 2,
        "includeAll": false,
        "multi": false,
        "name": "docs",
        "options": [],
        "query": "select value_s from gha_vars where name = 'project_countries_cum_stats_docs_html'",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": true,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-5y",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "Project Country Statistics cumulative",
  "uid": "86",
  "version": 6,
  "weekStart": ""
}
