logo Netzschleuder network catalog, repository, and centrifuge

History of german_autobahn

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] Lay out the spatial networks with hfd_layout() instead of cfd_layout() by Tiago de Paula Peixoto cc3bcb0
Changed: none
diff --git a/entries/german_autobahn/__init__.py b/entries/german_autobahn/__init__.py
index 0d7651d..016a283 100644
--- a/entries/german_autobahn/__init__.py
+++ b/entries/german_autobahn/__init__.py
@@ -55,6 +55,6 @@ def parse(alts=None):
 
 
 def get_pos(g, sbm_fit):
-    # Spatial network: laid out with the default parameters of cfd_layout(),
+    # Spatial network: laid out with the default parameters of hfd_layout(),
     # without the partition of the SBM fit
-    return cfd_layout(g)
+    return hfd_layout(g)
[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/german_autobahn/__init__.py b/entries/german_autobahn/__init__.py
index f2c2d62..0d7651d 100644
--- a/entries/german_autobahn/__init__.py
+++ b/entries/german_autobahn/__init__.py
@@ -29,7 +29,7 @@ The nodes have the property `name`, the name of the location, as given in the so
 tags = ['Transportation', 'Roads', 'Unweighted', 'Spatial']
 url = 'https://web.archive.org/web/20160203050435/http://www.dynamic-connectome.org/?page_id=25'
 citation = [('M. Kaiser, C. C. Hilgetag, "Spatial growth of real-world networks." Physical Review E 69, 036103 (2004)', 'https://doi.org/10.1103/PhysRevE.69.036103')]
-icon_hash = '56a85c8e26855e083a2f791e'
+date_added = '2026-10-25'
 upstream_license = None
 upstream_prefix = 'https://www.dynamic-connectome.org/download'
 files = [('autobahn.zip:autobahn.mat', None, None)]
[entries] Remove unneeded code from the entries by Tiago de Paula Peixoto 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/german_autobahn/__init__.py b/entries/german_autobahn/__init__.py
index b6992f0..f2c2d62 100644
--- a/entries/german_autobahn/__init__.py
+++ b/entries/german_autobahn/__init__.py
@@ -42,7 +42,6 @@ def fetch_upstream(force=False):
 @coerce_props()
 @annotate()
 def parse(alts=None):
-    global files
     name = __name__.split(".")[-1]
     for fname, alt, fmt in files:
         if alts is not None and alt not in alts:
[entries] Lay out spatial networks with cfd_layout() without the SBM partition by Tiago de Paula Peixoto 9db8d77
Road, power grid, public transport, water and river networks and physical
meshes override get_pos() with the default parameters of cfd_layout(),
without grouping by the partition of the SBM fit.
diff --git a/entries/german_autobahn/__init__.py b/entries/german_autobahn/__init__.py
index 1f591ff..b6992f0 100644
--- a/entries/german_autobahn/__init__.py
+++ b/entries/german_autobahn/__init__.py
@@ -53,3 +53,9 @@ def parse(alts=None):
         labels = [str(x[0][0]) for x in m["auto1168labels"]]
         g = adjacency_graph(A, directed=False, labels=labels)
         yield alt, g
+
+
+def get_pos(g, sbm_fit):
+    # Spatial network: laid out with the default parameters of cfd_layout(),
+    # without the partition of the SBM fit
+    return cfd_layout(g)
[entries] New entry: german_autobahn by Tiago de Paula Peixoto 5bcc054
diff --git a/entries/german_autobahn/__init__.py b/entries/german_autobahn/__init__.py
new file mode 100644
index 0000000..1f591ff
--- /dev/null
+++ b/entries/german_autobahn/__init__.py
@@ -0,0 +1,55 @@
+#! /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 *
+from scipy.io import loadmat
+
+title = "German highway system (2002)"
+description = """Network of the German highway (Autobahn) system, from M. Kaiser and C. C. Hilgetag. Nodes are 1,168 locations along the highways (named after towns or places, e.g. at exits and junctions), and an undirected edge connects two locations that are directly connected by a highway, without other locations in between. The network was derived from the Autobahn-Informations-System (AIS) of the German Federal Highway Research Institute (BASt) in 2002, and was used to compare the spatial growth of transportation and neural networks.
+
+The nodes have the property `name`, the name of the location, as given in the source (characters outside ASCII, such as umlauts, appear as "?").[^icon]
+
+[^icon]: Description obtained in part from the [ICON](https://icon.colorado.edu) project."""
+tags = ['Transportation', 'Roads', 'Unweighted', 'Spatial']
+url = 'https://web.archive.org/web/20160203050435/http://www.dynamic-connectome.org/?page_id=25'
+citation = [('M. Kaiser, C. C. Hilgetag, "Spatial growth of real-world networks." Physical Review E 69, 036103 (2004)', 'https://doi.org/10.1103/PhysRevE.69.036103')]
+icon_hash = '56a85c8e26855e083a2f791e'
+upstream_license = None
+upstream_prefix = 'https://www.dynamic-connectome.org/download'
+files = [('autobahn.zip:autobahn.mat', 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):
+    global files
+    name = __name__.split(".")[-1]
+    for fname, alt, fmt in files:
+        if alts is not None and alt not in alts:
+            continue
+        with open_upstream_file(name, fname, "rb", seekable=True) as f:
+            m = loadmat(f)
+        A = numpy.asarray(m["auto1168"], dtype="int")
+        labels = [str(x[0][0]) for x in m["auto1168labels"]]
+        g = adjacency_graph(A, directed=False, labels=labels)
+        yield alt, g