samyakbayar commited on
Commit
d6c4008
·
verified ·
1 Parent(s): fbce990

Upload python-package-ecosystem dataset files

Browse files
Files changed (8) hide show
  1. KAGGLE.md +159 -0
  2. README.md +168 -0
  3. about.md +26 -0
  4. data_dictionary.csv +48 -0
  5. dataset-metadata.json +271 -0
  6. kernel-metadata.json +14 -0
  7. notebook.ipynb +217 -0
  8. pypi_packages.csv +0 -0
KAGGLE.md ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Python Package Ecosystem
2
+
3
+ **Subtitle:** 4,999 top PyPI packages with downloads, licenses, dependencies & releases
4
+
5
+ **Tags:** `python`, `software`, `open-source`, `tabular`
6
+
7
+ **Dataset File:** `pypi_packages.csv` (23,010 rows, 47 columns, 3.4 MB)
8
+
9
+ **Provenance & Source:** PyPI JSON API & BigQuery PyPI Public Dataset
10
+
11
+ **Expected Update Frequency:** `annually`
12
+
13
+ ---
14
+
15
+ ## 📖 Description
16
+
17
+ ### The Python package ecosystem, ranked by real downloads
18
+
19
+ PyPI serves millions of package downloads a day and publishes the numbers. This dataset combines the
20
+ **top 4,999 projects by 30-day downloads** with each project's full PyPI metadata.
21
+
22
+ Per package you get **47 parameters**:
23
+ - **Reach** — download rank and count for the last 30 days, share of the ecosystem's downloads,
24
+ download concentration implied by the ranks.
25
+ - **Identity** — name, summary, author, canonical URL, home page, project URLs (docs / source /
26
+ changelog), keywords.
27
+ - **Licensing** — raw licence string plus a normalised class (MIT, Apache, GPL, BSD, MPL, LGPL,
28
+ public domain, Creative Commons, other, unknown).
29
+ - **Compatibility** — `requires_python`, supported Python versions from classifiers, Python-3-only
30
+ flag, wheel and sdist availability, file sizes, yanked files.
31
+ - **Dependencies** — runtime dependency count (extras excluded), extras entries, a has-dependencies flag.
32
+ - **Release history** — version count, first and latest release dates, total and yanked file counts,
33
+ age, days since last release, releases per year, cadence and maturity bands.
34
+ - **Packaging hygiene** — classifier and topic counts, development status, project-URL completeness,
35
+ pre-release flag.
36
+
37
+ The top 10 projects alone account for **11.1%** of all downloads in the file,
38
+ which makes download concentration, release cadence and dependency counts directly comparable.
39
+
40
+ ## 🧾 Columns (47)
41
+
42
+ `rank`, `project`, `monthly_downloads`, `download_share_pct`, `latest_version`, `summary`, `author`, `license`, `license_class`, `requires_python`, `home_page`, `project_url`, `package_url`, `keywords`, `development_status`, `classifier_count`, `topic_count`, `python_versions_supported`, `python_version_count`, `requires_dist_count`, `dependency_count`, `release_count`, `total_file_count`, `yanked_file_count`, `first_release`, `latest_release`, `latest_upload`, `latest_size_bytes`, `summary_length`, `has_wheel`, `has_sdist`, `has_homepage`, `has_docs_url`, `has_source_url`, `has_changelog`, `project_url_count`, `is_prerelease`, `python3_only`, `name_length`, `is_single_word`, `major_version`, `age_days`, `days_since_release`, `releases_per_year`, `release_cadence`, `maturity`, `has_dependencies`
43
+
44
+ ## 💡 Ideas for using this data
45
+
46
+ 1. **Download concentration** — Lorenz curve and Gini of `monthly_downloads`; the long tail is extreme.
47
+ 2. **Maintenance risk** — find widely used packages with long `days_since_release` or an inactive status.
48
+ 3. **Licence landscape** — licence class by download volume; how much of the ecosystem is permissively licensed?
49
+ 4. **Dependency weight** — packages with the most runtime dependencies versus their download share.
50
+ 5. **Release cadence** — cadence band versus rank; do the most-downloaded packages ship more or less often?
51
+ 6. **Packaging quality** — wheels, sdists and project URLs as a quality score, then check whether quality predicts downloads.
52
+ 7. **Python version adoption** — `python_versions_supported` over the ecosystem; who still lists 3.6?
53
+ 8. **Name economics** — name length and single-word names versus downloads (short names are scarce).
54
+ 9. **Supply-chain graph starter** — join `requires_dist_count` with per-package dependency lists fetched from PyPI for a network analysis.
55
+
56
+ ## 📁 Files
57
+
58
+ | File | What it is |
59
+ |---|---|
60
+ | `pypi_packages.csv` | 4,999 packages x 47 parameters. |
61
+ | `data_dictionary.csv` | Column / type / description for every field. |
62
+ | `notebook.ipynb` | Starter notebook: concentration, licences, cadence, dependencies. |
63
+ | `dataset-metadata.json` | Kaggle API metadata. |
64
+ | `about.md` | Plain-text About block. |
65
+
66
+ ## 🏷️ Tags
67
+
68
+ `python`, `pypi`, `software`, `open-source`, `packages`, `programming`, `developer-tools`, `supply-chain`, `tabular`, `web-scraping`
69
+
70
+ ## 🔗 Provenance
71
+
72
+ - **Sources:** (1) the **top PyPI packages** list maintained by Hugo van Kemenade
73
+ (`hugovk.dev/top-pypi-packages/`), a 30-day rolling download ranking built from the official
74
+ PyPI download logs; (2) the **PyPI JSON API** (`https://pypi.org/pypi/<project>/json`) for each
75
+ project's metadata, classifiers, dependencies and release files.
76
+ - **Coverage:** the 5,000 highest-ranked projects at snapshot time.
77
+ - **Processing:** list and per-package metadata were joined on project name; release dates and file
78
+ counts were derived from the `releases`/`urls` objects; licences normalised into classes.
79
+ - **Derived columns:** download share, licence class, version counts, dependency counts, age,
80
+ days since release, releases per year, cadence and maturity bands, URL completeness flags.
81
+ - **Snapshot date:** 21 November 2026.
82
+
83
+ ## 🔄 Update frequency
84
+
85
+ **Monthly.** The download ranking is a rolling 30-day window; re-run `scripts/25_pypi_ecosystem.py` for a fresh snapshot.
86
+
87
+ ## ⚠️ Caveats
88
+
89
+ - Download counts include CI, mirrors and bots, so they measure installs rather than users.
90
+ - The ranking covers only the top 5,000 projects; the long tail (hundreds of thousands of packages) is absent.
91
+ - `author` and `summary` are free text and inconsistently filled.
92
+ - `license` is often a full licence sentence or 'UNKNOWN'; use `license_class` for grouping.
93
+ - Release dates come from file upload timestamps, which can be re-uploads rather than original publication.
94
+ - Dependency counts use `requires_dist` and exclude environment markers beyond extras.
95
+ - 5,000 API calls were made politely; a handful of packages may be missing if PyPI errored.
96
+
97
+ ## 📜 Licence
98
+
99
+ Package metadata is published by PyPI and the respective authors; the download ranking is published by Hugo van Kemenade. Mixed open-source licences — check each package's `license` field.
100
+
101
+ ### 📋 Column Definitions & File Header
102
+
103
+ | # | Column Name | Data Type | Description |
104
+ |---|---|---|---|
105
+ | 1 | `rank` | `number` | Rank in the 30-day download list (1 = most downloaded). |
106
+ | 2 | `project` | `string` | Package name on PyPI. |
107
+ | 3 | `monthly_downloads` | `number` | Downloads in the last 30 days (PyPI download statistics). |
108
+ | 4 | `download_share_pct` | `number` | Share of the total downloads of all packages in this file. |
109
+ | 5 | `latest_version` | `string` | Latest version on PyPI at snapshot time. |
110
+ | 6 | `summary` | `string` | One-line package description. |
111
+ | 7 | `author` | `string` | Author field as published. |
112
+ | 8 | `license` | `string` | Licence string or classifier as published. |
113
+ | 9 | `license_class` | `string` | Licence normalised into MIT, Apache, GPL, BSD, MPL, LGPL, Public domain, Creative Commons, Other, Unknown. |
114
+ | 10 | `requires_python` | `string` | PEP 440 Python version specifier. |
115
+ | 11 | `home_page` | `string` | Legacy home page URL. |
116
+ | 12 | `project_url` | `string` | Legacy project URL. |
117
+ | 13 | `package_url` | `string` | Canonical PyPI project URL. |
118
+ | 14 | `keywords` | `string` | Comma-separated keywords as published. |
119
+ | 15 | `development_status` | `string` | Development status from the trove classifiers. |
120
+ | 16 | `classifier_count` | `number` | Number of trove classifiers. |
121
+ | 17 | `topic_count` | `number` | Number of 'Topic ::' classifiers. |
122
+ | 18 | `python_versions_supported` | `string` | Python versions named in the classifiers (semicolon-joined). |
123
+ | 19 | `python_version_count` | `number` | Number of named Python versions. |
124
+ | 20 | `requires_dist_count` | `number` | Raw number of entries in requires_dist, including extras. |
125
+ | 21 | `dependency_count` | `number` | Number of runtime dependencies, excluding extras. |
126
+ | 22 | `release_count` | `number` | Number of uploaded versions. |
127
+ | 23 | `total_file_count` | `number` | Number of distribution files across all versions. |
128
+ | 24 | `yanked_file_count` | `number` | Number of yanked files. |
129
+ | 25 | `first_release` | `date` | Date of the earliest uploaded file (ISO). |
130
+ | 26 | `latest_release` | `date` | Date of the most recent uploaded file (ISO). |
131
+ | 27 | `latest_upload` | `date` | Upload date of the current version. |
132
+ | 28 | `latest_size_bytes` | `number` | Size of the largest distribution file for the current version. |
133
+ | 29 | `summary_length` | `number` | Characters in the summary. |
134
+ | 30 | `has_wheel` | `boolean` | true when a wheel is published for the current version. |
135
+ | 31 | `has_sdist` | `boolean` | true when a source distribution is published. |
136
+ | 32 | `has_homepage` | `boolean` | true when a home page is declared. |
137
+ | 33 | `has_docs_url` | `boolean` | true when a documentation URL appears in project_urls. |
138
+ | 34 | `has_source_url` | `boolean` | true when a source/repository URL appears in project_urls. |
139
+ | 35 | `has_changelog` | `boolean` | true when a changelog URL appears in project_urls. |
140
+ | 36 | `project_url_count` | `number` | Number of project URLs declared. |
141
+ | 37 | `is_prerelease` | `boolean` | true when the latest version looks like a pre-release. |
142
+ | 38 | `python3_only` | `boolean` | true when requires_python allows Python 3 but not Python 2. |
143
+ | 39 | `name_length` | `number` | Characters in the project name. |
144
+ | 40 | `is_single_word` | `boolean` | true when the name has no spaces. |
145
+ | 41 | `major_version` | `number` | Major component of the latest version. |
146
+ | 42 | `age_days` | `number` | Days between the first release and the snapshot date. |
147
+ | 43 | `days_since_release` | `number` | Days since the most recent release. |
148
+ | 44 | `releases_per_year` | `number` | Average number of releases per year since the first release. |
149
+ | 45 | `release_cadence` | `string` | Release cadence band: Dormant, Slow, Regular, Rapid, Very rapid. |
150
+ | 46 | `maturity` | `string` | Maturity band from major version and age. |
151
+ | 47 | `has_dependencies` | `boolean` | true when the package declares runtime dependencies. |
152
+
153
+
154
+
155
+ ---
156
+
157
+ ## 🌟 Support & Community
158
+ If you find this dataset valuable for your research, portfolio, or machine learning projects, **please give it an upvote (👍) on Kaggle!**
159
+ Feedback, questions, and notebook submissions are warmly welcomed in the Discussions tab.
README.md ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ task_categories:
4
+ - tabular
5
+ tags:
6
+ - tabular
7
+ pretty_name: Python Package Ecosystem
8
+ ---
9
+
10
+ # Python Package Ecosystem
11
+
12
+ **Subtitle:** 4,999 top PyPI packages with downloads, licenses, dependencies & releases
13
+
14
+ **Tags:** `python`, `software`, `open-source`, `tabular`
15
+
16
+ **Dataset File:** `pypi_packages.csv` (23,010 rows, 47 columns, 3.4 MB)
17
+
18
+ **Provenance & Source:** PyPI JSON API & BigQuery PyPI Public Dataset
19
+
20
+ **Expected Update Frequency:** `annually`
21
+
22
+ ---
23
+
24
+ ## 📖 Description
25
+
26
+ ### The Python package ecosystem, ranked by real downloads
27
+
28
+ PyPI serves millions of package downloads a day and publishes the numbers. This dataset combines the
29
+ **top 4,999 projects by 30-day downloads** with each project's full PyPI metadata.
30
+
31
+ Per package you get **47 parameters**:
32
+ - **Reach** — download rank and count for the last 30 days, share of the ecosystem's downloads,
33
+ download concentration implied by the ranks.
34
+ - **Identity** — name, summary, author, canonical URL, home page, project URLs (docs / source /
35
+ changelog), keywords.
36
+ - **Licensing** — raw licence string plus a normalised class (MIT, Apache, GPL, BSD, MPL, LGPL,
37
+ public domain, Creative Commons, other, unknown).
38
+ - **Compatibility** — `requires_python`, supported Python versions from classifiers, Python-3-only
39
+ flag, wheel and sdist availability, file sizes, yanked files.
40
+ - **Dependencies** — runtime dependency count (extras excluded), extras entries, a has-dependencies flag.
41
+ - **Release history** — version count, first and latest release dates, total and yanked file counts,
42
+ age, days since last release, releases per year, cadence and maturity bands.
43
+ - **Packaging hygiene** — classifier and topic counts, development status, project-URL completeness,
44
+ pre-release flag.
45
+
46
+ The top 10 projects alone account for **11.1%** of all downloads in the file,
47
+ which makes download concentration, release cadence and dependency counts directly comparable.
48
+
49
+ ## 🧾 Columns (47)
50
+
51
+ `rank`, `project`, `monthly_downloads`, `download_share_pct`, `latest_version`, `summary`, `author`, `license`, `license_class`, `requires_python`, `home_page`, `project_url`, `package_url`, `keywords`, `development_status`, `classifier_count`, `topic_count`, `python_versions_supported`, `python_version_count`, `requires_dist_count`, `dependency_count`, `release_count`, `total_file_count`, `yanked_file_count`, `first_release`, `latest_release`, `latest_upload`, `latest_size_bytes`, `summary_length`, `has_wheel`, `has_sdist`, `has_homepage`, `has_docs_url`, `has_source_url`, `has_changelog`, `project_url_count`, `is_prerelease`, `python3_only`, `name_length`, `is_single_word`, `major_version`, `age_days`, `days_since_release`, `releases_per_year`, `release_cadence`, `maturity`, `has_dependencies`
52
+
53
+ ## 💡 Ideas for using this data
54
+
55
+ 1. **Download concentration** — Lorenz curve and Gini of `monthly_downloads`; the long tail is extreme.
56
+ 2. **Maintenance risk** — find widely used packages with long `days_since_release` or an inactive status.
57
+ 3. **Licence landscape** — licence class by download volume; how much of the ecosystem is permissively licensed?
58
+ 4. **Dependency weight** — packages with the most runtime dependencies versus their download share.
59
+ 5. **Release cadence** — cadence band versus rank; do the most-downloaded packages ship more or less often?
60
+ 6. **Packaging quality** — wheels, sdists and project URLs as a quality score, then check whether quality predicts downloads.
61
+ 7. **Python version adoption** — `python_versions_supported` over the ecosystem; who still lists 3.6?
62
+ 8. **Name economics** — name length and single-word names versus downloads (short names are scarce).
63
+ 9. **Supply-chain graph starter** — join `requires_dist_count` with per-package dependency lists fetched from PyPI for a network analysis.
64
+
65
+ ## 📁 Files
66
+
67
+ | File | What it is |
68
+ |---|---|
69
+ | `pypi_packages.csv` | 4,999 packages x 47 parameters. |
70
+ | `data_dictionary.csv` | Column / type / description for every field. |
71
+ | `notebook.ipynb` | Starter notebook: concentration, licences, cadence, dependencies. |
72
+ | `dataset-metadata.json` | Kaggle API metadata. |
73
+ | `about.md` | Plain-text About block. |
74
+
75
+ ## 🏷️ Tags
76
+
77
+ `python`, `pypi`, `software`, `open-source`, `packages`, `programming`, `developer-tools`, `supply-chain`, `tabular`, `web-scraping`
78
+
79
+ ## 🔗 Provenance
80
+
81
+ - **Sources:** (1) the **top PyPI packages** list maintained by Hugo van Kemenade
82
+ (`hugovk.dev/top-pypi-packages/`), a 30-day rolling download ranking built from the official
83
+ PyPI download logs; (2) the **PyPI JSON API** (`https://pypi.org/pypi/<project>/json`) for each
84
+ project's metadata, classifiers, dependencies and release files.
85
+ - **Coverage:** the 5,000 highest-ranked projects at snapshot time.
86
+ - **Processing:** list and per-package metadata were joined on project name; release dates and file
87
+ counts were derived from the `releases`/`urls` objects; licences normalised into classes.
88
+ - **Derived columns:** download share, licence class, version counts, dependency counts, age,
89
+ days since release, releases per year, cadence and maturity bands, URL completeness flags.
90
+ - **Snapshot date:** 21 November 2026.
91
+
92
+ ## 🔄 Update frequency
93
+
94
+ **Monthly.** The download ranking is a rolling 30-day window; re-run `scripts/25_pypi_ecosystem.py` for a fresh snapshot.
95
+
96
+ ## ⚠️ Caveats
97
+
98
+ - Download counts include CI, mirrors and bots, so they measure installs rather than users.
99
+ - The ranking covers only the top 5,000 projects; the long tail (hundreds of thousands of packages) is absent.
100
+ - `author` and `summary` are free text and inconsistently filled.
101
+ - `license` is often a full licence sentence or 'UNKNOWN'; use `license_class` for grouping.
102
+ - Release dates come from file upload timestamps, which can be re-uploads rather than original publication.
103
+ - Dependency counts use `requires_dist` and exclude environment markers beyond extras.
104
+ - 5,000 API calls were made politely; a handful of packages may be missing if PyPI errored.
105
+
106
+ ## 📜 Licence
107
+
108
+ Package metadata is published by PyPI and the respective authors; the download ranking is published by Hugo van Kemenade. Mixed open-source licences — check each package's `license` field.
109
+
110
+ ### 📋 Column Definitions & File Header
111
+
112
+ | # | Column Name | Data Type | Description |
113
+ |---|---|---|---|
114
+ | 1 | `rank` | `number` | Rank in the 30-day download list (1 = most downloaded). |
115
+ | 2 | `project` | `string` | Package name on PyPI. |
116
+ | 3 | `monthly_downloads` | `number` | Downloads in the last 30 days (PyPI download statistics). |
117
+ | 4 | `download_share_pct` | `number` | Share of the total downloads of all packages in this file. |
118
+ | 5 | `latest_version` | `string` | Latest version on PyPI at snapshot time. |
119
+ | 6 | `summary` | `string` | One-line package description. |
120
+ | 7 | `author` | `string` | Author field as published. |
121
+ | 8 | `license` | `string` | Licence string or classifier as published. |
122
+ | 9 | `license_class` | `string` | Licence normalised into MIT, Apache, GPL, BSD, MPL, LGPL, Public domain, Creative Commons, Other, Unknown. |
123
+ | 10 | `requires_python` | `string` | PEP 440 Python version specifier. |
124
+ | 11 | `home_page` | `string` | Legacy home page URL. |
125
+ | 12 | `project_url` | `string` | Legacy project URL. |
126
+ | 13 | `package_url` | `string` | Canonical PyPI project URL. |
127
+ | 14 | `keywords` | `string` | Comma-separated keywords as published. |
128
+ | 15 | `development_status` | `string` | Development status from the trove classifiers. |
129
+ | 16 | `classifier_count` | `number` | Number of trove classifiers. |
130
+ | 17 | `topic_count` | `number` | Number of 'Topic ::' classifiers. |
131
+ | 18 | `python_versions_supported` | `string` | Python versions named in the classifiers (semicolon-joined). |
132
+ | 19 | `python_version_count` | `number` | Number of named Python versions. |
133
+ | 20 | `requires_dist_count` | `number` | Raw number of entries in requires_dist, including extras. |
134
+ | 21 | `dependency_count` | `number` | Number of runtime dependencies, excluding extras. |
135
+ | 22 | `release_count` | `number` | Number of uploaded versions. |
136
+ | 23 | `total_file_count` | `number` | Number of distribution files across all versions. |
137
+ | 24 | `yanked_file_count` | `number` | Number of yanked files. |
138
+ | 25 | `first_release` | `date` | Date of the earliest uploaded file (ISO). |
139
+ | 26 | `latest_release` | `date` | Date of the most recent uploaded file (ISO). |
140
+ | 27 | `latest_upload` | `date` | Upload date of the current version. |
141
+ | 28 | `latest_size_bytes` | `number` | Size of the largest distribution file for the current version. |
142
+ | 29 | `summary_length` | `number` | Characters in the summary. |
143
+ | 30 | `has_wheel` | `boolean` | true when a wheel is published for the current version. |
144
+ | 31 | `has_sdist` | `boolean` | true when a source distribution is published. |
145
+ | 32 | `has_homepage` | `boolean` | true when a home page is declared. |
146
+ | 33 | `has_docs_url` | `boolean` | true when a documentation URL appears in project_urls. |
147
+ | 34 | `has_source_url` | `boolean` | true when a source/repository URL appears in project_urls. |
148
+ | 35 | `has_changelog` | `boolean` | true when a changelog URL appears in project_urls. |
149
+ | 36 | `project_url_count` | `number` | Number of project URLs declared. |
150
+ | 37 | `is_prerelease` | `boolean` | true when the latest version looks like a pre-release. |
151
+ | 38 | `python3_only` | `boolean` | true when requires_python allows Python 3 but not Python 2. |
152
+ | 39 | `name_length` | `number` | Characters in the project name. |
153
+ | 40 | `is_single_word` | `boolean` | true when the name has no spaces. |
154
+ | 41 | `major_version` | `number` | Major component of the latest version. |
155
+ | 42 | `age_days` | `number` | Days between the first release and the snapshot date. |
156
+ | 43 | `days_since_release` | `number` | Days since the most recent release. |
157
+ | 44 | `releases_per_year` | `number` | Average number of releases per year since the first release. |
158
+ | 45 | `release_cadence` | `string` | Release cadence band: Dormant, Slow, Regular, Rapid, Very rapid. |
159
+ | 46 | `maturity` | `string` | Maturity band from major version and age. |
160
+ | 47 | `has_dependencies` | `boolean` | true when the package declares runtime dependencies. |
161
+
162
+
163
+
164
+ ---
165
+
166
+ ## 🌟 Support & Community
167
+ If you find this dataset valuable for your research, portfolio, or machine learning projects, **please give it an upvote (👍) on Kaggle!**
168
+ Feedback, questions, and notebook submissions are warmly welcomed in the Discussions tab.
about.md ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Python Package Ecosystem
2
+
3
+ ### The Python package ecosystem, ranked by real downloads
4
+
5
+ PyPI serves millions of package downloads a day and publishes the numbers. This dataset combines the
6
+ **top 4,999 projects by 30-day downloads** with each project's full PyPI metadata.
7
+
8
+ Per package you get **47 parameters**:
9
+ - **Reach** — download rank and count for the last 30 days, share of the ecosystem's downloads,
10
+ download concentration implied by the ranks.
11
+ - **Identity** — name, summary, author, canonical URL, home page, project URLs (docs / source /
12
+ changelog), keywords.
13
+ - **Licensing** — raw licence string plus a normalised class (MIT, Apache, GPL, BSD, MPL, LGPL,
14
+ public domain, Creative Commons, other, unknown).
15
+ - **Compatibility** — `requires_python`, supported Python versions from classifiers, Python-3-only
16
+ flag, wheel and sdist availability, file sizes, yanked files.
17
+ - **Dependencies** — runtime dependency count (extras excluded), extras entries, a has-dependencies flag.
18
+ - **Release history** — version count, first and latest release dates, total and yanked file counts,
19
+ age, days since last release, releases per year, cadence and maturity bands.
20
+ - **Packaging hygiene** — classifier and topic counts, development status, project-URL completeness,
21
+ pre-release flag.
22
+
23
+ The top 10 projects alone account for **11.1%** of all downloads in the file,
24
+ which makes download concentration, release cadence and dependency counts directly comparable.
25
+
26
+ 47 columns; one row per PyPI project.
data_dictionary.csv ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ column,data_type,description
2
+ rank,number,Rank in the 30-day download list (1 = most downloaded).
3
+ project,string,Package name on PyPI.
4
+ monthly_downloads,number,Downloads in the last 30 days (PyPI download statistics).
5
+ download_share_pct,number,Share of the total downloads of all packages in this file.
6
+ latest_version,string,Latest version on PyPI at snapshot time.
7
+ summary,string,One-line package description.
8
+ author,string,Author field as published.
9
+ license,string,Licence string or classifier as published.
10
+ license_class,string,"Licence normalised into MIT, Apache, GPL, BSD, MPL, LGPL, Public domain, Creative Commons, Other, Unknown."
11
+ requires_python,string,PEP 440 Python version specifier.
12
+ home_page,string,Legacy home page URL.
13
+ project_url,string,Legacy project URL.
14
+ package_url,string,Canonical PyPI project URL.
15
+ keywords,string,Comma-separated keywords as published.
16
+ development_status,string,Development status from the trove classifiers.
17
+ classifier_count,number,Number of trove classifiers.
18
+ topic_count,number,Number of 'Topic ::' classifiers.
19
+ python_versions_supported,string,Python versions named in the classifiers (semicolon-joined).
20
+ python_version_count,number,Number of named Python versions.
21
+ requires_dist_count,number,"Raw number of entries in requires_dist, including extras."
22
+ dependency_count,number,"Number of runtime dependencies, excluding extras."
23
+ release_count,number,Number of uploaded versions.
24
+ total_file_count,number,Number of distribution files across all versions.
25
+ yanked_file_count,number,Number of yanked files.
26
+ first_release,date,Date of the earliest uploaded file (ISO).
27
+ latest_release,date,Date of the most recent uploaded file (ISO).
28
+ latest_upload,date,Upload date of the current version.
29
+ latest_size_bytes,number,Size of the largest distribution file for the current version.
30
+ summary_length,number,Characters in the summary.
31
+ has_wheel,boolean,true when a wheel is published for the current version.
32
+ has_sdist,boolean,true when a source distribution is published.
33
+ has_homepage,boolean,true when a home page is declared.
34
+ has_docs_url,boolean,true when a documentation URL appears in project_urls.
35
+ has_source_url,boolean,true when a source/repository URL appears in project_urls.
36
+ has_changelog,boolean,true when a changelog URL appears in project_urls.
37
+ project_url_count,number,Number of project URLs declared.
38
+ is_prerelease,boolean,true when the latest version looks like a pre-release.
39
+ python3_only,boolean,true when requires_python allows Python 3 but not Python 2.
40
+ name_length,number,Characters in the project name.
41
+ is_single_word,boolean,true when the name has no spaces.
42
+ major_version,number,Major component of the latest version.
43
+ age_days,number,Days between the first release and the snapshot date.
44
+ days_since_release,number,Days since the most recent release.
45
+ releases_per_year,number,Average number of releases per year since the first release.
46
+ release_cadence,string,"Release cadence band: Dormant, Slow, Regular, Rapid, Very rapid."
47
+ maturity,string,Maturity band from major version and age.
48
+ has_dependencies,boolean,true when the package declares runtime dependencies.
dataset-metadata.json ADDED
@@ -0,0 +1,271 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "title": "Python Package Ecosystem",
3
+ "id": "samyakrajbayar/python-package-ecosystem",
4
+ "subtitle": "4,999 top PyPI packages with downloads, licenses, dependencies & releases",
5
+ "description": "# Python Package Ecosystem\n\n**Subtitle:** 4,999 top PyPI packages with downloads, licenses, dependencies & releases\n\n**Tags:** `python`, `software`, `open-source`, `tabular`\n\n**Dataset File:** `pypi_packages.csv` (23,010 rows, 47 columns, 3.4 MB)\n\n**Provenance & Source:** PyPI JSON API & BigQuery PyPI Public Dataset\n\n**Expected Update Frequency:** `annually`\n\n---\n\n## \ud83d\udcd6 Description\n\n### The Python package ecosystem, ranked by real downloads\n\nPyPI serves millions of package downloads a day and publishes the numbers. This dataset combines the\n**top 4,999 projects by 30-day downloads** with each project's full PyPI metadata.\n\nPer package you get **47 parameters**:\n- **Reach** \u2014 download rank and count for the last 30 days, share of the ecosystem's downloads,\n download concentration implied by the ranks.\n- **Identity** \u2014 name, summary, author, canonical URL, home page, project URLs (docs / source /\n changelog), keywords.\n- **Licensing** \u2014 raw licence string plus a normalised class (MIT, Apache, GPL, BSD, MPL, LGPL,\n public domain, Creative Commons, other, unknown).\n- **Compatibility** \u2014 `requires_python`, supported Python versions from classifiers, Python-3-only\n flag, wheel and sdist availability, file sizes, yanked files.\n- **Dependencies** \u2014 runtime dependency count (extras excluded), extras entries, a has-dependencies flag.\n- **Release history** \u2014 version count, first and latest release dates, total and yanked file counts,\n age, days since last release, releases per year, cadence and maturity bands.\n- **Packaging hygiene** \u2014 classifier and topic counts, development status, project-URL completeness,\n pre-release flag.\n\nThe top 10 projects alone account for **11.1%** of all downloads in the file,\nwhich makes download concentration, release cadence and dependency counts directly comparable.\n\n## \ud83e\uddfe Columns (47)\n\n`rank`, `project`, `monthly_downloads`, `download_share_pct`, `latest_version`, `summary`, `author`, `license`, `license_class`, `requires_python`, `home_page`, `project_url`, `package_url`, `keywords`, `development_status`, `classifier_count`, `topic_count`, `python_versions_supported`, `python_version_count`, `requires_dist_count`, `dependency_count`, `release_count`, `total_file_count`, `yanked_file_count`, `first_release`, `latest_release`, `latest_upload`, `latest_size_bytes`, `summary_length`, `has_wheel`, `has_sdist`, `has_homepage`, `has_docs_url`, `has_source_url`, `has_changelog`, `project_url_count`, `is_prerelease`, `python3_only`, `name_length`, `is_single_word`, `major_version`, `age_days`, `days_since_release`, `releases_per_year`, `release_cadence`, `maturity`, `has_dependencies`\n\n## \ud83d\udca1 Ideas for using this data\n\n1. **Download concentration** \u2014 Lorenz curve and Gini of `monthly_downloads`; the long tail is extreme.\n2. **Maintenance risk** \u2014 find widely used packages with long `days_since_release` or an inactive status.\n3. **Licence landscape** \u2014 licence class by download volume; how much of the ecosystem is permissively licensed?\n4. **Dependency weight** \u2014 packages with the most runtime dependencies versus their download share.\n5. **Release cadence** \u2014 cadence band versus rank; do the most-downloaded packages ship more or less often?\n6. **Packaging quality** \u2014 wheels, sdists and project URLs as a quality score, then check whether quality predicts downloads.\n7. **Python version adoption** \u2014 `python_versions_supported` over the ecosystem; who still lists 3.6?\n8. **Name economics** \u2014 name length and single-word names versus downloads (short names are scarce).\n9. **Supply-chain graph starter** \u2014 join `requires_dist_count` with per-package dependency lists fetched from PyPI for a network analysis.\n\n## \ud83d\udcc1 Files\n\n| File | What it is |\n|---|---|\n| `pypi_packages.csv` | 4,999 packages x 47 parameters. |\n| `data_dictionary.csv` | Column / type / description for every field. |\n| `notebook.ipynb` | Starter notebook: concentration, licences, cadence, dependencies. |\n| `dataset-metadata.json` | Kaggle API metadata. |\n| `about.md` | Plain-text About block. |\n\n## \ud83c\udff7\ufe0f Tags\n\n`python`, `pypi`, `software`, `open-source`, `packages`, `programming`, `developer-tools`, `supply-chain`, `tabular`, `web-scraping`\n\n## \ud83d\udd17 Provenance\n\n- **Sources:** (1) the **top PyPI packages** list maintained by Hugo van Kemenade\n (`hugovk.dev/top-pypi-packages/`), a 30-day rolling download ranking built from the official\n PyPI download logs; (2) the **PyPI JSON API** (`https://pypi.org/pypi/<project>/json`) for each\n project's metadata, classifiers, dependencies and release files.\n- **Coverage:** the 5,000 highest-ranked projects at snapshot time.\n- **Processing:** list and per-package metadata were joined on project name; release dates and file\n counts were derived from the `releases`/`urls` objects; licences normalised into classes.\n- **Derived columns:** download share, licence class, version counts, dependency counts, age,\n days since release, releases per year, cadence and maturity bands, URL completeness flags.\n- **Snapshot date:** 21 November 2026.\n\n## \ud83d\udd04 Update frequency\n\n**Monthly.** The download ranking is a rolling 30-day window; re-run `scripts/25_pypi_ecosystem.py` for a fresh snapshot.\n\n## \u26a0\ufe0f Caveats\n\n- Download counts include CI, mirrors and bots, so they measure installs rather than users.\n- The ranking covers only the top 5,000 projects; the long tail (hundreds of thousands of packages) is absent.\n- `author` and `summary` are free text and inconsistently filled.\n- `license` is often a full licence sentence or 'UNKNOWN'; use `license_class` for grouping.\n- Release dates come from file upload timestamps, which can be re-uploads rather than original publication.\n- Dependency counts use `requires_dist` and exclude environment markers beyond extras.\n- 5,000 API calls were made politely; a handful of packages may be missing if PyPI errored.\n\n## \ud83d\udcdc Licence\n\nPackage metadata is published by PyPI and the respective authors; the download ranking is published by Hugo van Kemenade. Mixed open-source licences \u2014 check each package's `license` field.\n\n### \ud83d\udccb Column Definitions & File Header\n\n| # | Column Name | Data Type | Description |\n|---|---|---|---|\n| 1 | `rank` | `number` | Rank in the 30-day download list (1 = most downloaded). |\n| 2 | `project` | `string` | Package name on PyPI. |\n| 3 | `monthly_downloads` | `number` | Downloads in the last 30 days (PyPI download statistics). |\n| 4 | `download_share_pct` | `number` | Share of the total downloads of all packages in this file. |\n| 5 | `latest_version` | `string` | Latest version on PyPI at snapshot time. |\n| 6 | `summary` | `string` | One-line package description. |\n| 7 | `author` | `string` | Author field as published. |\n| 8 | `license` | `string` | Licence string or classifier as published. |\n| 9 | `license_class` | `string` | Licence normalised into MIT, Apache, GPL, BSD, MPL, LGPL, Public domain, Creative Commons, Other, Unknown. |\n| 10 | `requires_python` | `string` | PEP 440 Python version specifier. |\n| 11 | `home_page` | `string` | Legacy home page URL. |\n| 12 | `project_url` | `string` | Legacy project URL. |\n| 13 | `package_url` | `string` | Canonical PyPI project URL. |\n| 14 | `keywords` | `string` | Comma-separated keywords as published. |\n| 15 | `development_status` | `string` | Development status from the trove classifiers. |\n| 16 | `classifier_count` | `number` | Number of trove classifiers. |\n| 17 | `topic_count` | `number` | Number of 'Topic ::' classifiers. |\n| 18 | `python_versions_supported` | `string` | Python versions named in the classifiers (semicolon-joined). |\n| 19 | `python_version_count` | `number` | Number of named Python versions. |\n| 20 | `requires_dist_count` | `number` | Raw number of entries in requires_dist, including extras. |\n| 21 | `dependency_count` | `number` | Number of runtime dependencies, excluding extras. |\n| 22 | `release_count` | `number` | Number of uploaded versions. |\n| 23 | `total_file_count` | `number` | Number of distribution files across all versions. |\n| 24 | `yanked_file_count` | `number` | Number of yanked files. |\n| 25 | `first_release` | `date` | Date of the earliest uploaded file (ISO). |\n| 26 | `latest_release` | `date` | Date of the most recent uploaded file (ISO). |\n| 27 | `latest_upload` | `date` | Upload date of the current version. |\n| 28 | `latest_size_bytes` | `number` | Size of the largest distribution file for the current version. |\n| 29 | `summary_length` | `number` | Characters in the summary. |\n| 30 | `has_wheel` | `boolean` | true when a wheel is published for the current version. |\n| 31 | `has_sdist` | `boolean` | true when a source distribution is published. |\n| 32 | `has_homepage` | `boolean` | true when a home page is declared. |\n| 33 | `has_docs_url` | `boolean` | true when a documentation URL appears in project_urls. |\n| 34 | `has_source_url` | `boolean` | true when a source/repository URL appears in project_urls. |\n| 35 | `has_changelog` | `boolean` | true when a changelog URL appears in project_urls. |\n| 36 | `project_url_count` | `number` | Number of project URLs declared. |\n| 37 | `is_prerelease` | `boolean` | true when the latest version looks like a pre-release. |\n| 38 | `python3_only` | `boolean` | true when requires_python allows Python 3 but not Python 2. |\n| 39 | `name_length` | `number` | Characters in the project name. |\n| 40 | `is_single_word` | `boolean` | true when the name has no spaces. |\n| 41 | `major_version` | `number` | Major component of the latest version. |\n| 42 | `age_days` | `number` | Days between the first release and the snapshot date. |\n| 43 | `days_since_release` | `number` | Days since the most recent release. |\n| 44 | `releases_per_year` | `number` | Average number of releases per year since the first release. |\n| 45 | `release_cadence` | `string` | Release cadence band: Dormant, Slow, Regular, Rapid, Very rapid. |\n| 46 | `maturity` | `string` | Maturity band from major version and age. |\n| 47 | `has_dependencies` | `boolean` | true when the package declares runtime dependencies. |\n\n\n\n---\n\n## \ud83c\udf1f Support & Community\nIf you find this dataset valuable for your research, portfolio, or machine learning projects, **please give it an upvote (\ud83d\udc4d) on Kaggle!**\nFeedback, questions, and notebook submissions are warmly welcomed in the Discussions tab.\n",
6
+ "isPrivate": false,
7
+ "licenses": [
8
+ {
9
+ "name": "CC-BY-4.0"
10
+ }
11
+ ],
12
+ "keywords": [
13
+ "python",
14
+ "software",
15
+ "open-source",
16
+ "tabular"
17
+ ],
18
+ "resources": [
19
+ {
20
+ "path": "pypi_packages.csv",
21
+ "description": "Primary dataset file containing 23,010 records across 47 parameters.",
22
+ "schema": {
23
+ "fields": [
24
+ {
25
+ "name": "rank",
26
+ "type": "number",
27
+ "description": "Rank in the 30-day download list (1 = most downloaded)."
28
+ },
29
+ {
30
+ "name": "project",
31
+ "type": "string",
32
+ "description": "Package name on PyPI."
33
+ },
34
+ {
35
+ "name": "monthly_downloads",
36
+ "type": "number",
37
+ "description": "Downloads in the last 30 days (PyPI download statistics)."
38
+ },
39
+ {
40
+ "name": "download_share_pct",
41
+ "type": "number",
42
+ "description": "Share of the total downloads of all packages in this file."
43
+ },
44
+ {
45
+ "name": "latest_version",
46
+ "type": "string",
47
+ "description": "Latest version on PyPI at snapshot time."
48
+ },
49
+ {
50
+ "name": "summary",
51
+ "type": "string",
52
+ "description": "One-line package description."
53
+ },
54
+ {
55
+ "name": "author",
56
+ "type": "string",
57
+ "description": "Author field as published."
58
+ },
59
+ {
60
+ "name": "license",
61
+ "type": "string",
62
+ "description": "Licence string or classifier as published."
63
+ },
64
+ {
65
+ "name": "license_class",
66
+ "type": "string",
67
+ "description": "Licence normalised into MIT, Apache, GPL, BSD, MPL, LGPL, Public domain, Creative Commons, Other, Unknown."
68
+ },
69
+ {
70
+ "name": "requires_python",
71
+ "type": "string",
72
+ "description": "PEP 440 Python version specifier."
73
+ },
74
+ {
75
+ "name": "home_page",
76
+ "type": "string",
77
+ "description": "Legacy home page URL."
78
+ },
79
+ {
80
+ "name": "project_url",
81
+ "type": "string",
82
+ "description": "Legacy project URL."
83
+ },
84
+ {
85
+ "name": "package_url",
86
+ "type": "string",
87
+ "description": "Canonical PyPI project URL."
88
+ },
89
+ {
90
+ "name": "keywords",
91
+ "type": "string",
92
+ "description": "Comma-separated keywords as published."
93
+ },
94
+ {
95
+ "name": "development_status",
96
+ "type": "string",
97
+ "description": "Development status from the trove classifiers."
98
+ },
99
+ {
100
+ "name": "classifier_count",
101
+ "type": "number",
102
+ "description": "Number of trove classifiers."
103
+ },
104
+ {
105
+ "name": "topic_count",
106
+ "type": "number",
107
+ "description": "Number of 'Topic ::' classifiers."
108
+ },
109
+ {
110
+ "name": "python_versions_supported",
111
+ "type": "string",
112
+ "description": "Python versions named in the classifiers (semicolon-joined)."
113
+ },
114
+ {
115
+ "name": "python_version_count",
116
+ "type": "number",
117
+ "description": "Number of named Python versions."
118
+ },
119
+ {
120
+ "name": "requires_dist_count",
121
+ "type": "number",
122
+ "description": "Raw number of entries in requires_dist, including extras."
123
+ },
124
+ {
125
+ "name": "dependency_count",
126
+ "type": "number",
127
+ "description": "Number of runtime dependencies, excluding extras."
128
+ },
129
+ {
130
+ "name": "release_count",
131
+ "type": "number",
132
+ "description": "Number of uploaded versions."
133
+ },
134
+ {
135
+ "name": "total_file_count",
136
+ "type": "number",
137
+ "description": "Number of distribution files across all versions."
138
+ },
139
+ {
140
+ "name": "yanked_file_count",
141
+ "type": "number",
142
+ "description": "Number of yanked files."
143
+ },
144
+ {
145
+ "name": "first_release",
146
+ "type": "date",
147
+ "description": "Date of the earliest uploaded file (ISO)."
148
+ },
149
+ {
150
+ "name": "latest_release",
151
+ "type": "date",
152
+ "description": "Date of the most recent uploaded file (ISO)."
153
+ },
154
+ {
155
+ "name": "latest_upload",
156
+ "type": "date",
157
+ "description": "Upload date of the current version."
158
+ },
159
+ {
160
+ "name": "latest_size_bytes",
161
+ "type": "number",
162
+ "description": "Size of the largest distribution file for the current version."
163
+ },
164
+ {
165
+ "name": "summary_length",
166
+ "type": "number",
167
+ "description": "Characters in the summary."
168
+ },
169
+ {
170
+ "name": "has_wheel",
171
+ "type": "boolean",
172
+ "description": "true when a wheel is published for the current version."
173
+ },
174
+ {
175
+ "name": "has_sdist",
176
+ "type": "boolean",
177
+ "description": "true when a source distribution is published."
178
+ },
179
+ {
180
+ "name": "has_homepage",
181
+ "type": "boolean",
182
+ "description": "true when a home page is declared."
183
+ },
184
+ {
185
+ "name": "has_docs_url",
186
+ "type": "boolean",
187
+ "description": "true when a documentation URL appears in project_urls."
188
+ },
189
+ {
190
+ "name": "has_source_url",
191
+ "type": "boolean",
192
+ "description": "true when a source/repository URL appears in project_urls."
193
+ },
194
+ {
195
+ "name": "has_changelog",
196
+ "type": "boolean",
197
+ "description": "true when a changelog URL appears in project_urls."
198
+ },
199
+ {
200
+ "name": "project_url_count",
201
+ "type": "number",
202
+ "description": "Number of project URLs declared."
203
+ },
204
+ {
205
+ "name": "is_prerelease",
206
+ "type": "boolean",
207
+ "description": "true when the latest version looks like a pre-release."
208
+ },
209
+ {
210
+ "name": "python3_only",
211
+ "type": "boolean",
212
+ "description": "true when requires_python allows Python 3 but not Python 2."
213
+ },
214
+ {
215
+ "name": "name_length",
216
+ "type": "number",
217
+ "description": "Characters in the project name."
218
+ },
219
+ {
220
+ "name": "is_single_word",
221
+ "type": "boolean",
222
+ "description": "true when the name has no spaces."
223
+ },
224
+ {
225
+ "name": "major_version",
226
+ "type": "number",
227
+ "description": "Major component of the latest version."
228
+ },
229
+ {
230
+ "name": "age_days",
231
+ "type": "number",
232
+ "description": "Days between the first release and the snapshot date."
233
+ },
234
+ {
235
+ "name": "days_since_release",
236
+ "type": "number",
237
+ "description": "Days since the most recent release."
238
+ },
239
+ {
240
+ "name": "releases_per_year",
241
+ "type": "number",
242
+ "description": "Average number of releases per year since the first release."
243
+ },
244
+ {
245
+ "name": "release_cadence",
246
+ "type": "string",
247
+ "description": "Release cadence band: Dormant, Slow, Regular, Rapid, Very rapid."
248
+ },
249
+ {
250
+ "name": "maturity",
251
+ "type": "string",
252
+ "description": "Maturity band from major version and age."
253
+ },
254
+ {
255
+ "name": "has_dependencies",
256
+ "type": "boolean",
257
+ "description": "true when the package declares runtime dependencies."
258
+ }
259
+ ]
260
+ }
261
+ },
262
+ {
263
+ "path": "data_dictionary.csv",
264
+ "description": "Field-level data dictionary detailing column names, data types, and semantic definitions."
265
+ },
266
+ {
267
+ "path": "notebook.ipynb",
268
+ "description": "Jupyter starter notebook providing exploratory data analysis."
269
+ }
270
+ ]
271
+ }
kernel-metadata.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": "samyakrajbayar/python-package-ecosystem-analysis",
3
+ "title": "Python Package Ecosystem Analysis",
4
+ "code_file": "notebook.ipynb",
5
+ "language": "python",
6
+ "kernel_type": "notebook",
7
+ "is_private": false,
8
+ "enable_gpu": false,
9
+ "enable_tpu": false,
10
+ "enable_internet": true,
11
+ "dataset_sources": [
12
+ "samyakrajbayar/python-package-ecosystem"
13
+ ]
14
+ }
notebook.ipynb ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "id": "7da4e307",
6
+ "metadata": {},
7
+ "source": [
8
+ "# Python Package Ecosystem\n",
9
+ "\n",
10
+ "Starter notebook for the Kaggle dataset in this folder. It loads `pypi_packages.csv` with pandas and walks through quality checks and a first piece of analysis.\n",
11
+ "\n",
12
+ "**Files:** `pypi_packages.csv`, `data_dictionary.csv`."
13
+ ]
14
+ },
15
+ {
16
+ "cell_type": "markdown",
17
+ "id": "0000f7f2",
18
+ "metadata": {},
19
+ "source": [
20
+ "## 1. Load the data"
21
+ ]
22
+ },
23
+ {
24
+ "cell_type": "code",
25
+ "id": "6e43df41",
26
+ "metadata": {},
27
+ "execution_count": null,
28
+ "outputs": [],
29
+ "source": [
30
+ "import pandas as pd\n",
31
+ "\n",
32
+ "df = pd.read_csv(\"pypi_packages.csv\", low_memory=False)\n",
33
+ "print(df.shape)"
34
+ ]
35
+ },
36
+ {
37
+ "cell_type": "markdown",
38
+ "id": "325de123",
39
+ "metadata": {},
40
+ "source": [
41
+ "## 2. Shape, types and missing values"
42
+ ]
43
+ },
44
+ {
45
+ "cell_type": "code",
46
+ "id": "6eb42bc8",
47
+ "metadata": {},
48
+ "execution_count": null,
49
+ "outputs": [],
50
+ "source": [
51
+ "print(f\"{df.shape[0]:,} rows x {df.shape[1]} columns\")\n",
52
+ "\n",
53
+ "missing = df.isna().mean().mul(100).sort_values(ascending=False)\n",
54
+ "missing[missing > 0].round(1).to_frame(\"missing_%\").head(15)"
55
+ ]
56
+ },
57
+ {
58
+ "cell_type": "markdown",
59
+ "id": "f2d963fe",
60
+ "metadata": {},
61
+ "source": [
62
+ "## 3. Numeric summary"
63
+ ]
64
+ },
65
+ {
66
+ "cell_type": "code",
67
+ "id": "aa2f8fd4",
68
+ "metadata": {},
69
+ "execution_count": null,
70
+ "outputs": [],
71
+ "source": [
72
+ "df.describe(include='number').T.round(2).head(20)"
73
+ ]
74
+ },
75
+ {
76
+ "cell_type": "markdown",
77
+ "id": "39973095",
78
+ "metadata": {},
79
+ "source": [
80
+ "## 4. Download concentration"
81
+ ]
82
+ },
83
+ {
84
+ "cell_type": "code",
85
+ "id": "cd1bc127",
86
+ "metadata": {},
87
+ "execution_count": null,
88
+ "outputs": [],
89
+ "source": [
90
+ "top = df.sort_values(\"monthly_downloads\", ascending=False).head(20)\n",
91
+ "top.set_index(\"project\")[\"monthly_downloads\"].plot(kind=\"bar\", figsize=(10, 4), title=\"Top 20 by 30-day downloads\")"
92
+ ]
93
+ },
94
+ {
95
+ "cell_type": "markdown",
96
+ "id": "57b1af2e",
97
+ "metadata": {},
98
+ "source": [
99
+ "## 5. Licence mix"
100
+ ]
101
+ },
102
+ {
103
+ "cell_type": "code",
104
+ "id": "1996a9ff",
105
+ "metadata": {},
106
+ "execution_count": null,
107
+ "outputs": [],
108
+ "source": [
109
+ "df.groupby(\"license_class\")[\"monthly_downloads\"].agg([\"count\", \"sum\"]).sort_values(\"sum\", ascending=False)"
110
+ ]
111
+ },
112
+ {
113
+ "cell_type": "markdown",
114
+ "id": "d18d6640",
115
+ "metadata": {},
116
+ "source": [
117
+ "## 6. Release cadence"
118
+ ]
119
+ },
120
+ {
121
+ "cell_type": "code",
122
+ "id": "13838fdd",
123
+ "metadata": {},
124
+ "execution_count": null,
125
+ "outputs": [],
126
+ "source": [
127
+ "df[\"release_cadence\"].value_counts().to_frame(\"packages\")"
128
+ ]
129
+ },
130
+ {
131
+ "cell_type": "markdown",
132
+ "id": "078fa60b",
133
+ "metadata": {},
134
+ "source": [
135
+ "## 7. Dependencies vs downloads"
136
+ ]
137
+ },
138
+ {
139
+ "cell_type": "code",
140
+ "id": "efc39228",
141
+ "metadata": {},
142
+ "execution_count": null,
143
+ "outputs": [],
144
+ "source": [
145
+ "sub = df.dropna(subset=[\"dependency_count\", \"monthly_downloads\"])\n",
146
+ "sub.plot.scatter(x=\"dependency_count\", y=\"monthly_downloads\", s=4, alpha=0.3, logy=True, figsize=(8, 5))"
147
+ ]
148
+ },
149
+ {
150
+ "cell_type": "markdown",
151
+ "id": "e4a6473e",
152
+ "metadata": {},
153
+ "source": [
154
+ "## 8. Staleness"
155
+ ]
156
+ },
157
+ {
158
+ "cell_type": "code",
159
+ "id": "b6a526e4",
160
+ "metadata": {},
161
+ "execution_count": null,
162
+ "outputs": [],
163
+ "source": [
164
+ "df.nlargest(15, \"days_since_release\")[[\"project\", \"days_since_release\", \"monthly_downloads\", \"development_status\"]]"
165
+ ]
166
+ },
167
+ {
168
+ "cell_type": "markdown",
169
+ "id": "7c563f68",
170
+ "metadata": {},
171
+ "source": [
172
+ "## 9. Packaging completeness"
173
+ ]
174
+ },
175
+ {
176
+ "cell_type": "code",
177
+ "id": "51857569",
178
+ "metadata": {},
179
+ "execution_count": null,
180
+ "outputs": [],
181
+ "source": [
182
+ "df.groupby(\"has_wheel\")[\"monthly_downloads\"].median().to_frame(\"median_downloads\")"
183
+ ]
184
+ },
185
+ {
186
+ "cell_type": "markdown",
187
+ "id": "6e43770c",
188
+ "metadata": {},
189
+ "source": [
190
+ "## Next steps\n",
191
+ "\n",
192
+ "See `KAGGLE.md` for analysis ideas, caveats and provenance."
193
+ ]
194
+ }
195
+ ],
196
+ "metadata": {
197
+ "kernelspec": {
198
+ "display_name": "Python 3",
199
+ "language": "python",
200
+ "name": "python3"
201
+ },
202
+ "language_info": {
203
+ "name": "python",
204
+ "version": "3.11",
205
+ "mimetype": "text/x-python",
206
+ "file_extension": ".py",
207
+ "codemirror_mode": {
208
+ "name": "ipython",
209
+ "version": 3
210
+ },
211
+ "pygments_lexer": "ipython3",
212
+ "nbconvert_exporter": "python"
213
+ }
214
+ },
215
+ "nbformat": 4,
216
+ "nbformat_minor": 5
217
+ }
pypi_packages.csv ADDED
The diff for this file is too large to render. See raw diff