History of world_cities
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] Remove superfluous details of the upstream distribution from the descriptions dc07aa0
The descriptions mentioned incidental details of how the upstream data are made available: the file formats (CSV, JSON, XML, GEXF, SBML, HIF, Pajek, UCINET, ...), file names, where the files were published or obtained from (Zenodo, figshare, Kaggle, the Pajek datasets page, the Internet Archive), and that some networks are only available in the gt format. These are left out; caveats about the data themselves are kept, referring to "the data" instead of "the file". The description of sp_baboons now lists its properties instead of the upstream columns, and says that events without a recipient are left out.
diff --git a/entries/world_cities/__init__.py b/entries/world_cities/__init__.py
index c3d8033..65f94e7 100644
--- a/entries/world_cities/__init__.py
+++ b/entries/world_cities/__init__.py
@@ -19,7 +19,7 @@
from .. import *
title = 'World city network of global service firms (2000)'
-description = """A bipartite network of 100 global advanced producer service firms and the 315 cities in which they have offices, from the GaWC (Globalization and World Cities) research network, data set 11, produced by P. J. Taylor and G. Catalano and used as the empirical basis for measuring the world city network. The data were collected in 2000. All firms supply advanced producer services (accountancy, advertising, banking/finance, insurance, law and management consultancy) through offices in at least 15 cities, including at least one in each of Pacific Asia, western Europe and northern America. An edge connects a firm to a city in which it has an office, weighted by the service value, which indicates the importance of the city in the office network of the firm, on a scale from 1 to 5 (cities without an office of the firm, with value 0, have no edge). The data were converted into Pajek format by V. Batagelj (2006). The data were distributed in Pajek format on the Pajek datasets page of V. Batagelj and A. Mrvar, from which this version was obtained.
+description = """A bipartite network of 100 global advanced producer service firms and the 315 cities in which they have offices, from the GaWC (Globalization and World Cities) research network, data set 11, produced by P. J. Taylor and G. Catalano and used as the empirical basis for measuring the world city network. The data were collected in 2000. All firms supply advanced producer services (accountancy, advertising, banking/finance, insurance, law and management consultancy) through offices in at least 15 cities, including at least one in each of Pacific Asia, western Europe and northern America. An edge connects a firm to a city in which it has an office, weighted by the service value, which indicates the importance of the city in the office network of the firm, on a scale from 1 to 5 (cities without an office of the firm, with value 0, have no edge).
The network has the following properties:
[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/world_cities/__init__.py b/entries/world_cities/__init__.py
index 693c411..c3d8033 100644
--- a/entries/world_cities/__init__.py
+++ b/entries/world_cities/__init__.py
@@ -31,7 +31,7 @@ tags = ['Economic', 'Commerce', 'Weighted', 'Spatial', 'Metadata']
url = 'https://web.archive.org/web/20090301185253/http://vlado.fmf.uni-lj.si/pub/networks/data/mix/mixed.htm'
citation = [('P. J. Taylor, "World City Network: A Global Urban Analysis." Routledge, London (2004)', 'https://doi.org/10.4324/9780203634059'),
('P. J. Taylor, G. Catalano, D. R. F. Walker, "Measurement of the World City Network." Urban Studies 39(13), 2367-2376 (2002)', 'https://doi.org/10.1080/00420980220080011')]
-icon_hash = '59233ac262da63251188ee8a'
+date_added = '2026-10-25'
upstream_license = None
# The Pajek data site (vlado.fmf.uni-lj.si) is no longer reachable, so the
# files are obtained from the Internet Archive.
[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/world_cities/__init__.py b/entries/world_cities/__init__.py
index c13af5f..693c411 100644
--- a/entries/world_cities/__init__.py
+++ b/entries/world_cities/__init__.py
@@ -23,8 +23,10 @@ description = """A bipartite network of 100 global advanced producer service fir
The network has the following properties:
-- Nodes: `name`, the name of the city or firm; `is_city`, whether the node is a city (otherwise a firm); `sector`, the sector of the firm (0 for cities, 1: accountancy, 2: advertising, 3: banking/finance, 4: insurance, 5: law, 6: management consultancy).
-- Edges: `weight`, the service value of the city for the firm (1 to 5)."""
+- (Node) `name`: the name of the city or firm.
+- (Node) `is_city`: whether the node is a city (otherwise a firm).
+- (Node) `sector`: the sector of the firm (0 for cities, 1: accountancy, 2: advertising, 3: banking/finance, 4: insurance, 5: law, 6: management consultancy).
+- (Edge) `weight`: the service value of the city for the firm (1 to 5)."""
tags = ['Economic', 'Commerce', 'Weighted', 'Spatial', 'Metadata']
url = 'https://web.archive.org/web/20090301185253/http://vlado.fmf.uni-lj.si/pub/networks/data/mix/mixed.htm'
citation = [('P. J. Taylor, "World City Network: A Global Urban Analysis." Routledge, London (2004)', 'https://doi.org/10.4324/9780203634059'),
[entries] List the files of each network together, instead of as separate networks 3c5e521
wolfe_primates listed its attribute file as an unnamed network of its own, and eva_ownership, kansas_sar, political_actors, world_cities and yeast_pin listed their single network once per file, so that they appeared with networks that do not exist.
diff --git a/entries/world_cities/__init__.py b/entries/world_cities/__init__.py
index 51bfeff..c13af5f 100644
--- a/entries/world_cities/__init__.py
+++ b/entries/world_cities/__init__.py
@@ -34,8 +34,7 @@ upstream_license = None
# The Pajek data site (vlado.fmf.uni-lj.si) is no longer reachable, so the
# files are obtained from the Internet Archive.
upstream_prefix = 'https://web.archive.org/web/20130507132709id_/http://vlado.fmf.uni-lj.si/pub/networks/data/2mode'
-files = [('WorldCities.zip:WorldCities.net', None, None),
- ('WorldCities.zip:WorldCities.clu', None, None)]
+files = [(('WorldCities.zip:WorldCities.net', 'WorldCities.zip:WorldCities.clu'), None, None)]
def fetch_upstream(force=False):
return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
[entries] New entry: world_cities 1619292
diff --git a/entries/world_cities/__init__.py b/entries/world_cities/__init__.py
new file mode 100644
index 0000000..51bfeff
--- /dev/null
+++ b/entries/world_cities/__init__.py
@@ -0,0 +1,54 @@
+#! /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 *
+
+title = 'World city network of global service firms (2000)'
+description = """A bipartite network of 100 global advanced producer service firms and the 315 cities in which they have offices, from the GaWC (Globalization and World Cities) research network, data set 11, produced by P. J. Taylor and G. Catalano and used as the empirical basis for measuring the world city network. The data were collected in 2000. All firms supply advanced producer services (accountancy, advertising, banking/finance, insurance, law and management consultancy) through offices in at least 15 cities, including at least one in each of Pacific Asia, western Europe and northern America. An edge connects a firm to a city in which it has an office, weighted by the service value, which indicates the importance of the city in the office network of the firm, on a scale from 1 to 5 (cities without an office of the firm, with value 0, have no edge). The data were converted into Pajek format by V. Batagelj (2006). The data were distributed in Pajek format on the Pajek datasets page of V. Batagelj and A. Mrvar, from which this version was obtained.
+
+The network has the following properties:
+
+- Nodes: `name`, the name of the city or firm; `is_city`, whether the node is a city (otherwise a firm); `sector`, the sector of the firm (0 for cities, 1: accountancy, 2: advertising, 3: banking/finance, 4: insurance, 5: law, 6: management consultancy).
+- Edges: `weight`, the service value of the city for the firm (1 to 5)."""
+tags = ['Economic', 'Commerce', 'Weighted', 'Spatial', 'Metadata']
+url = 'https://web.archive.org/web/20090301185253/http://vlado.fmf.uni-lj.si/pub/networks/data/mix/mixed.htm'
+citation = [('P. J. Taylor, "World City Network: A Global Urban Analysis." Routledge, London (2004)', 'https://doi.org/10.4324/9780203634059'),
+ ('P. J. Taylor, G. Catalano, D. R. F. Walker, "Measurement of the World City Network." Urban Studies 39(13), 2367-2376 (2002)', 'https://doi.org/10.1080/00420980220080011')]
+icon_hash = '59233ac262da63251188ee8a'
+upstream_license = None
+# The Pajek data site (vlado.fmf.uni-lj.si) is no longer reachable, so the
+# files are obtained from the Internet Archive.
+upstream_prefix = 'https://web.archive.org/web/20130507132709id_/http://vlado.fmf.uni-lj.si/pub/networks/data/2mode'
+files = [('WorldCities.zip:WorldCities.net', None, None),
+ ('WorldCities.zip:WorldCities.clu', None, None)]
+
+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):
+ name = __name__.split(".")[-1]
+ g = pajek_graph(get_pajek_item(load_pajek(name, "WorldCities.zip:WorldCities.net"), "network"),
+ two_mode="is_city")
+ with open_upstream_file(name, "WorldCities.zip:WorldCities.clu", "rb") as f:
+ clu = read_pajek(b"*Partition sector\n" + f.read())
+ set_pajek_partition(g, get_pajek_item(clu, "partition"), "sector")
+ yield None, g