logo Netzschleuder network catalog, repository, and centrifuge

History of german_power_grid

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_power_grid/__init__.py b/entries/german_power_grid/__init__.py
index e9c6ab9..55d2444 100644
--- a/entries/german_power_grid/__init__.py
+++ b/entries/german_power_grid/__init__.py
@@ -99,6 +99,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_power_grid/__init__.py b/entries/german_power_grid/__init__.py
index 117c603..e9c6ab9 100644
--- a/entries/german_power_grid/__init__.py
+++ b/entries/german_power_grid/__init__.py
@@ -38,7 +38,7 @@ tags = ['Technological', 'Power grid', 'Weighted', 'Spatial', 'Metadata']
 url = 'https://figshare.com/articles/dataset/Germany_grid_data_7z/4233782'
 citation = [('M. Mureddu, "Representation of the German transmission grid for Renewable Energy Sources impact analysis." arXiv:1612.05532 (2016)', 'https://arxiv.org/abs/1612.05532'),
             ('M. Mureddu, "Representation of the German transmission grid for Renewable Energy Sources impact analysis." figshare, dataset (2016)', 'https://doi.org/10.6084/m9.figshare.4233782.v2')]
-icon_hash = '595b0bd3549f067e0263b50a'
+date_added = '2026-10-25'
 upstream_license = ("Creative Commons Attribution 4.0 International (CC BY 4.0)",
                     "https://creativecommons.org/licenses/by/4.0/")
 # figshare's ndownloader refuses some automated downloads, so the files
[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/german_power_grid/__init__.py b/entries/german_power_grid/__init__.py
index f0154f2..117c603 100644
--- a/entries/german_power_grid/__init__.py
+++ b/entries/german_power_grid/__init__.py
@@ -26,8 +26,14 @@ A node is a transmission substation (bus), and an edge is a transmission line be
 
 The networks have the following properties:
 
-- Nodes: `name`, the bus code (with a prefix indicating the country, e.g. `D` or `E` for German buses, `PL` for Poland); `latitude` and `longitude`, the geographical position (the source files label these columns the other way around); `load`, the load of the bus (MW); `pv` and `wind`, the estimated photovoltaic and wind power production at the bus in the scenario (MW); `gen_power`, `gen_capacity` and `num_generators`, the total dispatched power (MW), the total maximum power (MW) and the number of the conventional generators attached to the bus; `inertia`, the estimated rotating inertia of the bus (kg m²), estimated from the nominal power of its generators, or of its load (the source files label this column as `Id`, and the bus index as `Inertia`).
-- Edges: `x`, the reactance of the line (per unit, with a base power of 400 MVA); `capacity`, the estimated capacity of the line (MW)."""
+- (Node) `name`: the bus code (with a prefix indicating the country, e.g. `D` or `E` for German buses, `PL` for Poland).
+- (Node) `latitude` and `longitude`: the geographical position (the source files label these columns the other way around).
+- (Node) `load`: the load of the bus (MW).
+- (Node) `pv` and `wind`: the estimated photovoltaic and wind power production at the bus in the scenario (MW).
+- (Node) `gen_power`, `gen_capacity` and `num_generators`: the total dispatched power (MW), the total maximum power (MW) and the number of the conventional generators attached to the bus.
+- (Node) `inertia`: the estimated rotating inertia of the bus (kg m²), estimated from the nominal power of its generators, or of its load (the source files label this column as `Id`, and the bus index as `Inertia`).
+- (Edge) `x`: the reactance of the line (per unit, with a base power of 400 MVA).
+- (Edge) `capacity`: the estimated capacity of the line (MW)."""
 tags = ['Technological', 'Power grid', 'Weighted', 'Spatial', 'Metadata']
 url = 'https://figshare.com/articles/dataset/Germany_grid_data_7z/4233782'
 citation = [('M. Mureddu, "Representation of the German transmission grid for Renewable Energy Sources impact analysis." arXiv:1612.05532 (2016)', 'https://arxiv.org/abs/1612.05532'),
[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_power_grid/__init__.py b/entries/german_power_grid/__init__.py
index 9e3c103..f0154f2 100644
--- a/entries/german_power_grid/__init__.py
+++ b/entries/german_power_grid/__init__.py
@@ -51,7 +51,6 @@ def fetch_upstream(force=False):
 @coerce_props()
 @annotate()
 def parse(alts=None):
-    global files
     name = __name__.split(".")[-1]
     for fnames, alt, fmt in files:
         if alts is not None and alt not in alts:
[entries] Move unavailable upstream sources to verified alternatives by Tiago de Paula Peixoto 2137af6
The upstream sources of these entries are gone, moved, or refuse automated
downloads; each now downloads the same data (byte-identical to the cached
files, or for board_directors, identical apart from line endings) from:

- add_health: the Wayback Machine (Moreno's site, as its sibling entries)
- board_directors: T. Opsahl's site (opsahl.co.uk)
- copenhagen, cow_signed_relations, fullerene_structures,
  german_power_grid: figshare's API (its downloader refuses the server)
- drosophila_flybi: the same address, without a doubled slash
- dutch_criticism: V. Batagelj's repository of Pajek data on GitHub
- fly_larva: the copy of the supplementary files in Europe PMC
- foursquare: the authors' Google Drive file
- game_thrones, microsoft_concept, un_migrations: pinned Wayback Machine
  snapshots
- internet_top_pop: the Topology Zoo repository on GitHub
- scotus_majority: Harvard Dataverse and Wayback Machine snapshots
diff --git a/entries/german_power_grid/__init__.py b/entries/german_power_grid/__init__.py
index eb7603c..9e3c103 100644
--- a/entries/german_power_grid/__init__.py
+++ b/entries/german_power_grid/__init__.py
@@ -35,7 +35,9 @@ citation = [('M. Mureddu, "Representation of the German transmission grid for Re
 icon_hash = '595b0bd3549f067e0263b50a'
 upstream_license = ("Creative Commons Attribution 4.0 International (CC BY 4.0)",
                     "https://creativecommons.org/licenses/by/4.0/")
-upstream_prefix = 'https://ndownloader.figshare.com/files'
+# figshare's ndownloader refuses some automated downloads, so the files
+# are downloaded through figshare's API (the same files, by id)
+upstream_prefix = 'https://api.figshare.com/v2/file/download'
 # Germany_grid_data.7z: the nodes, branches and generators of each resolution
 files = [(tuple(f"6904736:7z:Germany_grid_data/0.{p // 10}/{t}.csv"
                 for t in ["nodes", "branches", "generators"]), f'res{p}', None)
[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_power_grid/__init__.py b/entries/german_power_grid/__init__.py
index 6afe72a..eb7603c 100644
--- a/entries/german_power_grid/__init__.py
+++ b/entries/german_power_grid/__init__.py
@@ -89,3 +89,9 @@ def parse(alts=None):
                           float(r["X"]), float(r["Pmax"])) for r in branches],
                         eprops=[g.ep.x, g.ep.capacity])
         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_power_grid by Tiago de Paula Peixoto a4faf05
diff --git a/entries/german_power_grid/__init__.py b/entries/german_power_grid/__init__.py
new file mode 100644
index 0000000..6afe72a
--- /dev/null
+++ b/entries/german_power_grid/__init__.py
@@ -0,0 +1,91 @@
+#! /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 = "German high-voltage transmission grid (2014)"
+description = """Networks of the German 380 kV electrical transmission grid, compiled by M. Mureddu for the analysis of the impact of renewable energy sources (RES). The topology and parameters of the grid were extracted from a validated power flow model of the continental European transmission network (the former UCTE), keeping all German 380 kV buses and the lines among them, together with the foreign border nodes with the largest exchanges (with Denmark, the Netherlands, Luxembourg, France, Switzerland, Austria, the Czech Republic and Poland), which are modeled as constant loads (positive for outflows, negative for inflows). The installed photovoltaic and wind generation in Germany at the end of 2014 (from the EnergyMap census of RES generators) was assigned to the geographically nearest bus (via a Voronoi tessellation), and scaled to scenarios in which RES supply 20%, 30%, 40%, 50% or 60% of the total load, using the 2014 load. For each scenario, the dispatch of the 82 conventional generators was obtained with a DC optimal power flow.
+
+A node is a transmission substation (bus), and an edge is a transmission line between two buses. The five networks share the same topology, and differ in the RES generation and conventional dispatch: `res20`, `res30`, `res40`, `res50` and `res60` correspond to the RES shares of 20% to 60%. There are two pairs of parallel lines.
+
+The networks have the following properties:
+
+- Nodes: `name`, the bus code (with a prefix indicating the country, e.g. `D` or `E` for German buses, `PL` for Poland); `latitude` and `longitude`, the geographical position (the source files label these columns the other way around); `load`, the load of the bus (MW); `pv` and `wind`, the estimated photovoltaic and wind power production at the bus in the scenario (MW); `gen_power`, `gen_capacity` and `num_generators`, the total dispatched power (MW), the total maximum power (MW) and the number of the conventional generators attached to the bus; `inertia`, the estimated rotating inertia of the bus (kg m²), estimated from the nominal power of its generators, or of its load (the source files label this column as `Id`, and the bus index as `Inertia`).
+- Edges: `x`, the reactance of the line (per unit, with a base power of 400 MVA); `capacity`, the estimated capacity of the line (MW)."""
+tags = ['Technological', 'Power grid', 'Weighted', 'Spatial', 'Metadata']
+url = 'https://figshare.com/articles/dataset/Germany_grid_data_7z/4233782'
+citation = [('M. Mureddu, "Representation of the German transmission grid for Renewable Energy Sources impact analysis." arXiv:1612.05532 (2016)', 'https://arxiv.org/abs/1612.05532'),
+            ('M. Mureddu, "Representation of the German transmission grid for Renewable Energy Sources impact analysis." figshare, dataset (2016)', 'https://doi.org/10.6084/m9.figshare.4233782.v2')]
+icon_hash = '595b0bd3549f067e0263b50a'
+upstream_license = ("Creative Commons Attribution 4.0 International (CC BY 4.0)",
+                    "https://creativecommons.org/licenses/by/4.0/")
+upstream_prefix = 'https://ndownloader.figshare.com/files'
+# Germany_grid_data.7z: the nodes, branches and generators of each resolution
+files = [(tuple(f"6904736:7z:Germany_grid_data/0.{p // 10}/{t}.csv"
+                for t in ["nodes", "branches", "generators"]), f'res{p}', None)
+         for p in [20, 30, 40, 50, 60]]
+
+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 fnames, alt, fmt in files:
+        if alts is not None and alt not in alts:
+            continue
+        with ExitStack() as stack:
+            fn, fb, fg = [stack.enter_context(open_upstream_file(name, x, "r"))
+                          for x in fnames]
+            nodes = list(csv.DictReader(fn, delimiter="\t"))
+            branches = list(csv.DictReader(fb, delimiter="\t"))
+            gens = list(csv.DictReader(fg, delimiter="\t"))
+        idx = {r["Name"]: i for i, r in enumerate(nodes)}
+        g = Graph(directed=False)
+        g.add_vertex(len(nodes))
+        g.vp.name = g.new_vp("string", vals=[r["Name"] for r in nodes])
+        # The latitude and longitude columns are swapped in the source
+        g.vp.latitude = g.new_vp("double", vals=[float(r["Lon"]) for r in nodes])
+        g.vp.longitude = g.new_vp("double", vals=[float(r["Lat"]) for r in nodes])
+        for k in ["load", "pv", "wind"]:
+            col = {"load": "Load", "pv": "PV", "wind": "Wind"}[k]
+            g.vp[k] = g.new_vp("double", vals=[float(r[col]) for r in nodes])
+        gen_power = numpy.zeros(len(nodes))
+        gen_capacity = numpy.zeros(len(nodes))
+        num_generators = numpy.zeros(len(nodes), dtype="int")
+        for r in gens:
+            i = idx[r["Node"]]
+            gen_power[i] += float(r["P"])
+            gen_capacity[i] += float(r["Pmax"])
+            num_generators[i] += 1
+        g.vp.gen_power = g.new_vp("double", vals=gen_power)
+        g.vp.gen_capacity = g.new_vp("double", vals=gen_capacity)
+        g.vp.num_generators = g.new_vp("int", vals=num_generators)
+        # The inertia is in the column labeled "Id"
+        g.vp.inertia = g.new_vp("double", vals=[float(r["Id"]) for r in nodes])
+        g.ep.x = g.new_ep("double")
+        g.ep.capacity = g.new_ep("double")
+        g.add_edge_list([(idx[r["From_node"]], idx[r["To_node"]],
+                          float(r["X"]), float(r["Pmax"])) for r in branches],
+                        eprops=[g.ep.x, g.ep.capacity])
+        yield alt, g