Datasets:
dataset_info:
features:
- name: repo_name
dtype: string
- name: language
dtype: string
- name: created_at
dtype: string
- name: description
dtype: string
- name: description_language
dtype: string
- name: description_language_score
dtype: float64
- name: license_key
dtype: string
- name: forks_count
dtype: float64
- name: watchers_count
dtype: float64
- name: size
dtype: float64
- name: last_pr_id
dtype: int64
splits:
- name: full
num_bytes: 5567563250
num_examples: 40058194
- name: sample
num_bytes: 138717361
num_examples: 1000000
download_size: 2298358914
dataset_size: 5706280611
configs:
- config_name: default
data_files:
- split: full
path: data/full-*
- split: sample
path: data/sample-*
license: mit
tags:
- code
size_categories:
- 10M<n<100M
π 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).
π Quickstart
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)
Column | Type | Description |
---|---|---|
repo_name |
string |
owner/name |
language |
string |
Primary language (human-readable) |
created_at |
timestamp |
Repo creation time (UTC) if available |
description |
string |
Repo description |
description_language |
string |
Detected natural-language code of the repository description (ISO 639-1/2) |
description_language_score |
float32 |
Confidence score for description_language (0β1) |
license_key |
string |
SPDX-like license key |
forks_count |
int64 |
Current forks count |
watchers_count |
int64 |
Watchers/stars count (note: GitHubβs legacy βwatchersβ vs βstargazersβ) |
size |
int64 |
Repo size (KB, as reported by GitHub) |
last_pr_id |
int64 |
Latest 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: repo_name (owner/name), description, language, license_key, size, visibility, created_at, open_issues_count, forks_count, watchers_count.
- Track latest observed PR identifier as last_pr_id.
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:
@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.