{
  "annotations": {
    "list": [
      {
        "$$hashKey": "object:37",
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      },
      {
        "$$hashKey": "object:142",
        "datasource": "psql",
        "enable": true,
        "hide": false,
        "iconColor": "rgba(255, 96, 96, 1)",
        "limit": 100,
        "name": "Releases",
        "rawQuery": "select extract(epoch from time) AS time, title as text, description as tags from sannotations where $__timeFilter(time)",
        "showIn": 0,
        "tags": [],
        "type": "tags"
      }
    ]
  },
  "description": "",
  "editable": true,
  "gnetId": null,
  "graphTooltip": 0,
  "id": 8,
  "iteration": 1599300680243,
  "links": [],
  "panels": [
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": null,
      "description": "Contributions mean the current metric count. Contributors mean the current metric's authors count. When the aggregation period \"7 Days MA\" is used - the weekly number of authors is displayed and the average daily number of contributions (which is the total number of contributions in a moving average week divided by 7).",
      "fill": 0,
      "fillGradient": 0,
      "gridPos": {
        "h": 21,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 5,
      "interval": "",
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": true,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": false,
      "linewidth": 1,
      "nullPointMode": "null as zero",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "$$hashKey": "object:2209",
          "alias": "Contributors",
          "bars": false,
          "color": "#C4162A",
          "lines": true,
          "linewidth": 2,
          "yaxis": 2
        },
        {
          "$$hashKey": "object:191",
          "alias": "Contributions",
          "color": "#1F60C4"
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  time,\n  value as \"Contributions\"\nfrom\n  scs\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'cs[[metric]][[repogroup]][[country]][[company]]evs'\norder by\n  time",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "lang_perc"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "gha_repos_langs",
          "timeColumn": "dt",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select\n  time,\n  value as \"Contributors\"\nfrom\n  scs\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'cs[[metric]][[repogroup]][[country]][[company]]acts'\norder by\n  time",
          "refId": "B",
          "select": [
            [
              {
                "params": [
                  "lang_perc"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "gha_repos_langs",
          "timeColumn": "dt",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "[[metric]] chart: aggregation: [[period]], repository group: [[repogroup_name]], country: [[country_name]], company: [[company_name]]",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:2039",
          "decimals": 2,
          "format": "none",
          "label": "Contributions",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "$$hashKey": "object:2040",
          "decimals": 0,
          "format": "none",
          "label": "Contributors",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "content": "${docs:raw}",
      "datasource": null,
      "gridPos": {
        "h": 18,
        "w": 24,
        "x": 0,
        "y": 21
      },
      "id": 3,
      "links": [],
      "mode": "html",
      "title": "Dashboard documentation",
      "type": "text"
    }
  ],
  "refresh": false,
  "schemaVersion": 22,
  "style": "dark",
  "tags": [
    "dashboard",
    "sops",
    "companies",
    "repogroups"
  ],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {
          "$$hashKey": "object:1598",
          "selected": false,
          "tags": [],
          "text": "Month",
          "value": "m"
        },
        "hide": 0,
        "includeAll": false,
        "label": "Period",
        "multi": false,
        "name": "period",
        "options": [
          {
            "$$hashKey": "object:1598",
            "selected": true,
            "text": "7 Days MA",
            "value": "d7"
          },
          {
            "$$hashKey": "object:1600",
            "selected": false,
            "text": "Week",
            "value": "w"
          },
          {
            "$$hashKey": "object:1601",
            "selected": false,
            "text": "Month",
            "value": "m"
          }
        ],
        "query": "d7,w,m",
        "skipUrlSync": false,
        "type": "custom"
      },
      {
        "allValue": null,
        "current": {
          "$$hashKey": "object:1430",
          "selected": true,
          "tags": [],
          "text": "Contributions",
          "value": "contributions"
        },
        "hide": 0,
        "includeAll": false,
        "label": "Metric",
        "multi": false,
        "name": "metric",
        "options": [
          {
            "$$hashKey": "object:1425",
            "selected": false,
            "text": "Comments",
            "value": "comments"
          },
          {
            "$$hashKey": "object:1426",
            "selected": false,
            "text": "Commit comments",
            "value": "commitcomments"
          },
          {
            "$$hashKey": "object:1427",
            "selected": false,
            "text": "Commits",
            "value": "commits"
          },
          {
            "$$hashKey": "object:1428",
            "selected": false,
            "text": "GitHub events",
            "value": "events"
          },
          {
            "$$hashKey": "object:1429",
            "selected": false,
            "text": "GitHub pushes",
            "value": "pushes"
          },
          {
            "$$hashKey": "object:1430",
            "selected": true,
            "text": "Contributions",
            "value": "contributions"
          },
          {
            "$$hashKey": "object:1431",
            "selected": false,
            "text": "Issue comments",
            "value": "issuecomments"
          },
          {
            "$$hashKey": "object:1432",
            "selected": false,
            "text": "Issues",
            "value": "issues"
          },
          {
            "$$hashKey": "object:1433",
            "selected": false,
            "text": "PRs",
            "value": "prs"
          },
          {
            "$$hashKey": "object:1434",
            "selected": false,
            "text": "Merged PRs",
            "value": "mergedprs"
          },
          {
            "$$hashKey": "object:1435",
            "selected": false,
            "text": "Review comments",
            "value": "reviewcomments"
          }
        ],
        "query": "comments,commitcomments,commits,events,pushes,contributions,issuecomments,issues,prs,mergedprs,reviewcomments",
        "skipUrlSync": false,
        "type": "custom"
      },
      {
        "allValue": null,
        "current": {
          "text": "All CNCF",
          "value": "All CNCF"
        },
        "datasource": "psql",
        "definition": "",
        "hide": 2,
        "includeAll": false,
        "index": -1,
        "label": null,
        "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": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {
          "text": "All",
          "value": "All"
        },
        "datasource": "psql",
        "definition": "",
        "hide": 0,
        "includeAll": false,
        "index": -1,
        "label": "Repository group",
        "multi": false,
        "name": "repogroup_name",
        "options": [],
        "query": "select all_repo_group_name from tall_repo_groups order by 1",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {
          "text": "all",
          "value": "all"
        },
        "datasource": "psql",
        "definition": "",
        "hide": 2,
        "includeAll": false,
        "index": -1,
        "label": "",
        "multi": false,
        "name": "repogroup",
        "options": [],
        "query": "select all_repo_group_value from tall_repo_groups where all_repo_group_name = '[[repogroup_name]]'",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": true,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": "all",
        "current": {
          "text": "All",
          "value": "All"
        },
        "datasource": "psql",
        "definition": "select sub.name from (select 'All' as name, 0 as ord union select country_name as name, 1 as ord from tcountries) sub order by sub.ord, sub.name",
        "hide": 0,
        "includeAll": false,
        "index": -1,
        "label": "Country",
        "multi": false,
        "name": "country_name",
        "options": [],
        "query": "select sub.name from (select 'All' as name, 0 as ord union select country_name as name, 1 as ord from tcountries) sub order by sub.ord, sub.name",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {
          "text": "all",
          "value": "all"
        },
        "datasource": "psql",
        "definition": "select sub.value from (select country_value as value, 0 as ord from tcountries where country_name = '[[country_name]]' union select 'all', 1 as ord) sub order by sub.ord limit 1",
        "hide": 2,
        "includeAll": false,
        "index": -1,
        "label": "",
        "multi": false,
        "name": "country",
        "options": [],
        "query": "select sub.value from (select country_value as value, 0 as ord from tcountries where country_name = '[[country_name]]' union select 'all', 1 as ord) sub order by sub.ord limit 1",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": true,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": "",
        "current": {
          "text": "All",
          "value": "All"
        },
        "datasource": "psql",
        "definition": "select sub.name from (select 'All' as name, '1900-01-01' as time union select companies_name, time from tcompanies) sub order by sub.time",
        "hide": 0,
        "includeAll": false,
        "index": -1,
        "label": "Company",
        "multi": false,
        "name": "company_name",
        "options": [],
        "query": "select sub.name from (select 'All' as name, '1900-01-01' as time union select companies_name, time from tcompanies) sub order by sub.time",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": "",
        "current": {
          "text": "all",
          "value": "all"
        },
        "datasource": "psql",
        "definition": "select sub.value from (select companies_value as value, 0 as ord from tcompanies where companies_name = '[[company_name]]' union select 'all', 1 as ord) sub order by sub.ord limit 1",
        "hide": 2,
        "includeAll": false,
        "index": -1,
        "label": "",
        "multi": false,
        "name": "company",
        "options": [],
        "query": "select sub.value from (select companies_value as value, 0 as ord from tcompanies where companies_name = '[[company_name]]' union select 'all', 1 as ord) sub order by sub.ord limit 1",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {
          "text": "<h1>All CNCF Contributions chart dashboard</h1>\n<p>Links:</p>\n<ul>\n<li>Committers metric <a href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/committers.sql\" target=\"_blank\">SQL file</a>.</li>\n<li>Contributors metric <a href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/contributors.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>Contributions chart</code></li>\n<li>Grafana dashboard <a href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/all/contributions-chart.json\" target=\"_blank\">JSON</a>.</li>\n</ul>\n<h1 id=\"description\">Description</h1>\n<ul>\n<li>This dashboard shows various developer metrics groupped by repository groups, counteries and companies.</li>\n<li>You can select last day, month, week or 7 days moving average.</li>\n<li>If you select moving average, you will see the number of contributors in a moving 7 day average window and the number of contributions in that window divided by 7.</li>\n<li>You can select repository group or summary for all of them.</li>\n<li>You can select country from a drop-down or summary for all countries.</li>\n<li>You can select company from a drop-down or summary for all companies.</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.</li>\n<li>We are skipping bots when calculating statistics, see <a href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\">excluding bots</a> for details.</li>\n<li>We are determining user's company affiliation from <a href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\">this file</a>, which is imported from <code>cncf/gitdm</code>.</li>\n</ul>",
          "value": "<h1>All CNCF Contributions chart dashboard</h1>\n<p>Links:</p>\n<ul>\n<li>Committers metric <a href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/committers.sql\" target=\"_blank\">SQL file</a>.</li>\n<li>Contributors metric <a href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/contributors.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>Contributions chart</code></li>\n<li>Grafana dashboard <a href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/all/contributions-chart.json\" target=\"_blank\">JSON</a>.</li>\n</ul>\n<h1 id=\"description\">Description</h1>\n<ul>\n<li>This dashboard shows various developer metrics groupped by repository groups, counteries and companies.</li>\n<li>You can select last day, month, week or 7 days moving average.</li>\n<li>If you select moving average, you will see the number of contributors in a moving 7 day average window and the number of contributions in that window divided by 7.</li>\n<li>You can select repository group or summary for all of them.</li>\n<li>You can select country from a drop-down or summary for all countries.</li>\n<li>You can select company from a drop-down or summary for all companies.</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.</li>\n<li>We are skipping bots when calculating statistics, see <a href=\"https://github.com/cncf/devstats/blob/master/docs/excluding_bots.md\" target=\"_blank\">excluding bots</a> for details.</li>\n<li>We are determining user's company affiliation from <a href=\"https://github.com/cncf/devstats/blob/master/github_users.json\" target=\"_blank\">this file</a>, which is imported from <code>cncf/gitdm</code>.</li>\n</ul>"
        },
        "datasource": "psql",
        "definition": "select value_s from gha_vars where name = 'contributions_chart_docs_html'",
        "hide": 2,
        "includeAll": false,
        "index": -1,
        "label": null,
        "multi": false,
        "name": "docs",
        "options": [],
        "query": "select value_s from gha_vars where name = 'contributions_chart_docs_html'",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": true,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-1y",
    "to": "now-2d"
  },
  "timepicker": {
    "hidden": false,
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "Contributions chart",
  "uid": "74",
  "variables": {
    "list": []
  },
  "version": 6
}
