Team Ai
Datasetpublic

ibragim-bad/github-repos-metadata-40M

๐Ÿ“Š Metadata for 40 million GitHub repositories A cleaned, analysis-ready dataset with per-repository statistics aggregated from GH Archive events: stars, forks, pull requests, open issues, visibility, language signals, and more. Column names mirror the GH Archive / GitHub API semantics where possible. GitHub repo: https://github.com/ibragim-bad/github-repos-metadata-40M Source: GH Archive (public GitHub event stream). โœ… Projects with complementary ideasโ€ฆ See the full description on the dataset page: https://huggingface.co/datasets/ibragim-bad/github-repos-metadata-40M.

sourceHugging Facemitupdated 9mo agoView on Hugging Face
23likes399downloads
Dataset Card

๐Ÿ“Š Metadata for 40 million GitHub repositories

![License](#license) ![Dataset]() ![HF Hub]()

A cleaned, analysis-ready dataset with per-repository statistics aggregated from GH Archive events: stars, forks, pull requests, open issues, visibility, language signals, and more. Column names mirror the GH Archive / GitHub API semantics where possible. GitHub repo: https://github.com/ibragim-bad/github-repos-metadata-40M

Source: GH Archive (public GitHub event stream).

โœ… Projects with complementary ideas

GitHub Repo Embeddings dataset: Puzer/github-repo-embeddings and a cool demo built on top of this embeddings dataset

๐Ÿš€ Quickstart

python
from datasets import load_dataset

ds = load_dataset("ibragim-bad/github-repos-metadata-40M", split="full")  # or 'sample' for random sample of 1 million repositories.

๐Ÿ“ˆ EDA Notebook

  • โ€”data_visualisation.ipynb: Simple exploratory data analysis of the dataset (column overview, basic distributions, missing-value checks, sample visualizations).

๐Ÿ’ก Use cases

  • โ€”Trend analysis of stars/forks/PRs
  • โ€”Language mix & repo growth signals
  • โ€”Ranking by activity / stability
  • โ€”Input features for ML models (quality or popularity prediction)

๐Ÿ“ฆ Whatโ€™s inside

Each row aggregates repository-level stats derived from GH Archive events and GitHub metadata snapshots.

Schema (columns & types)

ColumnTypeDescription
repo_namestringowner/name
languagestringPrimary language (human-readable)
created_attimestampRepo creation time (UTC) if available
descriptionstringRepo description
description_languagestringDetected natural-language code of the repository description (ISO 639-1/2)
description_language_scorefloat32Confidence score for description_language (0โ€“1)
license_keystringSPDX-like license key
forks_countint64Current forks count
watchers_countint64Watchers/stars count (note: GitHubโ€™s legacy โ€œwatchersโ€ vs โ€œstargazersโ€)
sizeint64Repo size (KB, as reported by GitHub)
last_pr_idint64Latest available PR id

Values may be null when unavailable from the source.

๐Ÿ—๏ธ How itโ€™s built (ETL)

  • โ€”Data source: GH Archive public event stream; window through 2025-07-23 (UTC).
  • โ€”Event filter:
  • โ€”CreateEvent (ref_type=repository) to capture initial repo creation and timestamps.
  • โ€”PullRequestEvent to obtain rich repo snapshots embedded in PR payloads.
  • โ€”Extraction:
  • โ€”Parse event.repo and payload.*.repo snapshots for: reponame (owner/name), description, language, licensekey, size, visibility, createdat, openissuescount, forkscount, watchers_count.
  • โ€”Track latest observed PR identifier as lastprid.
  • โ€”Aggregation:
  • โ€”Group by repo_name; keep the most recent snapshot within the window.

Notes

  • โ€”Coverage primarily comes from PullRequestEvent snapshots; repositories without any PRs are generally missing.
  • โ€”Stars/watchers and forks are taken from event-time snapshots and may be slightly stale versus live GitHub.
  • โ€”Values can be null if not present in the underlying event payloads.

โš ๏ธ Limitations

  • โ€”GH Archive reflects public events only; private repos are out of scope.
  • โ€”Some GitHub fields (e.g., watchers vs stargazers) have historical quirks.
  • โ€”Missing values where source is unavailable.

๐Ÿ“š Citation

If you use this dataset, please cite:

bibtex
@misc{github_repos_activity_stats_2025,
  title        = {GitHub Repos Activity Stats (from GH Archive)},
  author       = {Ibragim Badertdinov},
  year         = {2025},
  howpublished = {\url{https://huggingface.co/datasets/ibraigm-bad/github-repos-metadata-40M}}
}

๐Ÿ“œ License

Distributed under the MIT License. See LICENSE for more information.