lukeslp commited on
Commit
48b90dd
·
verified ·
1 Parent(s): 5138c50

Upload language-families/README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. language-families/README.md +262 -0
language-families/README.md ADDED
@@ -0,0 +1,262 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Language Family Trees
2
+
3
+ Phylogenetic trees of world languages in multiple formats, optimized for different visualizations and analyses.
4
+
5
+ ## Canonical Location
6
+
7
+ **This is the canonical storage location** for all language family tree data. Files in `/home/coolhand/html/datavis/language/data/` are **symlinks** pointing to this directory to maintain backward compatibility with existing visualizations.
8
+
9
+ ## Dataset Versions
10
+
11
+ ### Primary Datasets
12
+
13
+ #### `language-history.json` (4.8M) - PRIMARY VERSION
14
+ - **Nodes**: 360 languages
15
+ - **Structure**: Full hierarchical tree with parent-child relationships
16
+ - **Depth**: Variable (up to 12 levels in some families)
17
+ - **Content**: Language names, ISO 639-3 codes, family classifications, speaker populations
18
+ - **Use Case**: Primary dataset for most language family visualizations
19
+ - **Recommended For**: Tree layouts, force-directed networks, hierarchical visualizations
20
+
21
+ #### `language-history-depth6.json` (1.9M) - FLATTENED VERSION
22
+ - **Nodes**: 360 languages (same as primary)
23
+ - **Structure**: Flattened to maximum depth of 6 levels
24
+ - **Purpose**: Optimized for visualizations with limited vertical space
25
+ - **Use Case**: Compact tree layouts, radial visualizations
26
+ - **Recommended For**: Small screens, radial dendrograms, space-constrained layouts
27
+
28
+ #### `language-history-glottolog.json` (4.6M) - ENRICHED VERSION
29
+ - **Nodes**: 360 languages
30
+ - **Structure**: Same as primary + Glottolog metadata
31
+ - **Additional Data**:
32
+ - Glottolog languoid codes
33
+ - Geographic coordinates
34
+ - Language status (living, extinct, reconstructed)
35
+ - Alternative names and aliases
36
+ - **Use Case**: Research projects requiring authoritative linguistic metadata
37
+ - **Recommended For**: Academic visualizations, linguistic research, geographic mapping
38
+
39
+ ### Proto-Indo-European (PIE) Variants
40
+
41
+ These datasets focus exclusively on the Indo-European language family:
42
+
43
+ #### `pie-full.json` (160KB) - COMPLETE PIE TREE
44
+ - **Scope**: All documented Indo-European languages
45
+ - **Branches**: Germanic, Romance, Slavic, Indo-Iranian, Celtic, Hellenic, etc.
46
+ - **Depth**: From Proto-Indo-European root to modern languages
47
+ - **Use Case**: Full PIE family visualization
48
+ - **Recommended For**: Indo-European focused projects, full family trees
49
+
50
+ #### `pie-curated.json` (98KB) - CURATED PIE SUBSET
51
+ - **Scope**: Major Indo-European languages (curated selection)
52
+ - **Purpose**: Highlights most widely spoken and historically significant languages
53
+ - **Use Case**: Simplified PIE visualization without minor dialects
54
+ - **Recommended For**: Educational visualizations, overview presentations
55
+
56
+ #### `pie-hybrid.json` (75KB) - HYBRID PIE FORMAT
57
+ - **Scope**: Optimized selection with balanced detail
58
+ - **Purpose**: Balanced selection - detailed but not overwhelming
59
+ - **Use Case**: Interactive visualizations with progressive disclosure
60
+ - **Recommended For**: Web-based exploratory interfaces
61
+
62
+ ### Supporting Datasets
63
+
64
+ #### `speaker_counts.json` (6KB)
65
+ - **Content**: Speaker population statistics for all languages in the main dataset
66
+ - **Format**: `{ "iso_639_3": population_count }`
67
+ - **Source**: Ethnologue, Glottolog aggregates
68
+ - **Use Case**: Size encoding in visualizations (bubble size, node radius)
69
+
70
+ #### `iso-639-3-aliases.json` (4KB)
71
+ - **Content**: Alternative names and aliases for ISO 639-3 language codes
72
+ - **Format**: `{ "iso_code": ["alias1", "alias2", ...] }`
73
+ - **Purpose**: Enable search by alternative language names
74
+ - **Use Case**: Search functionality, autocomplete, name disambiguation
75
+
76
+ #### `language_evolution.json` (37KB) - ALTERNATIVE PHYLOGENETIC FORMAT
77
+ - **Source**: Etymology server phylogenetic analysis
78
+ - **Structure**: Alternative tree structure from etymological perspective
79
+ - **Purpose**: Cross-reference and validation against main dataset
80
+ - **Use Case**: Etymology research, comparative linguistics
81
+
82
+ ## Version Selection Guide
83
+
84
+ | Use Case | Recommended Version | Rationale |
85
+ |----------|---------------------|-----------|
86
+ | **General language tree visualization** | `language-history.json` | Standard, comprehensive, well-tested |
87
+ | **Mobile/small screen** | `language-history-depth6.json` | Reduced depth fits better in constrained space |
88
+ | **Academic/research** | `language-history-glottolog.json` | Authoritative metadata from Glottolog |
89
+ | **Indo-European only** | `pie-curated.json` or `pie-hybrid.json` | Focused scope, easier to navigate |
90
+ | **Complete PIE family** | `pie-full.json` | All documented IE languages |
91
+ | **Size-encoded visualizations** | `language-history.json` + `speaker_counts.json` | Combine for population-weighted layouts |
92
+ | **Search/autocomplete** | Any tree + `iso-639-3-aliases.json` | Enable search by alternative names |
93
+
94
+ ## Data Structure
95
+
96
+ ### Node Format (Standard)
97
+
98
+ ```json
99
+ {
100
+ "id": "unique_identifier",
101
+ "name": "Language Name",
102
+ "iso_639_3": "iso",
103
+ "parent_id": "parent_unique_id",
104
+ "level": 3,
105
+ "family": "Language Family",
106
+ "subfamily": "Subfamily",
107
+ "speakers": 1000000,
108
+ "status": "living",
109
+ "coordinates": [longitude, latitude]
110
+ }
111
+ ```
112
+
113
+ ### Tree Structure
114
+
115
+ ```json
116
+ {
117
+ "nodes": [
118
+ { "id": "root", "name": "World Languages", "level": 0 },
119
+ { "id": "ie", "name": "Indo-European", "parent_id": "root", "level": 1 },
120
+ { "id": "gmc", "name": "Germanic", "parent_id": "ie", "level": 2 },
121
+ { "id": "eng", "name": "English", "parent_id": "gmc", "level": 3, "iso_639_3": "eng" }
122
+ ],
123
+ "edges": [
124
+ { "source": "root", "target": "ie" },
125
+ { "source": "ie", "target": "gmc" },
126
+ { "source": "gmc", "target": "eng" }
127
+ ]
128
+ }
129
+ ```
130
+
131
+ ## Symlink Strategy
132
+
133
+ **Why symlinks?**
134
+ - Creates single source of truth in data_trove
135
+ - Maintains backward compatibility for existing projects
136
+ - No code changes required in consuming visualizations
137
+ - Easy to identify canonical location (physical file vs symlink)
138
+
139
+ **Symlinked locations**:
140
+ - `/home/coolhand/html/datavis/language/data/*.json` → All files symlinked to this directory
141
+
142
+ **Consuming projects** (all work transparently via symlinks):
143
+ 1. **Poems visualizations** - 5 HTML files fetch via `../../language/data/language-history.json`
144
+ 2. **Etymology server** - Config path still valid via symlink
145
+ 3. **Language datavis** - Local data directory contains symlinks to canonical data_trove location
146
+ 4. **PNW isolates** - May reference language trees for context
147
+
148
+ ## Data Provenance
149
+
150
+ ### Sources
151
+ - **Primary**: Glottolog 4.8 (glottolog.org)
152
+ - **Secondary**: Ethnologue 25th edition, Wikidata, Unicode CLDR
153
+ - **Etymology**: Diachronica database, etymological dictionaries
154
+ - **Speaker Counts**: Ethnologue, national census data, Glottolog estimates
155
+
156
+ ### Last Updated
157
+ - **2026-01-18**: Consolidated into data_trove with symlink strategy
158
+ - **2025-01-15**: Initial creation from Glottolog 4.8 data
159
+
160
+ ### Update Schedule
161
+ - **Glottolog**: Annual releases (typically February)
162
+ - **Ethnologue**: Annual editions (typically mid-year)
163
+ - **Recommended refresh**: Annually after Glottolog release
164
+
165
+ ## Usage Examples
166
+
167
+ ### D3.js Tree Layout
168
+ ```javascript
169
+ d3.json('data/linguistic/language-families/language-history.json')
170
+ .then(data => {
171
+ const root = d3.hierarchy(data, d => d.children);
172
+ const treeLayout = d3.tree().size([height, width]);
173
+ treeLayout(root);
174
+ // Render tree
175
+ });
176
+ ```
177
+
178
+ ### Force-Directed Network
179
+ ```javascript
180
+ d3.json('data/linguistic/language-families/language-history.json')
181
+ .then(data => {
182
+ const simulation = d3.forceSimulation(data.nodes)
183
+ .force('link', d3.forceLink(data.edges).id(d => d.id))
184
+ .force('charge', d3.forceManyBody().strength(-100))
185
+ .force('center', d3.forceCenter(width / 2, height / 2));
186
+ // Render network
187
+ });
188
+ ```
189
+
190
+ ### Size-Encoded Visualization
191
+ ```javascript
192
+ Promise.all([
193
+ d3.json('data/linguistic/language-families/language-history.json'),
194
+ d3.json('data/linguistic/language-families/speaker_counts.json')
195
+ ]).then(([tree, speakers]) => {
196
+ tree.nodes.forEach(node => {
197
+ node.speakers = speakers[node.iso_639_3] || 0;
198
+ node.radius = Math.sqrt(node.speakers) / 100; // Scale appropriately
199
+ });
200
+ // Render with size encoding
201
+ });
202
+ ```
203
+
204
+ ## Related Datasets
205
+
206
+ ### In data_trove/data/linguistic/
207
+ - `glottolog_languoid.csv` (1.8M) - Full Glottolog catalog (8,500+ languoids)
208
+ - `glottolog_coordinates.json` (3.8M) - Geographic coordinates for all languoids
209
+ - `iso_639_3.json` (1.4M) - ISO 639-3 standard language codes
210
+ - `world_languages_integrated.json` (8.1M) - Comprehensive world languages database
211
+
212
+ ### In diachronica corpus (reference location)
213
+ - `/home/coolhand/servers/diachronica/corpus/historical-corpora/` - Historical text corpora
214
+ - `/home/coolhand/servers/diachronica/etymology/` - Etymology database and visualizations
215
+
216
+ ## Notes
217
+
218
+ - All files are valid JSON and can be validated with `jq`
219
+ - Geographic coordinates use [longitude, latitude] format (GeoJSON convention)
220
+ - ISO 639-3 codes are the standard three-letter language identifiers
221
+ - Node IDs are unique within each file but may differ between versions
222
+ - Parent-child relationships are preserved across all primary versions
223
+
224
+ ## Validation
225
+
226
+ ### Check JSON validity
227
+ ```bash
228
+ jq . language-history.json > /dev/null && echo "✅ Valid JSON"
229
+ ```
230
+
231
+ ### Count nodes
232
+ ```bash
233
+ jq '.nodes | length' language-history.json
234
+ # Should return: 360
235
+ ```
236
+
237
+ ### Verify symlinks
238
+ ```bash
239
+ ls -la /home/coolhand/html/datavis/language/data/language-history.json
240
+ # Should show symlink to this directory
241
+ ```
242
+
243
+ ### Test symlink resolution
244
+ ```bash
245
+ cat /home/coolhand/html/datavis/language/data/language-history.json | jq '.nodes | length'
246
+ # Should return: 360 (proving symlink works)
247
+ ```
248
+
249
+ ## License
250
+
251
+ Data sources have various licenses:
252
+ - **Glottolog**: Creative Commons Attribution 4.0
253
+ - **Ethnologue**: Proprietary (aggregated statistics used under fair use)
254
+ - **Wikidata**: CC0 (public domain)
255
+
256
+ Compiled dataset is released under **CC BY 4.0** - attribution required.
257
+
258
+ ## Contact
259
+
260
+ - **Maintainer**: Luke Steuber (luke@lukesteuber.com)
261
+ - **Project**: dr.eamer.dev/datavis/
262
+ - **Repository**: /home/coolhand/html/datavis/data_trove/