ibragim-bad commited on
Commit
fcd336f
·
verified ·
1 Parent(s): e0eb799

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +91 -86
README.md CHANGED
@@ -1,51 +1,56 @@
1
- ---
2
- dataset_info:
3
- features:
4
- - name: repo_name
5
- dtype: string
6
- - name: language
7
- dtype: string
8
- - name: created_at
9
- dtype: string
10
- - name: description
11
- dtype: string
12
- - name: description_language
13
- dtype: string
14
- - name: description_language_score
15
- dtype: float64
16
- - name: license_key
17
- dtype: string
18
- - name: forks_count
19
- dtype: float64
20
- - name: watchers_count
21
- dtype: float64
22
- - name: size
23
- dtype: float64
24
- - name: last_pr_id
25
- dtype: int64
26
- splits:
27
- - name: full
28
- num_bytes: 5567563250
29
- num_examples: 40058194
30
- - name: sample
31
- num_bytes: 138717361
32
- num_examples: 1000000
33
- download_size: 2298358914
34
- dataset_size: 5706280611
35
- configs:
36
- - config_name: default
37
- data_files:
38
- - split: full
39
- path: data/full-*
40
- - split: sample
41
- path: data/sample-*
42
- ---
43
-
44
-
45
- # Metadata for 40 million GitHub repositories
46
-
47
- [![License](https://img.shields.io/badge/license-Apache--2.0-green.svg)](#license)
48
- [![Dataset](https://img.shields.io/badge/format-parquet%2Fcsv-blue)]()
 
 
 
 
 
49
  [![HF Hub](https://img.shields.io/badge/HuggingFace-available-yellow.svg)]()
50
 
51
  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.
@@ -53,37 +58,62 @@ A cleaned, analysis-ready dataset with per-repository statistics aggregated from
53
  > Source: [GH Archive](https://www.gharchive.org/) (public GitHub event stream).
54
 
55
 
56
- ## Quickstart
57
 
58
  ```python
59
  from datasets import load_dataset
60
 
61
- # If published on the Hub:
62
- ds = load_dataset("ibragim-bad/github-repos-metadata-40M", split="all") # or 'sample'.
63
 
64
  ```
65
 
66
- ## Use cases
 
 
 
 
 
67
 
68
  * Trend analysis of stars/forks/PRs
69
  * Language mix & repo growth signals
70
  * Ranking by activity / stability
71
  * Input features for ML models (quality or popularity prediction)
72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
 
 
74
 
75
- ## How it’s built (ETL)
 
76
 
77
  - **Data source:** GH Archive public event stream; window through 2025-07-23 (UTC).
78
  - **Event filter:**
79
  - CreateEvent (ref_type=repository) to capture initial repo creation and timestamps.
80
  - PullRequestEvent to obtain rich repo snapshots embedded in PR payloads.
 
81
  - **Extraction:**
82
  - 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.
83
- - Track latest observed PR identifier as pr_id.
84
  - **Aggregation:**
85
- - Group by repo_name; keep the most recent snapshot within the window for counters and strings.
86
- - Normalize types; fill nulls where fields are missing in the source event.
87
 
88
 
89
  **Notes**
@@ -92,37 +122,15 @@ ds = load_dataset("ibragim-bad/github-repos-metadata-40M", split="all") # or 's
92
  - Values can be null if not present in the underlying event payloads.
93
 
94
 
95
- ## Limitations
96
 
97
- * GH Archive reflects **public** events only; private repos are out of scope. ([GH Archive][6])
98
  * Some GitHub fields (e.g., watchers vs stargazers) have historical quirks.
99
  * Missing values where source is unavailable.
100
 
101
- ---
102
 
103
- ## What’s inside
104
 
105
- Each row aggregates repository-level stats derived from GH Archive events and GitHub metadata snapshots.
106
-
107
- **Schema (columns & types)**
108
-
109
- | Column | Type | Description |
110
- | ------------------- | -------------- | --------------------------------------------------------------------------- |
111
- | `created_at` | `timestamp` | Repo creation time (UTC) if available |
112
- | `description` | `string` | Repo description |
113
- | `forks_count` | `int64` | Current forks count |
114
- | `language` | `string` | Primary language (human-readable) |
115
- | `license_key` | `string` | SPDX-like license key |
116
- | `open_issues_count` | `int64` | Open issues count |
117
- | `pr_id` | `int64` | Latest available PR id |
118
- | `repo_name` | `string` | `owner/name` |
119
- | `size` | `int64` | Repo size (KB, as reported by GitHub) |
120
- | `watchers_count` | `int64` | Watchers/stars count (note: GitHub’s legacy “watchers” vs “stargazers”) |
121
-
122
- Values may be `null` when unavailable from the source.
123
-
124
-
125
- ## Citation
126
 
127
  If you use this dataset, please cite:
128
 
@@ -135,10 +143,7 @@ If you use this dataset, please cite:
135
  }
136
  ```
137
 
138
- ---
139
-
140
- ## License
141
 
142
- * Data license: **Apache-2.0** (or your choice; ensure compatibility with GH Archive terms).
143
- * Code license: **Apache-2.0**.
144
 
 
 
1
+ ---
2
+ dataset_info:
3
+ features:
4
+ - name: repo_name
5
+ dtype: string
6
+ - name: language
7
+ dtype: string
8
+ - name: created_at
9
+ dtype: string
10
+ - name: description
11
+ dtype: string
12
+ - name: description_language
13
+ dtype: string
14
+ - name: description_language_score
15
+ dtype: float64
16
+ - name: license_key
17
+ dtype: string
18
+ - name: forks_count
19
+ dtype: float64
20
+ - name: watchers_count
21
+ dtype: float64
22
+ - name: size
23
+ dtype: float64
24
+ - name: last_pr_id
25
+ dtype: int64
26
+ splits:
27
+ - name: full
28
+ num_bytes: 5567563250
29
+ num_examples: 40058194
30
+ - name: sample
31
+ num_bytes: 138717361
32
+ num_examples: 1000000
33
+ download_size: 2298358914
34
+ dataset_size: 5706280611
35
+ configs:
36
+ - config_name: default
37
+ data_files:
38
+ - split: full
39
+ path: data/full-*
40
+ - split: sample
41
+ path: data/sample-*
42
+ license: mit
43
+ tags:
44
+ - code
45
+ size_categories:
46
+ - 10M<n<100M
47
+ ---
48
+
49
+
50
+ # 📊 Metadata for 40 million GitHub repositories
51
+
52
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](#license)
53
+ [![Dataset](https://img.shields.io/badge/format-parquet-blue)]()
54
  [![HF Hub](https://img.shields.io/badge/HuggingFace-available-yellow.svg)]()
55
 
56
  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.
 
58
  > Source: [GH Archive](https://www.gharchive.org/) (public GitHub event stream).
59
 
60
 
61
+ ## 🚀 Quickstart
62
 
63
  ```python
64
  from datasets import load_dataset
65
 
66
+ ds = load_dataset("ibragim-bad/github-repos-metadata-40M", split="full") # or 'sample' for random sample of 1 million repositories.
 
67
 
68
  ```
69
 
70
+
71
+ ## 📈 EDA Notebook
72
+
73
+ - `data_visualisation.ipynb`: Simple exploratory data analysis of the dataset (column overview, basic distributions, missing-value checks, sample visualizations).
74
+
75
+ ## 💡 Use cases
76
 
77
  * Trend analysis of stars/forks/PRs
78
  * Language mix & repo growth signals
79
  * Ranking by activity / stability
80
  * Input features for ML models (quality or popularity prediction)
81
 
82
+ ## 📦 What’s inside
83
+
84
+ Each row aggregates repository-level stats derived from GH Archive events and GitHub metadata snapshots.
85
+
86
+ **Schema (columns & types)**
87
+
88
+ | Column | Type | Description |
89
+ | ------------------- | -------------- | --------------------------------------------------------------------------- |
90
+ | `repo_name` | `string` | `owner/name` |
91
+ | `language` | `string` | Primary language (human-readable) |
92
+ | `created_at` | `timestamp` | Repo creation time (UTC) if available |
93
+ | `description` | `string` | Repo description |
94
+ | `description_language` | `string` | Detected natural-language code of the repository description (ISO 639-1/2) |
95
+ | `description_language_score` | `float32` | Confidence score for description_language (0–1) |
96
+ | `license_key` | `string` | SPDX-like license key |
97
+ | `forks_count` | `int64` | Current forks count |
98
+ | `watchers_count` | `int64` | Watchers/stars count (note: GitHub’s legacy “watchers” vs “stargazers”) |
99
+ | `size` | `int64` | Repo size (KB, as reported by GitHub) |
100
+ | `last_pr_id` | `int64` | Latest available PR id |
101
 
102
+ Values may be `null` when unavailable from the source.
103
 
104
+
105
+ ## 🏗️ How it’s built (ETL)
106
 
107
  - **Data source:** GH Archive public event stream; window through 2025-07-23 (UTC).
108
  - **Event filter:**
109
  - CreateEvent (ref_type=repository) to capture initial repo creation and timestamps.
110
  - PullRequestEvent to obtain rich repo snapshots embedded in PR payloads.
111
+
112
  - **Extraction:**
113
  - 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.
114
+ - Track latest observed PR identifier as last_pr_id.
115
  - **Aggregation:**
116
+ - Group by repo_name; keep the most recent snapshot within the window.
 
117
 
118
 
119
  **Notes**
 
122
  - Values can be null if not present in the underlying event payloads.
123
 
124
 
125
+ ## ⚠️ Limitations
126
 
127
+ * GH Archive reflects **public** events only; private repos are out of scope.
128
  * Some GitHub fields (e.g., watchers vs stargazers) have historical quirks.
129
  * Missing values where source is unavailable.
130
 
 
131
 
 
132
 
133
+ ## 📚 Citation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
 
135
  If you use this dataset, please cite:
136
 
 
143
  }
144
  ```
145
 
 
 
 
146
 
147
+ ## 📜 License
 
148
 
149
+ Distributed under the MIT License. See LICENSE for more information.