logo Netzschleuder network catalog, repository, and centrifuge

History of metal_trade

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 by Tiago de Paula Peixoto 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/metal_trade/__init__.py b/entries/metal_trade/__init__.py
index 84a59e1..795dc0c 100644
--- a/entries/metal_trade/__init__.py
+++ b/entries/metal_trade/__init__.py
@@ -19,7 +19,7 @@
 from .. import *
 
 title = 'World trade in manufactures of metal (1994)'
-description = """The international trade in miscellaneous manufactures of metal (a class of commodities representing high technology products or heavy manufacture) among 80 countries in 1994, compiled by W. de Nooy from the United Nations' Commodity Trade Statistics. All countries with entries in the paper version of the statistics were included, but for some countries the data of 1993 (Austria, Seychelles, Bangladesh, Croatia and Barbados) or 1995 (South Africa and Ecuador) were used, since the 1994 data were not available. Non-sovereign countries were excluded (as well as most countries in central Africa, the Middle East and the former USSR, which are missing from the statistics). A directed edge points from the exporting to the importing country, and is weighted by the absolute value of the imports; imports worth less than 1% of the importing country's total imports in this class were omitted. Two pairs of countries have two edges with different values in the source. The data were distributed on the Pajek datasets page of the book *Exploratory Social Network Analysis with Pajek* (de Nooy, Mrvar and Batagelj), from which this version was obtained.[^icon]
+description = """The international trade in miscellaneous manufactures of metal (a class of commodities representing high technology products or heavy manufacture) among 80 countries in 1994, compiled by W. de Nooy from the United Nations' Commodity Trade Statistics. All countries with entries in the paper version of the statistics were included, but for some countries the data of 1993 (Austria, Seychelles, Bangladesh, Croatia and Barbados) or 1995 (South Africa and Ecuador) were used, since the 1994 data were not available. Non-sovereign countries were excluded (as well as most countries in central Africa, the Middle East and the former USSR, which are missing from the statistics). A directed edge points from the exporting to the importing country, and is weighted by the absolute value of the imports; imports worth less than 1% of the importing country's total imports in this class were omitted. Two pairs of countries have two edges with different values in the source.[^icon]
 
 The network has the following properties:
 
[entries] Add the date when each entry was added, and remove icon_hash by Tiago de Paula Peixoto 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/metal_trade/__init__.py b/entries/metal_trade/__init__.py
index d5c8f8d..84a59e1 100644
--- a/entries/metal_trade/__init__.py
+++ b/entries/metal_trade/__init__.py
@@ -35,7 +35,7 @@ tags = ['Economic', 'Trade', 'Weighted', 'Metadata']
 url = 'https://web.archive.org/web/20040706122524/http://vlado.fmf.uni-lj.si/pub/networks/data/esna/metalWT.htm'
 citation = [('W. de Nooy, A. Mrvar, V. Batagelj, "Exploratory Social Network Analysis with Pajek." Cambridge University Press (2005)', 'https://doi.org/10.1017/CBO9780511806452'),
             ('D. A. Smith, D. R. White, "Structure and Dynamics of the Global Economy: Network Analysis of International Trade 1965-1980." Social Forces 70(4), 857-893 (1992)', 'https://doi.org/10.2307/2580193')]
-icon_hash = '56a85c8e26855e083a2f7955'
+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) by Tiago de Paula Peixoto 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/metal_trade/__init__.py b/entries/metal_trade/__init__.py
index 3437346..d5c8f8d 100644
--- a/entries/metal_trade/__init__.py
+++ b/entries/metal_trade/__init__.py
@@ -23,8 +23,12 @@ description = """The international trade in miscellaneous manufactures of metal
 
 The network has the following properties:
 
-- Nodes: `name`, the name of the country; `continent` (1: Africa, 2: Asia, 3: Europe, 4: North America, 5: Oceania, 6: South America); `world_system`, the structural world system position of the country in 1994 (1: core, 2: semiperiphery, 3: periphery); `world_system_1980`, the world system position in 1980 according to Smith and White (1: core, 2: strong semiperiphery, 3: weak semiperiphery, 4: periphery, -1: unknown); `gdp_1995`, the gross domestic product per capita in 1995, in US$ (from the Statistical Yearbook of the United Nations).
-- Edges: `weight`, the value of the imports, in thousands of US$.
+- (Node) `name`: the name of the country.
+- (Node) `continent` (1: Africa, 2: Asia, 3: Europe, 4: North America, 5: Oceania, 6: South America).
+- (Node) `world_system`: the structural world system position of the country in 1994 (1: core, 2: semiperiphery, 3: periphery).
+- (Node) `world_system_1980`: the world system position in 1980 according to Smith and White (1: core, 2: strong semiperiphery, 3: weak semiperiphery, 4: periphery, -1: unknown).
+- (Node) `gdp_1995`: the gross domestic product per capita in 1995, in US$ (from the Statistical Yearbook of the United Nations).
+- (Edge) `weight`: the value of the imports, in thousands of US$.
 
 [^icon]: Description obtained in part from the [ICON](https://icon.colorado.edu) project."""
 tags = ['Economic', 'Trade', 'Weighted', 'Metadata']
[entries] New entry: metal_trade by Tiago de Paula Peixoto eee20d6
diff --git a/entries/metal_trade/__init__.py b/entries/metal_trade/__init__.py
new file mode 100644
index 0000000..3437346
--- /dev/null
+++ b/entries/metal_trade/__init__.py
@@ -0,0 +1,56 @@
+#! /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 trade in manufactures of metal (1994)'
+description = """The international trade in miscellaneous manufactures of metal (a class of commodities representing high technology products or heavy manufacture) among 80 countries in 1994, compiled by W. de Nooy from the United Nations' Commodity Trade Statistics. All countries with entries in the paper version of the statistics were included, but for some countries the data of 1993 (Austria, Seychelles, Bangladesh, Croatia and Barbados) or 1995 (South Africa and Ecuador) were used, since the 1994 data were not available. Non-sovereign countries were excluded (as well as most countries in central Africa, the Middle East and the former USSR, which are missing from the statistics). A directed edge points from the exporting to the importing country, and is weighted by the absolute value of the imports; imports worth less than 1% of the importing country's total imports in this class were omitted. Two pairs of countries have two edges with different values in the source. The data were distributed on the Pajek datasets page of the book *Exploratory Social Network Analysis with Pajek* (de Nooy, Mrvar and Batagelj), from which this version was obtained.[^icon]
+
+The network has the following properties:
+
+- Nodes: `name`, the name of the country; `continent` (1: Africa, 2: Asia, 3: Europe, 4: North America, 5: Oceania, 6: South America); `world_system`, the structural world system position of the country in 1994 (1: core, 2: semiperiphery, 3: periphery); `world_system_1980`, the world system position in 1980 according to Smith and White (1: core, 2: strong semiperiphery, 3: weak semiperiphery, 4: periphery, -1: unknown); `gdp_1995`, the gross domestic product per capita in 1995, in US$ (from the Statistical Yearbook of the United Nations).
+- Edges: `weight`, the value of the imports, in thousands of US$.
+
+[^icon]: Description obtained in part from the [ICON](https://icon.colorado.edu) project."""
+tags = ['Economic', 'Trade', 'Weighted', 'Metadata']
+url = 'https://web.archive.org/web/20040706122524/http://vlado.fmf.uni-lj.si/pub/networks/data/esna/metalWT.htm'
+citation = [('W. de Nooy, A. Mrvar, V. Batagelj, "Exploratory Social Network Analysis with Pajek." Cambridge University Press (2005)', 'https://doi.org/10.1017/CBO9780511806452'),
+            ('D. A. Smith, D. R. White, "Structure and Dynamics of the Global Economy: Network Analysis of International Trade 1965-1980." Social Forces 70(4), 857-893 (1992)', 'https://doi.org/10.2307/2580193')]
+icon_hash = '56a85c8e26855e083a2f7955'
+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/20051030094508id_/http://vlado.fmf.uni-lj.si/pub/networks/data/esna'
+files = [('world_trade.zip:world_trade.paj', 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]
+    items = load_pajek(name, 'world_trade.zip:world_trade.paj')
+    g = pajek_graph(get_pajek_item(items, "network"))
+    set_pajek_partition(g, get_pajek_item(items, "partition", "Continent"), "continent")
+    set_pajek_partition(g, get_pajek_item(items, "partition", "World_system"), "world_system")
+    set_pajek_partition(g, get_pajek_item(items, "partition", "World_system_1980"), "world_system_1980", missing=9999998, default=-1)
+    set_pajek_partition(g, get_pajek_item(items, "vector", "GDP_1995.vec"), "gdp_1995", "double")
+    yield None, g