Datasets:
Commit ·
08d5099
0
Parent(s):
Duplicate from lukeslp/world-languages
Browse filesCo-authored-by: Luke Steuber <lukeslp@users.noreply.huggingface.co>
- .gitattributes +59 -0
- HUGGINGFACE_README.md +56 -0
- KAGGLE_SETUP.md +65 -0
- LICENSE.md +33 -0
- README.md +51 -0
- dataset-metadata.json +17 -0
- demo_notebook.ipynb +403 -0
- world-languages-exploration.ipynb +105 -0
- world_languages_integrated.json +0 -0
.gitattributes
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.lz4 filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.mds filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
# Audio files - uncompressed
|
| 39 |
+
*.pcm filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
*.sam filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
*.raw filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
# Audio files - compressed
|
| 43 |
+
*.aac filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
*.flac filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
*.ogg filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
*.wav filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
# Image files - uncompressed
|
| 49 |
+
*.bmp filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
*.gif filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
*.tiff filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
# Image files - compressed
|
| 54 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
| 55 |
+
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
| 56 |
+
*.webp filter=lfs diff=lfs merge=lfs -text
|
| 57 |
+
# Video files - compressed
|
| 58 |
+
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 59 |
+
*.webm filter=lfs diff=lfs merge=lfs -text
|
HUGGINGFACE_README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
tags:
|
| 8 |
+
- languages
|
| 9 |
+
- linguistics
|
| 10 |
+
- nlp
|
| 11 |
+
- geospatial
|
| 12 |
+
- ethnography
|
| 13 |
+
pretty_name: World Languages
|
| 14 |
+
size_categories:
|
| 15 |
+
- 1K<n<10K
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# World Languages
|
| 19 |
+
|
| 20 |
+
7,130 world languages with geographic coordinates, speaker populations, language family classification, and ISO 639-3 codes. Integrated from multiple sources.
|
| 21 |
+
|
| 22 |
+
## Dataset Summary
|
| 23 |
+
|
| 24 |
+
| Metric | Value |
|
| 25 |
+
|--------|-------|
|
| 26 |
+
| Records | 7,130 |
|
| 27 |
+
| Format | JSON |
|
| 28 |
+
| Source | [Integrated (Glottolog, Ethnologue, Joshua Project)](https://glottolog.org/) |
|
| 29 |
+
|
| 30 |
+
## Usage
|
| 31 |
+
|
| 32 |
+
```python
|
| 33 |
+
from datasets import load_dataset
|
| 34 |
+
|
| 35 |
+
dataset = load_dataset("lukeslp/world-languages")
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
## License
|
| 39 |
+
|
| 40 |
+
CC-BY-4.0
|
| 41 |
+
|
| 42 |
+
## Citation
|
| 43 |
+
|
| 44 |
+
```bibtex
|
| 45 |
+
@dataset{world_languages_2026,
|
| 46 |
+
author = {Steuber, Luke},
|
| 47 |
+
title = {World Languages},
|
| 48 |
+
year = {2026},
|
| 49 |
+
publisher = {Hugging Face},
|
| 50 |
+
url = {https://huggingface.co/datasets/lukeslp/world-languages}
|
| 51 |
+
}
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
## Contact
|
| 55 |
+
|
| 56 |
+
Luke Steuber | luke@lukesteuber.com | @lukesteuber.com (Bluesky)
|
KAGGLE_SETUP.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Kaggle Setup Checklist - World Languages
|
| 2 |
+
|
| 3 |
+
Complete at: https://www.kaggle.com/datasets/lucassteuber/world-languages/settings
|
| 4 |
+
|
| 5 |
+
**Delete this file after completing setup.**
|
| 6 |
+
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
## Cover Image
|
| 10 |
+
|
| 11 |
+
Upload 1200x630px image representing the dataset.
|
| 12 |
+
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
## Provenance
|
| 16 |
+
|
| 17 |
+
### Source
|
| 18 |
+
|
| 19 |
+
| Source | URL | License |
|
| 20 |
+
|--------|-----|---------|
|
| 21 |
+
| Integrated (Glottolog, Ethnologue, Joshua Project) | https://glottolog.org/ | CC-BY-4.0 |
|
| 22 |
+
|
| 23 |
+
### Collection Methodology
|
| 24 |
+
|
| 25 |
+
```
|
| 26 |
+
Data extracted from Integrated (Glottolog, Ethnologue, Joshua Project) via API/bulk download.
|
| 27 |
+
All coordinates validated for bounds (-90 to 90 lat, -180 to 180 lon).
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
---
|
| 31 |
+
|
| 32 |
+
## License
|
| 33 |
+
|
| 34 |
+
Select: **CC-BY-4.0**
|
| 35 |
+
|
| 36 |
+
---
|
| 37 |
+
|
| 38 |
+
## Update Frequency
|
| 39 |
+
|
| 40 |
+
Select: **Annually** or **Not expected to update**
|
| 41 |
+
|
| 42 |
+
---
|
| 43 |
+
|
| 44 |
+
## File Description
|
| 45 |
+
|
| 46 |
+
### world_languages_integrated.json
|
| 47 |
+
|
| 48 |
+
```
|
| 49 |
+
JSON array containing 7,130 georeferenced records.
|
| 50 |
+
Each record includes latitude, longitude, name, and source-specific metadata.
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
## Tags
|
| 56 |
+
|
| 57 |
+
- languages
|
| 58 |
+
- linguistics
|
| 59 |
+
- nlp
|
| 60 |
+
- geospatial
|
| 61 |
+
- ethnography
|
| 62 |
+
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
**Delete this file after completing setup.**
|
LICENSE.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# License Information
|
| 2 |
+
|
| 3 |
+
This dataset combines data from multiple sources with different licenses:
|
| 4 |
+
|
| 5 |
+
## Creative Commons Attribution 4.0 (CC-BY-4.0)
|
| 6 |
+
- **Glottolog 4.8** (Max Planck Institute for Evolutionary Anthropology)
|
| 7 |
+
- Provides: ISO 639-3 codes, glottocodes, language family classification, coordinates, macroareas
|
| 8 |
+
- Full license: https://creativecommons.org/licenses/by/4.0/
|
| 9 |
+
|
| 10 |
+
## Summary/Derived Data
|
| 11 |
+
- **Ethnologue** (SIL International)
|
| 12 |
+
- Coordinate and speaker data derived from publicly available summaries
|
| 13 |
+
- Original database requires subscription
|
| 14 |
+
|
| 15 |
+
## Public API Data
|
| 16 |
+
- **Joshua Project**
|
| 17 |
+
- Speaker population aggregates, Bible translation status, religion data
|
| 18 |
+
- Available via public API: joshuaproject.net
|
| 19 |
+
|
| 20 |
+
## Combined Dataset
|
| 21 |
+
|
| 22 |
+
This compiled dataset is released under **CC-BY-4.0** with requirements to:
|
| 23 |
+
|
| 24 |
+
1. Credit Glottolog 4.8 for language classification data
|
| 25 |
+
2. Note that Ethnologue coordinates are derived from summary data
|
| 26 |
+
3. Credit Joshua Project for population and Bible translation data
|
| 27 |
+
|
| 28 |
+
## Citation
|
| 29 |
+
|
| 30 |
+
```
|
| 31 |
+
Steuber, L. (2026). World Languages: 7K Languages Integrated [Dataset].
|
| 32 |
+
Kaggle. https://www.kaggle.com/datasets/lucassteuber/world-languages
|
| 33 |
+
```
|
README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc0-1.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
tags:
|
| 6 |
+
- linguistics
|
| 7 |
+
- languages
|
| 8 |
+
- typology
|
| 9 |
+
- glottolog
|
| 10 |
+
- wals
|
| 11 |
+
- endangered-languages
|
| 12 |
+
- language-families
|
| 13 |
+
- geospatial
|
| 14 |
+
size_categories:
|
| 15 |
+
- 1K<n<10K
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# World Languages: 7,130 Languages with Coordinates and Features
|
| 19 |
+
|
| 20 |
+
Where are the world's 7,000+ languages spoken, and what makes each one unique? This dataset provides geographic coordinates, linguistic features, and demographic data for every documented living language.
|
| 21 |
+
|
| 22 |
+
World Languages integrates three authoritative sources:
|
| 23 |
+
|
| 24 |
+
• **Glottolog**: The definitive catalog of the world's languages, dialects, and language families with ISO 639-3 codes and Glottocodes
|
| 25 |
+
• **WALS (World Atlas of Language Structures)**: Typological features like word order (SOV, SVO, etc.), tone systems, case marking, and grammatical gender
|
| 26 |
+
• **Ethnologue/UNESCO data**: Speaker populations and endangerment status (from 'vigorous' to 'extinct')
|
| 27 |
+
|
| 28 |
+
Key fields include:
|
| 29 |
+
- Geographic coordinates (latitude/longitude) for language homelands
|
| 30 |
+
- Language family classification (Indo-European, Sino-Tibetan, Niger-Congo, etc.)
|
| 31 |
+
- Macroarea (Africa, Eurasia, Pacific, Americas, etc.)
|
| 32 |
+
- Structural features: phoneme count, syllable structure, word order
|
| 33 |
+
- Endangerment status and estimated speaker count
|
| 34 |
+
|
| 35 |
+
Applications include linguistic typology research, language documentation planning, geographic visualization of language diversity, and NLP resource allocation. The dataset reveals patterns like the concentration of linguistic diversity in Papua New Guinea (800+ languages) versus the relative homogeneity of Europe.
|
| 36 |
+
|
| 37 |
+
## Citation
|
| 38 |
+
|
| 39 |
+
```bibtex
|
| 40 |
+
@dataset{world_languages_2026,
|
| 41 |
+
title = {World Languages: 7,130 Languages with Coordinates and Features},
|
| 42 |
+
author = {Steuber, Luke},
|
| 43 |
+
year = {2026},
|
| 44 |
+
doi = {10.5281/zenodo.18320704},
|
| 45 |
+
url = {https://huggingface.co/datasets/lukeslp/world-languages}
|
| 46 |
+
}
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
## License
|
| 50 |
+
|
| 51 |
+
CC0 1.0 (Public Domain)
|
dataset-metadata.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"title": "World Languages",
|
| 3 |
+
"id": "lucassteuber/world-languages",
|
| 4 |
+
"licenses": [{"name": "CC-BY-4.0"}],
|
| 5 |
+
"subtitle": "7,130 languages with coordinates, speakers, and classification",
|
| 6 |
+
"description": "7,130 world languages integrated from Glottolog, Ethnologue, and Joshua Project. Each record includes geographic coordinates, speaker populations, and language family classification.",
|
| 7 |
+
"isPrivate": false,
|
| 8 |
+
"keywords": [
|
| 9 |
+
"languages",
|
| 10 |
+
"linguistics",
|
| 11 |
+
"nlp",
|
| 12 |
+
"geospatial",
|
| 13 |
+
"ethnography",
|
| 14 |
+
"endangered-languages",
|
| 15 |
+
"language-families"
|
| 16 |
+
]
|
| 17 |
+
}
|
demo_notebook.ipynb
ADDED
|
@@ -0,0 +1,403 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": [
|
| 3 |
+
{
|
| 4 |
+
"cell_type": "markdown",
|
| 5 |
+
"metadata": {},
|
| 6 |
+
"source": [
|
| 7 |
+
"# World Languages - Interactive Demo\n",
|
| 8 |
+
"\n",
|
| 9 |
+
"Explore **7,130 world languages** with geographic coordinates, speaker populations, and language family classification.\n",
|
| 10 |
+
"\n",
|
| 11 |
+
"**Dataset Highlights:**\n",
|
| 12 |
+
"- Geographic coordinates for mapping\n",
|
| 13 |
+
"- Speaker population estimates\n",
|
| 14 |
+
"- Language family classification (Glottolog)\n",
|
| 15 |
+
"- Bible translation status (Joshua Project)\n",
|
| 16 |
+
"- ISO 639-3 codes as primary keys"
|
| 17 |
+
]
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"cell_type": "markdown",
|
| 21 |
+
"metadata": {},
|
| 22 |
+
"source": [
|
| 23 |
+
"## Setup"
|
| 24 |
+
]
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"cell_type": "code",
|
| 28 |
+
"execution_count": null,
|
| 29 |
+
"metadata": {},
|
| 30 |
+
"outputs": [],
|
| 31 |
+
"source": [
|
| 32 |
+
"# Uncomment to install dependencies\n",
|
| 33 |
+
"# !pip install pandas matplotlib seaborn folium"
|
| 34 |
+
]
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"cell_type": "code",
|
| 38 |
+
"execution_count": null,
|
| 39 |
+
"metadata": {},
|
| 40 |
+
"outputs": [],
|
| 41 |
+
"source": [
|
| 42 |
+
"import json\n",
|
| 43 |
+
"import pandas as pd\n",
|
| 44 |
+
"import numpy as np\n",
|
| 45 |
+
"import matplotlib.pyplot as plt\n",
|
| 46 |
+
"import seaborn as sns\n",
|
| 47 |
+
"from collections import Counter\n",
|
| 48 |
+
"import warnings\n",
|
| 49 |
+
"warnings.filterwarnings('ignore')\n",
|
| 50 |
+
"\n",
|
| 51 |
+
"plt.style.use('seaborn-v0_8-darkgrid')\n",
|
| 52 |
+
"sns.set_palette('husl')\n",
|
| 53 |
+
"\n",
|
| 54 |
+
"print('Libraries loaded')"
|
| 55 |
+
]
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
"cell_type": "markdown",
|
| 59 |
+
"metadata": {},
|
| 60 |
+
"source": [
|
| 61 |
+
"## 1. Load Dataset"
|
| 62 |
+
]
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"cell_type": "code",
|
| 66 |
+
"execution_count": null,
|
| 67 |
+
"metadata": {},
|
| 68 |
+
"outputs": [],
|
| 69 |
+
"source": [
|
| 70 |
+
"with open('world_languages_integrated.json') as f:\n",
|
| 71 |
+
" data = json.load(f)\n",
|
| 72 |
+
"\n",
|
| 73 |
+
"print(f'Total languages: {len(data):,}')"
|
| 74 |
+
]
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"cell_type": "code",
|
| 78 |
+
"execution_count": null,
|
| 79 |
+
"metadata": {},
|
| 80 |
+
"outputs": [],
|
| 81 |
+
"source": [
|
| 82 |
+
"# Flatten the nested structure for analysis\n",
|
| 83 |
+
"records = []\n",
|
| 84 |
+
"for lang in data:\n",
|
| 85 |
+
" record = {\n",
|
| 86 |
+
" 'iso_639_3': lang.get('iso_639_3'),\n",
|
| 87 |
+
" 'name': lang.get('name'),\n",
|
| 88 |
+
" 'family': lang.get('glottolog', {}).get('family_name', 'Unknown'),\n",
|
| 89 |
+
" 'macroarea': lang.get('glottolog', {}).get('macroarea', 'Unknown'),\n",
|
| 90 |
+
" 'latitude': lang.get('glottolog', {}).get('latitude'),\n",
|
| 91 |
+
" 'longitude': lang.get('glottolog', {}).get('longitude'),\n",
|
| 92 |
+
" 'glottocode': lang.get('glottolog', {}).get('glottocode'),\n",
|
| 93 |
+
" 'speakers': lang.get('speaker_count', {}).get('count') if lang.get('speaker_count') else None,\n",
|
| 94 |
+
" 'religion': lang.get('joshua_project', {}).get('primary_religion', ''),\n",
|
| 95 |
+
" 'bible_status': lang.get('joshua_project', {}).get('bible_status', 0),\n",
|
| 96 |
+
" }\n",
|
| 97 |
+
" records.append(record)\n",
|
| 98 |
+
"\n",
|
| 99 |
+
"df = pd.DataFrame(records)\n",
|
| 100 |
+
"df.head()"
|
| 101 |
+
]
|
| 102 |
+
},
|
| 103 |
+
{
|
| 104 |
+
"cell_type": "markdown",
|
| 105 |
+
"metadata": {},
|
| 106 |
+
"source": [
|
| 107 |
+
"## 2. Dataset Overview"
|
| 108 |
+
]
|
| 109 |
+
},
|
| 110 |
+
{
|
| 111 |
+
"cell_type": "code",
|
| 112 |
+
"execution_count": null,
|
| 113 |
+
"metadata": {},
|
| 114 |
+
"outputs": [],
|
| 115 |
+
"source": [
|
| 116 |
+
"print('Dataset Overview:')\n",
|
| 117 |
+
"print('=' * 50)\n",
|
| 118 |
+
"print(f'Total languages: {len(df):,}')\n",
|
| 119 |
+
"print(f'With coordinates: {df[\"latitude\"].notna().sum():,} ({df[\"latitude\"].notna().sum()/len(df)*100:.1f}%)')\n",
|
| 120 |
+
"print(f'With speaker counts: {df[\"speakers\"].notna().sum():,} ({df[\"speakers\"].notna().sum()/len(df)*100:.1f}%)')\n",
|
| 121 |
+
"print(f'Unique families: {df[\"family\"].nunique()}')\n",
|
| 122 |
+
"print(f'Unique macroareas: {df[\"macroarea\"].nunique()}')"
|
| 123 |
+
]
|
| 124 |
+
},
|
| 125 |
+
{
|
| 126 |
+
"cell_type": "markdown",
|
| 127 |
+
"metadata": {},
|
| 128 |
+
"source": [
|
| 129 |
+
"## 3. Language Family Distribution"
|
| 130 |
+
]
|
| 131 |
+
},
|
| 132 |
+
{
|
| 133 |
+
"cell_type": "code",
|
| 134 |
+
"execution_count": null,
|
| 135 |
+
"metadata": {},
|
| 136 |
+
"outputs": [],
|
| 137 |
+
"source": [
|
| 138 |
+
"# Top 15 language families\n",
|
| 139 |
+
"family_counts = df['family'].value_counts().head(15)\n",
|
| 140 |
+
"\n",
|
| 141 |
+
"print('Top 15 Language Families:')\n",
|
| 142 |
+
"print('=' * 50)\n",
|
| 143 |
+
"for family, count in family_counts.items():\n",
|
| 144 |
+
" pct = count / len(df) * 100\n",
|
| 145 |
+
" bar = '|' * int(pct)\n",
|
| 146 |
+
" print(f'{family:30s} {count:5,} ({pct:5.1f}%) {bar}')"
|
| 147 |
+
]
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"cell_type": "code",
|
| 151 |
+
"execution_count": null,
|
| 152 |
+
"metadata": {},
|
| 153 |
+
"outputs": [],
|
| 154 |
+
"source": [
|
| 155 |
+
"fig, ax = plt.subplots(figsize=(12, 8))\n",
|
| 156 |
+
"family_counts.plot(kind='barh', ax=ax, color='steelblue')\n",
|
| 157 |
+
"ax.set_xlabel('Number of Languages', fontsize=12)\n",
|
| 158 |
+
"ax.set_ylabel('Language Family', fontsize=12)\n",
|
| 159 |
+
"ax.set_title('Top 15 Language Families', fontsize=14, fontweight='bold')\n",
|
| 160 |
+
"ax.grid(axis='x', alpha=0.3)\n",
|
| 161 |
+
"plt.tight_layout()\n",
|
| 162 |
+
"plt.show()"
|
| 163 |
+
]
|
| 164 |
+
},
|
| 165 |
+
{
|
| 166 |
+
"cell_type": "markdown",
|
| 167 |
+
"metadata": {},
|
| 168 |
+
"source": [
|
| 169 |
+
"## 4. Geographic Distribution"
|
| 170 |
+
]
|
| 171 |
+
},
|
| 172 |
+
{
|
| 173 |
+
"cell_type": "code",
|
| 174 |
+
"execution_count": null,
|
| 175 |
+
"metadata": {},
|
| 176 |
+
"outputs": [],
|
| 177 |
+
"source": [
|
| 178 |
+
"# Macroarea distribution\n",
|
| 179 |
+
"macroarea_counts = df['macroarea'].value_counts()\n",
|
| 180 |
+
"\n",
|
| 181 |
+
"print('Languages by Macroarea:')\n",
|
| 182 |
+
"print('=' * 50)\n",
|
| 183 |
+
"for area, count in macroarea_counts.items():\n",
|
| 184 |
+
" pct = count / len(df) * 100\n",
|
| 185 |
+
" print(f'{area:20s} {count:5,} ({pct:5.1f}%)')"
|
| 186 |
+
]
|
| 187 |
+
},
|
| 188 |
+
{
|
| 189 |
+
"cell_type": "code",
|
| 190 |
+
"execution_count": null,
|
| 191 |
+
"metadata": {},
|
| 192 |
+
"outputs": [],
|
| 193 |
+
"source": [
|
| 194 |
+
"# Plot languages on world map\n",
|
| 195 |
+
"valid_coords = df[df['latitude'].notna() & df['longitude'].notna()]\n",
|
| 196 |
+
"\n",
|
| 197 |
+
"fig, ax = plt.subplots(figsize=(16, 8))\n",
|
| 198 |
+
"scatter = ax.scatter(\n",
|
| 199 |
+
" valid_coords['longitude'],\n",
|
| 200 |
+
" valid_coords['latitude'],\n",
|
| 201 |
+
" c=pd.factorize(valid_coords['macroarea'])[0],\n",
|
| 202 |
+
" alpha=0.5,\n",
|
| 203 |
+
" s=5,\n",
|
| 204 |
+
" cmap='tab10'\n",
|
| 205 |
+
")\n",
|
| 206 |
+
"ax.set_xlabel('Longitude', fontsize=12)\n",
|
| 207 |
+
"ax.set_ylabel('Latitude', fontsize=12)\n",
|
| 208 |
+
"ax.set_title('Global Distribution of Languages', fontsize=14, fontweight='bold')\n",
|
| 209 |
+
"ax.grid(alpha=0.3)\n",
|
| 210 |
+
"plt.tight_layout()\n",
|
| 211 |
+
"plt.show()"
|
| 212 |
+
]
|
| 213 |
+
},
|
| 214 |
+
{
|
| 215 |
+
"cell_type": "markdown",
|
| 216 |
+
"metadata": {},
|
| 217 |
+
"source": [
|
| 218 |
+
"## 5. Speaker Populations"
|
| 219 |
+
]
|
| 220 |
+
},
|
| 221 |
+
{
|
| 222 |
+
"cell_type": "code",
|
| 223 |
+
"execution_count": null,
|
| 224 |
+
"metadata": {},
|
| 225 |
+
"outputs": [],
|
| 226 |
+
"source": [
|
| 227 |
+
"# Top 20 languages by speakers\n",
|
| 228 |
+
"with_speakers = df[df['speakers'].notna()].copy()\n",
|
| 229 |
+
"top_speakers = with_speakers.nlargest(20, 'speakers')[['name', 'family', 'speakers']]\n",
|
| 230 |
+
"\n",
|
| 231 |
+
"print('Top 20 Languages by Speaker Count:')\n",
|
| 232 |
+
"print('=' * 60)\n",
|
| 233 |
+
"for idx, row in top_speakers.iterrows():\n",
|
| 234 |
+
" speakers_m = row['speakers'] / 1_000_000\n",
|
| 235 |
+
" print(f\"{row['name']:25s} {row['family']:25s} {speakers_m:8.1f}M\")"
|
| 236 |
+
]
|
| 237 |
+
},
|
| 238 |
+
{
|
| 239 |
+
"cell_type": "code",
|
| 240 |
+
"execution_count": null,
|
| 241 |
+
"metadata": {},
|
| 242 |
+
"outputs": [],
|
| 243 |
+
"source": [
|
| 244 |
+
"# Speaker distribution (log scale)\n",
|
| 245 |
+
"fig, ax = plt.subplots(figsize=(12, 6))\n",
|
| 246 |
+
"with_speakers['speakers'].apply(np.log10).hist(bins=50, ax=ax, color='teal', edgecolor='white')\n",
|
| 247 |
+
"ax.set_xlabel('Speakers (log10 scale)', fontsize=12)\n",
|
| 248 |
+
"ax.set_ylabel('Number of Languages', fontsize=12)\n",
|
| 249 |
+
"ax.set_title('Distribution of Speaker Populations', fontsize=14, fontweight='bold')\n",
|
| 250 |
+
"ax.set_xticks([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])\n",
|
| 251 |
+
"ax.set_xticklabels(['1', '10', '100', '1K', '10K', '100K', '1M', '10M', '100M', '1B'])\n",
|
| 252 |
+
"plt.tight_layout()\n",
|
| 253 |
+
"plt.show()"
|
| 254 |
+
]
|
| 255 |
+
},
|
| 256 |
+
{
|
| 257 |
+
"cell_type": "markdown",
|
| 258 |
+
"metadata": {},
|
| 259 |
+
"source": [
|
| 260 |
+
"## 6. Bible Translation Status"
|
| 261 |
+
]
|
| 262 |
+
},
|
| 263 |
+
{
|
| 264 |
+
"cell_type": "code",
|
| 265 |
+
"execution_count": null,
|
| 266 |
+
"metadata": {},
|
| 267 |
+
"outputs": [],
|
| 268 |
+
"source": [
|
| 269 |
+
"# Bible translation status\n",
|
| 270 |
+
"bible_labels = {\n",
|
| 271 |
+
" 0: 'Unspecified',\n",
|
| 272 |
+
" 1: 'Translation Needed',\n",
|
| 273 |
+
" 2: 'Translation Started',\n",
|
| 274 |
+
" 3: 'Portions Available',\n",
|
| 275 |
+
" 4: 'New Testament',\n",
|
| 276 |
+
" 5: 'Complete Bible'\n",
|
| 277 |
+
"}\n",
|
| 278 |
+
"\n",
|
| 279 |
+
"df['bible_label'] = df['bible_status'].map(bible_labels)\n",
|
| 280 |
+
"bible_counts = df['bible_label'].value_counts()\n",
|
| 281 |
+
"\n",
|
| 282 |
+
"print('Bible Translation Status:')\n",
|
| 283 |
+
"print('=' * 50)\n",
|
| 284 |
+
"for status, count in bible_counts.items():\n",
|
| 285 |
+
" pct = count / len(df) * 100\n",
|
| 286 |
+
" print(f'{status:25s} {count:5,} ({pct:5.1f}%)')"
|
| 287 |
+
]
|
| 288 |
+
},
|
| 289 |
+
{
|
| 290 |
+
"cell_type": "markdown",
|
| 291 |
+
"metadata": {},
|
| 292 |
+
"source": [
|
| 293 |
+
"## 7. Interactive Map"
|
| 294 |
+
]
|
| 295 |
+
},
|
| 296 |
+
{
|
| 297 |
+
"cell_type": "code",
|
| 298 |
+
"execution_count": null,
|
| 299 |
+
"metadata": {},
|
| 300 |
+
"outputs": [],
|
| 301 |
+
"source": [
|
| 302 |
+
"import folium\n",
|
| 303 |
+
"from folium.plugins import MarkerCluster\n",
|
| 304 |
+
"\n",
|
| 305 |
+
"# Sample for performance\n",
|
| 306 |
+
"sample = valid_coords.sample(min(1000, len(valid_coords)))\n",
|
| 307 |
+
"\n",
|
| 308 |
+
"m = folium.Map(location=[20, 0], zoom_start=2, tiles='CartoDB positron')\n",
|
| 309 |
+
"marker_cluster = MarkerCluster().add_to(m)\n",
|
| 310 |
+
"\n",
|
| 311 |
+
"for idx, row in sample.iterrows():\n",
|
| 312 |
+
" popup = f\"<b>{row['name']}</b><br>Family: {row['family']}<br>Macroarea: {row['macroarea']}\"\n",
|
| 313 |
+
" folium.CircleMarker(\n",
|
| 314 |
+
" location=[row['latitude'], row['longitude']],\n",
|
| 315 |
+
" radius=4,\n",
|
| 316 |
+
" popup=popup,\n",
|
| 317 |
+
" color='steelblue',\n",
|
| 318 |
+
" fill=True,\n",
|
| 319 |
+
" fillOpacity=0.6\n",
|
| 320 |
+
" ).add_to(marker_cluster)\n",
|
| 321 |
+
"\n",
|
| 322 |
+
"m.save('languages_map.html')\n",
|
| 323 |
+
"print('Map saved to languages_map.html')\n",
|
| 324 |
+
"m"
|
| 325 |
+
]
|
| 326 |
+
},
|
| 327 |
+
{
|
| 328 |
+
"cell_type": "markdown",
|
| 329 |
+
"metadata": {},
|
| 330 |
+
"source": [
|
| 331 |
+
"## 8. Query Examples"
|
| 332 |
+
]
|
| 333 |
+
},
|
| 334 |
+
{
|
| 335 |
+
"cell_type": "code",
|
| 336 |
+
"execution_count": null,
|
| 337 |
+
"metadata": {},
|
| 338 |
+
"outputs": [],
|
| 339 |
+
"source": [
|
| 340 |
+
"# Find all Indo-European languages\n",
|
| 341 |
+
"indo_european = df[df['family'] == 'Indo-European']\n",
|
| 342 |
+
"print(f'Indo-European languages: {len(indo_european):,}')\n",
|
| 343 |
+
"print(indo_european[['name', 'macroarea', 'speakers']].head(10))"
|
| 344 |
+
]
|
| 345 |
+
},
|
| 346 |
+
{
|
| 347 |
+
"cell_type": "code",
|
| 348 |
+
"execution_count": null,
|
| 349 |
+
"metadata": {},
|
| 350 |
+
"outputs": [],
|
| 351 |
+
"source": [
|
| 352 |
+
"# Find endangered languages (small speaker populations)\n",
|
| 353 |
+
"endangered = df[(df['speakers'].notna()) & (df['speakers'] < 1000)]\n",
|
| 354 |
+
"print(f'Languages with <1000 speakers: {len(endangered):,}')\n",
|
| 355 |
+
"print(endangered[['name', 'family', 'speakers']].head(10))"
|
| 356 |
+
]
|
| 357 |
+
},
|
| 358 |
+
{
|
| 359 |
+
"cell_type": "code",
|
| 360 |
+
"execution_count": null,
|
| 361 |
+
"metadata": {},
|
| 362 |
+
"outputs": [],
|
| 363 |
+
"source": [
|
| 364 |
+
"# Languages in Africa\n",
|
| 365 |
+
"africa = df[df['macroarea'] == 'Africa']\n",
|
| 366 |
+
"africa_families = africa['family'].value_counts().head(10)\n",
|
| 367 |
+
"print(f'Languages in Africa: {len(africa):,}')\n",
|
| 368 |
+
"print('\\nTop families in Africa:')\n",
|
| 369 |
+
"print(africa_families)"
|
| 370 |
+
]
|
| 371 |
+
},
|
| 372 |
+
{
|
| 373 |
+
"cell_type": "markdown",
|
| 374 |
+
"metadata": {},
|
| 375 |
+
"source": [
|
| 376 |
+
"## Conclusion\n",
|
| 377 |
+
"\n",
|
| 378 |
+
"This notebook demonstrated:\n",
|
| 379 |
+
"\n",
|
| 380 |
+
"- Loading and exploring 7,130 world languages\n",
|
| 381 |
+
"- Analyzing language family distributions\n",
|
| 382 |
+
"- Mapping geographic distributions\n",
|
| 383 |
+
"- Exploring speaker populations\n",
|
| 384 |
+
"- Querying by region and attributes\n",
|
| 385 |
+
"\n",
|
| 386 |
+
"**Author**: Luke Steuber | luke@lukesteuber.com | @lukesteuber.com (Bluesky)"
|
| 387 |
+
]
|
| 388 |
+
}
|
| 389 |
+
],
|
| 390 |
+
"metadata": {
|
| 391 |
+
"kernelspec": {
|
| 392 |
+
"display_name": "Python 3",
|
| 393 |
+
"language": "python",
|
| 394 |
+
"name": "python3"
|
| 395 |
+
},
|
| 396 |
+
"language_info": {
|
| 397 |
+
"name": "python",
|
| 398 |
+
"version": "3.10.0"
|
| 399 |
+
}
|
| 400 |
+
},
|
| 401 |
+
"nbformat": 4,
|
| 402 |
+
"nbformat_minor": 4
|
| 403 |
+
}
|
world-languages-exploration.ipynb
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": [
|
| 3 |
+
{
|
| 4 |
+
"cell_type": "markdown",
|
| 5 |
+
"metadata": {},
|
| 6 |
+
"source": [
|
| 7 |
+
"# World Languages: 7,130 Languages Integrated\n",
|
| 8 |
+
"\n",
|
| 9 |
+
"Geographic coordinates, speaker populations, and language family classification from Glottolog, Ethnologue, and Joshua Project."
|
| 10 |
+
]
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"cell_type": "code",
|
| 14 |
+
"execution_count": null,
|
| 15 |
+
"metadata": {},
|
| 16 |
+
"outputs": [],
|
| 17 |
+
"source": [
|
| 18 |
+
"import json\n",
|
| 19 |
+
"import pandas as pd\n",
|
| 20 |
+
"\n",
|
| 21 |
+
"# Load the dataset\n",
|
| 22 |
+
"with open('world_languages_integrated.json') as f:\n",
|
| 23 |
+
" data = json.load(f)\n",
|
| 24 |
+
"\n",
|
| 25 |
+
"print(f'Total languages: {len(data):,}')"
|
| 26 |
+
]
|
| 27 |
+
},
|
| 28 |
+
{
|
| 29 |
+
"cell_type": "code",
|
| 30 |
+
"execution_count": null,
|
| 31 |
+
"metadata": {},
|
| 32 |
+
"outputs": [],
|
| 33 |
+
"source": [
|
| 34 |
+
"# Convert to DataFrame\n",
|
| 35 |
+
"df = pd.DataFrame(data)\n",
|
| 36 |
+
"df.head()"
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"cell_type": "code",
|
| 41 |
+
"execution_count": null,
|
| 42 |
+
"metadata": {},
|
| 43 |
+
"outputs": [],
|
| 44 |
+
"source": [
|
| 45 |
+
"# Top language families by number of languages\n",
|
| 46 |
+
"if 'family' in df.columns:\n",
|
| 47 |
+
" family_counts = df['family'].value_counts().head(15)\n",
|
| 48 |
+
" print('Top 15 Language Families:')\n",
|
| 49 |
+
" print('=' * 40)\n",
|
| 50 |
+
" for family, count in family_counts.items():\n",
|
| 51 |
+
" print(f'{family}: {count:,} languages')"
|
| 52 |
+
]
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"cell_type": "code",
|
| 56 |
+
"execution_count": null,
|
| 57 |
+
"metadata": {},
|
| 58 |
+
"outputs": [],
|
| 59 |
+
"source": [
|
| 60 |
+
"# Languages with most speakers\n",
|
| 61 |
+
"if 'speakers' in df.columns:\n",
|
| 62 |
+
" top_speakers = df.nlargest(20, 'speakers')[['name', 'speakers', 'family']]\n",
|
| 63 |
+
" print('Top 20 Languages by Speaker Count:')\n",
|
| 64 |
+
" print(top_speakers.to_string(index=False))"
|
| 65 |
+
]
|
| 66 |
+
},
|
| 67 |
+
{
|
| 68 |
+
"cell_type": "code",
|
| 69 |
+
"execution_count": null,
|
| 70 |
+
"metadata": {},
|
| 71 |
+
"outputs": [],
|
| 72 |
+
"source": [
|
| 73 |
+
"# Geographic coverage\n",
|
| 74 |
+
"valid_coords = df[(df['latitude'].notna()) & (df['longitude'].notna())]\n",
|
| 75 |
+
"print(f'Languages with coordinates: {len(valid_coords):,} ({len(valid_coords)/len(df)*100:.1f}%)')"
|
| 76 |
+
]
|
| 77 |
+
},
|
| 78 |
+
{
|
| 79 |
+
"cell_type": "markdown",
|
| 80 |
+
"metadata": {},
|
| 81 |
+
"source": [
|
| 82 |
+
"## Data Sources\n",
|
| 83 |
+
"\n",
|
| 84 |
+
"| Source | Data Provided | License |\n",
|
| 85 |
+
"|--------|--------------|--------|\n",
|
| 86 |
+
"| Glottolog 4.8 | ISO codes, classification | CC-BY-4.0 |\n",
|
| 87 |
+
"| Ethnologue | Coordinates, speakers | Summary data |\n",
|
| 88 |
+
"| Joshua Project | Population data | Public API |"
|
| 89 |
+
]
|
| 90 |
+
}
|
| 91 |
+
],
|
| 92 |
+
"metadata": {
|
| 93 |
+
"kernelspec": {
|
| 94 |
+
"display_name": "Python 3",
|
| 95 |
+
"language": "python",
|
| 96 |
+
"name": "python3"
|
| 97 |
+
},
|
| 98 |
+
"language_info": {
|
| 99 |
+
"name": "python",
|
| 100 |
+
"version": "3.10.0"
|
| 101 |
+
}
|
| 102 |
+
},
|
| 103 |
+
"nbformat": 4,
|
| 104 |
+
"nbformat_minor": 4
|
| 105 |
+
}
|
world_languages_integrated.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|