History of global_language_network
The changes to the source code of this entry in the repository, newest first, each with the differences it made to the entry's files. They are also listed on GitLab.
[entries] Add the date when each entry was added, and remove icon_hash beff7c9
The dates are those of the commits that first added the entries' files (2020-08-11 for the entries of the initial commit); renamed entries keep the date of their first name. Changed: none
diff --git a/entries/global_language_network/__init__.py b/entries/global_language_network/__init__.py
index 9b3ac5b..30ac7bd 100644
--- a/entries/global_language_network/__init__.py
+++ b/entries/global_language_network/__init__.py
@@ -44,7 +44,7 @@ tags = ['Informational', 'Language', 'Weighted', 'Metadata']
url = ['https://github.com/CenterForCollectiveLearning/Global-language-network',
'https://web.archive.org/web/20150124132808/http://language.media.mit.edu/']
citation = [('S. Ronen, B. Gonçalves, K. Z. Hu, A. Vespignani, S. Pinker, C. A. Hidalgo, "Links that speak: The global language network and its association with global fame." Proceedings of the National Academy of Sciences 111(52), E5616-E5622 (2014)', 'https://doi.org/10.1073/pnas.1410931111')]
-icon_hash = '5849983e8cf714f319c48f8a'
+date_added = '2026-10-25'
upstream_license = None
upstream_prefix = 'https://raw.githubusercontent.com/CenterForCollectiveLearning/Global-language-network/620baafceb3f350f6efb603535c9ef8c8a2d3750/src/data'
files = [('books_raw.json', 'books', True),
[entries] Prefix the properties in the descriptions with (Node), (Edge) or (Graph) bc3dbbd
The lists of properties at the end of the descriptions marked edge properties with "Edge" but left node properties unmarked, or grouped them in "Nodes: `a`, ...; `b`, ..." items, so the kind of a property was often unclear. Every item now starts with (Node), (Edge) or (Graph), followed by the property names, a colon and the explanation, one item per property or group of properties; qualifications (kinds of nodes, networks) follow the names in parentheses. Properties that were only named got a short explanation, and a few items that named the wrong kind of property were corrected.
diff --git a/entries/global_language_network/__init__.py b/entries/global_language_network/__init__.py
index fb1281b..9b3ac5b 100644
--- a/entries/global_language_network/__init__.py
+++ b/entries/global_language_network/__init__.py
@@ -31,8 +31,13 @@ For each pair of languages, the strength of the connection is measured by the $\
The networks have the following properties:
-- Nodes: `name`, the ISO 639-3 code of the language; `language`, its name; `family` and `primary_family`, the language family at two levels (e.g. "Germanic" and "Indo-European"); `speakers`, the number of native and non-native speakers, in millions (NaN if not given, for 74 languages of the `books` network).
-- Edges: `cooccurrences`, the number $M_{ij}$ of common users (Twitter, Wikipedia) or of translations from the source to the target language (books); `phi`, the $\\phi$ correlation; `t_statistic`, the $t$ statistic.[^icon]
+- (Node) `name`: the ISO 639-3 code of the language.
+- (Node) `language`: its name.
+- (Node) `family` and `primary_family`: the language family at two levels (e.g. "Germanic" and "Indo-European").
+- (Node) `speakers`: the number of native and non-native speakers, in millions (NaN if not given, for 74 languages of the `books` network).
+- (Edge) `cooccurrences`: the number $M_{ij}$ of common users (Twitter, Wikipedia) or of translations from the source to the target language (books).
+- (Edge) `phi`: the $\\phi$ correlation.
+- (Edge) `t_statistic`: the $t$ statistic.[^icon].
[^icon]: Description obtained in part from the [ICON](https://icon.colorado.edu) project."""
tags = ['Informational', 'Language', 'Weighted', 'Metadata']
[entries] Remove unneeded code from the entries 2c69f19
Unneeded "global files" statements, unused imports and variables, f-strings without placeholders, duplicate keys in foodweb_little_rock (keeping the order and the values used), and the second definition of get_lines() in twitter_higgs. Nothing changes in the networks or descriptions. Changed: none
diff --git a/entries/global_language_network/__init__.py b/entries/global_language_network/__init__.py
index d01f31c..fb1281b 100644
--- a/entries/global_language_network/__init__.py
+++ b/entries/global_language_network/__init__.py
@@ -54,7 +54,6 @@ def fetch_upstream(force=False):
@coerce_props()
@annotate()
def parse(alts=None):
- global files
name = __name__.split(".")[-1]
for fname, alt, directed in files:
if alts is not None and alt not in alts:
[entries] New entry: global_language_network af322ae
diff --git a/entries/global_language_network/__init__.py b/entries/global_language_network/__init__.py
new file mode 100644
index 0000000..d01f31c
--- /dev/null
+++ b/entries/global_language_network/__init__.py
@@ -0,0 +1,94 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2020-2026 Tiago de Paula Peixoto <tiago@skewed.de>
+#
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Affero General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Affero General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+from .. import *
+import json
+
+title = "Global language networks (2014)"
+description = """Networks of languages that are connected by multilingual speakers or by translations, from S. Ronen, B. Gonçalves, K. Z. Hu, A. Vespignani, S. Pinker and C. A. Hidalgo, built from three records of linguistic expression. Nodes are languages, and an edge connects two languages with a statistically significant number of shared users or translations, as follows:
+
+- `books`: book translations. A directed edge from language $i$ to language $j$ means that a significant number of books were translated from $i$ into $j$, according to UNESCO's Index Translationum, which lists 2.2 million translations of printed books published between 1979 and 2011.
+- `twitter`: an undirected edge connects two languages if users who tweet in one of them are significantly more likely to also tweet in the other, based on nearly 550 million tweets in 73 languages (language detected automatically) by more than 17 million users, collected from December 2011 to February 2012.
+- `wikipedia`: an undirected edge connects two languages if editors who edit an article in the Wikipedia edition of one language are significantly more likely to also edit an article in the edition of the other, based on 382 million edits in 238 language editions by 2.5 million editors, until the end of 2011 (excluding edits by bots).
+
+For each pair of languages, the strength of the connection is measured by the $\\phi$ correlation between the occurrence of the two languages, computed from the number $M_{ij}$ of common users (or translations from $i$ to $j$), and its significance by the corresponding $t$ statistic. The networks contain only the connections that involve at least six common users or translations (ten for Twitter in this data) and that are significant at $P < 0.01$ ($t > 2.58$), as in the visualizations of the paper; languages without any such connection are not included. The data are those of the interactive visualization of the networks by the authors' group (MIT Media Lab, now Center for Collective Learning).
+
+The networks have the following properties:
+
+- Nodes: `name`, the ISO 639-3 code of the language; `language`, its name; `family` and `primary_family`, the language family at two levels (e.g. "Germanic" and "Indo-European"); `speakers`, the number of native and non-native speakers, in millions (NaN if not given, for 74 languages of the `books` network).
+- Edges: `cooccurrences`, the number $M_{ij}$ of common users (Twitter, Wikipedia) or of translations from the source to the target language (books); `phi`, the $\\phi$ correlation; `t_statistic`, the $t$ statistic.[^icon]
+
+[^icon]: Description obtained in part from the [ICON](https://icon.colorado.edu) project."""
+tags = ['Informational', 'Language', 'Weighted', 'Metadata']
+url = ['https://github.com/CenterForCollectiveLearning/Global-language-network',
+ 'https://web.archive.org/web/20150124132808/http://language.media.mit.edu/']
+citation = [('S. Ronen, B. Gonçalves, K. Z. Hu, A. Vespignani, S. Pinker, C. A. Hidalgo, "Links that speak: The global language network and its association with global fame." Proceedings of the National Academy of Sciences 111(52), E5616-E5622 (2014)', 'https://doi.org/10.1073/pnas.1410931111')]
+icon_hash = '5849983e8cf714f319c48f8a'
+upstream_license = None
+upstream_prefix = 'https://raw.githubusercontent.com/CenterForCollectiveLearning/Global-language-network/620baafceb3f350f6efb603535c9ef8c8a2d3750/src/data'
+files = [('books_raw.json', 'books', True),
+ ('twitter_raw.json', 'twitter', False),
+ ('wikipedia_raw.json', 'wikipedia', False)]
+
+def fetch_upstream(force=False):
+ return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
+ force)
+
+@cache_network()
+@coerce_props()
+@annotate()
+def parse(alts=None):
+ global files
+ name = __name__.split(".")[-1]
+ for fname, alt, directed in files:
+ if alts is not None and alt not in alts:
+ continue
+ with open_upstream_file(name, fname, "r") as f:
+ d = json.load(f)
+ nodes = [x["data"] for x in d["elements"]["nodes"]]
+ idx = {n["id"]: i for i, n in enumerate(nodes)}
+ g = Graph(directed=directed)
+ g.add_vertex(len(nodes))
+ g.vp.name = g.new_vp("string", vals=[n["name"] for n in nodes])
+ g.vp.language = g.new_vp("string", vals=[n["Lang_Name"] for n in nodes])
+ g.vp.family = g.new_vp("string", vals=[n["Family_Name"] for n in nodes])
+ g.vp.primary_family = g.new_vp("string",
+ vals=[n["Primary_Family_Name"] for n in nodes])
+ g.vp.speakers = g.new_vp("double",
+ vals=[float(n.get("Num_Speakers_M", "nan"))
+ for n in nodes])
+ g.ep.cooccurrences = g.new_ep("int")
+ g.ep.phi = g.new_ep("double")
+ g.ep.t_statistic = g.new_ep("double")
+ seen = set()
+ edges = []
+ for x in d["elements"]["edges"]:
+ e = x["data"]
+ s, t = idx[e["source"]], idx[e["target"]]
+ if not directed:
+ # Twitter and Wikipedia: each connection is listed in both
+ # directions, with the same values
+ if (min(s, t), max(s, t)) in seen:
+ continue
+ seen.add((min(s, t), max(s, t)))
+ edges.append((s, t, e["Coocurrences"], e["PhiCorrelation"],
+ e["Tstatistic"]))
+ g.add_edge_list(edges, eprops=[g.ep.cooccurrences, g.ep.phi,
+ g.ep.t_statistic])
+ yield alt, g