{"id":13402326,"url":"https://github.com/madnight/githut","last_synced_at":"2025-05-16T09:00:24.039Z","repository":{"id":11724540,"uuid":"70368917","full_name":"madnight/githut","owner":"madnight","description":"Github Language Statistics","archived":false,"fork":false,"pushed_at":"2024-04-03T10:10:56.000Z","size":40277,"stargazers_count":991,"open_issues_count":15,"forks_count":130,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-04-08T20:19:40.515Z","etag":null,"topics":["bigquery","dataset","functional-reactive-programming","github-language-statistics","github-pages-website","jamstack","languages","programming-languages","react","react-hooks","serverless","sql-query","statistics"],"latest_commit_sha":null,"homepage":"https://madnight.github.io/githut","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/madnight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-10-09T01:57:53.000Z","updated_at":"2025-04-05T08:50:06.000Z","dependencies_parsed_at":"2023-01-14T07:45:56.899Z","dependency_job_id":"b47a86b3-9e8c-4510-8efc-7335ade8ef07","html_url":"https://github.com/madnight/githut","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madnight%2Fgithut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madnight%2Fgithut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madnight%2Fgithut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madnight%2Fgithut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madnight","download_url":"https://codeload.github.com/madnight/githut/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254501547,"owners_count":22081526,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigquery","dataset","functional-reactive-programming","github-language-statistics","github-pages-website","jamstack","languages","programming-languages","react","react-hooks","serverless","sql-query","statistics"],"created_at":"2024-07-30T19:01:14.556Z","updated_at":"2025-05-16T09:00:23.902Z","avatar_url":"https://github.com/madnight.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n    \u003ch1 align=\"center\"\u003eGitHub Language Statistics\u003cbr\u003e\u003c/h1\u003e\n\u003c/p\u003e\n\n\u003ca href=\"https://www.gnu.org/licenses/agpl-3.0.en.html\"\u003e\u003cimg height=\"20\" src=\"https://img.shields.io/badge/license-AGPL--3.0-brightgreen.svg\" alt=\"License (AGPL-3.0)\"\u003e\u003c/a\u003e\n\u003ca href=\"https://codeclimate.com/github/madnight/githut\"\u003e\u003cimg height=\"20\" src=\"https://codeclimate.com/github/madnight/githut/badges/issue_count.svg\" alt=\"Issue Count\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/prettier/prettier\"\u003e\u003cimg src=\"https://img.shields.io/badge/code_style-prettier-blue.svg\" alt=\"Code Style\"\u003e\u003c/a\u003e\n\u003cimg src=\"https://i.imgur.com/WK7zKol.png\" alt=\"\"\u003e\u003c/p\u003e\n\n## Data Generation\n### Languages\nGet language top list for Github\n```SQL\nSELECT language.name, COUNT(language.name)\nAS count FROM [bigquery-public-data:github_repos.languages]\ngroup by language.name order by count DESC\n```\n\nResult of first 10 from 322\n```JavaScript\n{\"language_name\":\"JavaScript\",\"count\":\"1006022\"}\n{\"language_name\":\"CSS\",\"count\":\"745573\"}\n{\"language_name\":\"HTML\",\"count\":\"663315\"}\n{\"language_name\":\"Shell\",\"count\":\"593461\"}\n{\"language_name\":\"Python\",\"count\":\"492715\"}\n{\"language_name\":\"Ruby\",\"count\":\"365413\"}\n{\"language_name\":\"Java\",\"count\":\"340622\"}\n{\"language_name\":\"PHP\",\"count\":\"328907\"}\n{\"language_name\":\"C\",\"count\":\"286272\"}\n{\"language_name\":\"C++\",\"count\":\"267552\"}\n...\n```\n### Licenses\nGet license top list for Github\n```SQL\nSELECT license, COUNT(license)\nAS count FROM [bigquery-public-data:github_repos.licenses]\ngroup by license order by count DESC\n```\n\nFull result\n```JavaScript\n{\"license\":\"mit\",\"count\":\"1551711\"}\n{\"license\":\"apache-2.0\",\"count\":\"455316\"}\n{\"license\":\"gpl-2.0\",\"count\":\"376453\"}\n{\"license\":\"gpl-3.0\",\"count\":\"284761\"}\n{\"license\":\"bsd-3-clause\",\"count\":\"161041\"}\n{\"license\":\"bsd-2-clause\",\"count\":\"57412\"}\n{\"license\":\"unlicense\",\"count\":\"43899\"}\n{\"license\":\"lgpl-3.0\",\"count\":\"38213\"}\n{\"license\":\"agpl-3.0\",\"count\":\"38034\"}\n{\"license\":\"cc0-1.0\",\"count\":\"28600\"}\n{\"license\":\"epl-1.0\",\"count\":\"24074\"}\n{\"license\":\"lgpl-2.1\",\"count\":\"23872\"}\n{\"license\":\"isc\",\"count\":\"17690\"}\n{\"license\":\"mpl-2.0\",\"count\":\"17421\"}\n{\"license\":\"artistic-2.0\",\"count\":\"9413\"}\n```\n\n### Pull Requests\nGet the number of Pull Requests per day/month/year\n```SQL\nSELECT language as name, year, quarter, count FROM ( SELECT * FROM (\nSELECT lang as language, y as year, q as quarter, type,\nCOUNT(*) as count FROM (SELECT a.type type, b.lang lang, a.y y, a.q q FROM (\nSELECT type, actor.login, YEAR(created_at) as y, QUARTER(created_at) as q,\nSTRING(REGEXP_REPLACE(repo.url, r'https:\\/\\/github\\.com\\/|https:\\/\\/api\\.github\\.com\\/repos\\/', '')) as name\nFROM [githubarchive:month.201901] WHERE NOT LOWER(actor.login) LIKE \"%bot%\") a\nJOIN ( SELECT repo_name as name, lang FROM ( SELECT * FROM (\nSELECT *, ROW_NUMBER() OVER (PARTITION BY repo_name ORDER BY lang) as num FROM (\nSELECT repo_name, FIRST_VALUE(language.name) OVER (\npartition by repo_name order by language.bytes DESC) AS lang\nFROM [bigquery-public-data:github_repos.languages]))\nWHERE num = 1 order by repo_name)\nWHERE lang != 'null') b ON a.name = b.name)\nGROUP by type, language, year, quarter\norder by year, quarter, count DESC)\nWHERE count \u003e= 100) WHERE type = 'PullRequestEvent'\n```\n\n### Manual\nGoogles BigQuery is free for public datasets like Github, Reddit or Stackoverflow. It is limited to 1000 GB query volume per month. One of the querys above takes about 50-200 MB query volume. The public dataset for Github is available here: https://console.cloud.google.com/bigquery?p=bigquery-public-data\u0026d=samples\u0026t=github_nested\u0026page=table\n\n\n### URL Schema\n\n```\nmadnight.github.io/githut/#/pull_requests/2021/1/Python,Lua,JavaScript\n                                 ▲         ▲   ▲        ▲\n                                 │         │   │        │\n                pull_requests ───┘   year ─┘   │        └─ languages\n                pushes                         └─ quarter\n                stars\n                issues\n```\n\n### BibTeX\n\nIf you wish to quote, you may use the following BibTeX.\n\n```\n@misc{githuttwo,\n  author = {Fabian Beuke},\n  title = {GitHut 2.0: GitHub Language Statistics},\n  year = {2023},\n  note = {GitHub repository},\n  howpublished = {\\url{https://madnight.github.io/githut/#/}}\n}\n```\n","funding_links":[],"categories":["JavaScript","languages","statistics"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadnight%2Fgithut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadnight%2Fgithut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadnight%2Fgithut/lists"}