logo Netzschleuder network catalog, repository, and centrifuge

History of scigrid_gas

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 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/scigrid_gas/__init__.py b/entries/scigrid_gas/__init__.py
index edcca86..1b7637f 100644
--- a/entries/scigrid_gas/__init__.py
+++ b/entries/scigrid_gas/__init__.py
@@ -49,7 +49,7 @@ citation = [('J. Diettrich, A. Pluta, W. Medjroubi, "SciGRID_gas IGGIELGN." Zeno
             ('A. Pluta, W. Medjroubi, J. C. Diettrich, J. Dasenbrock, H.-P. Tetens, J. E. Sandoval, O. Lunsdorf, "SciGRID_gas - Data Model of the European Gas Transport Network." 2022 Open Source Modelling and Simulation of Energy Systems (OSMSES), 1-7 (2022)', 'https://doi.org/10.1109/OSMSES54027.2022.9769122')]
 upstream_license = ("Creative Commons Attribution 4.0 International (CC BY 4.0)",
                     "https://creativecommons.org/licenses/by/4.0/")
-icon_hash = None
+date_added = '2026-10-27'
 # The Zenodo records of the versions of the data set
 versions = [("4642569", "1.0.0"), ("4751038", "1.1.1"), ("4767098", "1.1.2")]
 facilities = [("Compressors", "num_compressors"), ("LNGs", "num_lngs"),
[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/scigrid_gas/__init__.py b/entries/scigrid_gas/__init__.py
index e41025e..edcca86 100644
--- a/entries/scigrid_gas/__init__.py
+++ b/entries/scigrid_gas/__init__.py
@@ -29,8 +29,20 @@ There is one network for each of the three versions of the data set (`v1.0.0`, `
 
 The networks have the following properties:
 
-- Nodes: `name`, the node's id; `label`, its name in the data (if any); `latitude` and `longitude`, the geographical position; `country`, the two-letter country code (`XX` for nodes offshore or outside Europe); `nuts_id`, the NUTS 3 region (versions 1.1.1 and 1.1.2); `num_compressors`, `num_lngs`, `num_storages`, `num_productions`, `num_consumers` and `num_border_points`, the numbers of facilities of each kind at the node.
-- Edges: `name`, the segment's id (its prefix indicates the source of the data); `source_id`, the id of the original pipeline in the source data; `countries`, the country codes of the two ends, separated by a semicolon; `diameter` (mm), `length` (km), `max_capacity` (millions of cubic meters per day) and `max_pressure` (bar), the pipe's diameter, length, maximum capacity and maximum pressure; `is_h_gas`, whether it transports high-calorific gas; `bidirectional`, whether the gas can flow in both directions; `start_year` and `end_year`, the years of commissioning and decommissioning (if known); `water_depth`, the water depth of offshore pipes (m, version 1.0.0). Missing values are NaN."""
+- (Node) `name`: the node's id.
+- (Node) `label`: its name in the data (if any).
+- (Node) `latitude` and `longitude`: the geographical position.
+- (Node) `country`: the two-letter country code (`XX` for nodes offshore or outside Europe).
+- (Node) `nuts_id`: the NUTS 3 region (versions 1.1.1 and 1.1.2).
+- (Node) `num_compressors`, `num_lngs`, `num_storages`, `num_productions`, `num_consumers` and `num_border_points`: the numbers of facilities of each kind at the node.
+- (Edge) `name`: the segment's id (its prefix indicates the source of the data).
+- (Edge) `source_id`: the id of the original pipeline in the source data.
+- (Edge) `countries`: the country codes of the two ends, separated by a semicolon.
+- (Edge) `diameter` (mm): `length` (km), `max_capacity` (millions of cubic meters per day) and `max_pressure` (bar), the pipe's diameter, length, maximum capacity and maximum pressure.
+- (Edge) `is_h_gas`: whether it transports high-calorific gas.
+- (Edge) `bidirectional`: whether the gas can flow in both directions.
+- (Edge) `start_year` and `end_year`: the years of commissioning and decommissioning (if known).
+- (Edge) `water_depth`: the water depth of offshore pipes (m, version 1.0.0). Missing values are NaN."""
 tags = ['Technological', 'Spatial', 'Weighted', 'Multigraph', 'Metadata']
 url = 'https://zenodo.org/records/4767098'
 citation = [('J. Diettrich, A. Pluta, W. Medjroubi, "SciGRID_gas IGGIELGN." Zenodo, versions 1.0.0, 1.1.1 and 1.1.2 (2021)', 'https://doi.org/10.5281/zenodo.4642568'),
[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/scigrid_gas/__init__.py b/entries/scigrid_gas/__init__.py
index b740c41..e41025e 100644
--- a/entries/scigrid_gas/__init__.py
+++ b/entries/scigrid_gas/__init__.py
@@ -72,7 +72,6 @@ pipe_params = [("diameter", "diameter_mm"), ("length", "length_km"),
 @coerce_props()
 @annotate()
 def parse(alts=None):
-    global files
     name = __name__.split(".")[-1]
     csv.field_size_limit(1 << 30)
     for fnames, alt, fmt in files:
[entries] New entry: scigrid_gas by Tiago de Paula Peixoto a3252d3
diff --git a/entries/scigrid_gas/__init__.py b/entries/scigrid_gas/__init__.py
new file mode 100644
index 0000000..b740c41
--- /dev/null
+++ b/entries/scigrid_gas/__init__.py
@@ -0,0 +1,123 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 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/>.
+
+import ast
+
+from .. import *
+
+title = "European gas transmission network (SciGRID_gas IGGIELGN, 2021)"
+description = """Networks of the European natural gas transmission system, compiled by J. Diettrich, A. Pluta and W. Medjroubi (DLR Institute of Networked Energy Systems) in the SciGRID_gas project. The IGGIELGN data set combines several public sources: the InternetDaten (INET) data set, collected from web pages, press releases and other public documents, the data sets of Gas Infrastructure Europe (GIE), Gas Storage Europe (GSE) and the International Gas Union (IGU), the network of the LKD project, the ENTSOG transmission capacity map, and data sets for Great Britain and Norway; missing attributes (e.g. diameters, capacities and pressures of pipes) were estimated by heuristics and statistical methods.
+
+A node is a point of the network (the end of a pipe segment, or a facility), and an edge is a pipeline segment between two nodes, positioned along the pipeline's route. The networks are undirected (the direction of the segments in the data is not kept); some pairs of nodes are joined by several segments (parallel pipelines), and some segments start and end at the same node (self-loops). The facilities (compressor stations, LNG terminals, storages, production sites, consumers and border points) are attached to nodes, and are included as counts at each node; their attributes (capacities, operators, ...) are not included, and neither are the courses of the pipes (as polylines) and the uncertainties and estimation methods of the attributes.
+
+There is one network for each of the three versions of the data set (`v1.0.0`, `v1.1.1` and `v1.1.2`, published from March to May 2021). The network of version 1.0.0 is connected and has 4 self-loops; those of versions 1.1.1 and 1.1.2 have 24 components and 106 and 128 self-loops, respectively. In version 1.1.1, the country codes of all pipe segments are `FI` (apparently an error, corrected in version 1.1.2).
+
+The networks have the following properties:
+
+- Nodes: `name`, the node's id; `label`, its name in the data (if any); `latitude` and `longitude`, the geographical position; `country`, the two-letter country code (`XX` for nodes offshore or outside Europe); `nuts_id`, the NUTS 3 region (versions 1.1.1 and 1.1.2); `num_compressors`, `num_lngs`, `num_storages`, `num_productions`, `num_consumers` and `num_border_points`, the numbers of facilities of each kind at the node.
+- Edges: `name`, the segment's id (its prefix indicates the source of the data); `source_id`, the id of the original pipeline in the source data; `countries`, the country codes of the two ends, separated by a semicolon; `diameter` (mm), `length` (km), `max_capacity` (millions of cubic meters per day) and `max_pressure` (bar), the pipe's diameter, length, maximum capacity and maximum pressure; `is_h_gas`, whether it transports high-calorific gas; `bidirectional`, whether the gas can flow in both directions; `start_year` and `end_year`, the years of commissioning and decommissioning (if known); `water_depth`, the water depth of offshore pipes (m, version 1.0.0). Missing values are NaN."""
+tags = ['Technological', 'Spatial', 'Weighted', 'Multigraph', 'Metadata']
+url = 'https://zenodo.org/records/4767098'
+citation = [('J. Diettrich, A. Pluta, W. Medjroubi, "SciGRID_gas IGGIELGN." Zenodo, versions 1.0.0, 1.1.1 and 1.1.2 (2021)', 'https://doi.org/10.5281/zenodo.4642568'),
+            ('A. Pluta, W. Medjroubi, J. C. Diettrich, J. Dasenbrock, H.-P. Tetens, J. E. Sandoval, O. Lunsdorf, "SciGRID_gas - Data Model of the European Gas Transport Network." 2022 Open Source Modelling and Simulation of Energy Systems (OSMSES), 1-7 (2022)', 'https://doi.org/10.1109/OSMSES54027.2022.9769122')]
+upstream_license = ("Creative Commons Attribution 4.0 International (CC BY 4.0)",
+                    "https://creativecommons.org/licenses/by/4.0/")
+icon_hash = None
+# The Zenodo records of the versions of the data set
+versions = [("4642569", "1.0.0"), ("4751038", "1.1.1"), ("4767098", "1.1.2")]
+facilities = [("Compressors", "num_compressors"), ("LNGs", "num_lngs"),
+              ("Storages", "num_storages"), ("Productions", "num_productions"),
+              ("Consumers", "num_consumers"),
+              ("BorderPoints", "num_border_points")]
+upstream_prefix = 'https://zenodo.org/records'
+files = [(tuple(f"{rec}/files/IGGIELGN.zip:data/IGGIELGN_{t}.csv"
+                for t in ["Nodes", "PipeSegments"] + [f for f, k in facilities]),
+          f"v{v}", None) for rec, v in versions]
+
+def fetch_upstream(force=False):
+    return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
+                                force)
+
+def read_table(name, fname):
+    with open_upstream_file(name, fname, "r") as f:
+        return list(csv.DictReader(f, delimiter=";"))
+
+def num(x):
+    return numpy.nan if x is None else float(x)
+
+# Pipe parameters: (property name, column in the param dictionary)
+pipe_params = [("diameter", "diameter_mm"), ("length", "length_km"),
+               ("max_capacity", "max_cap_M_m3_per_d"),
+               ("max_pressure", "max_pressure_bar"), ("is_h_gas", "is_H_gas"),
+               ("bidirectional", "is_bothDirection"),
+               ("start_year", "start_year"), ("end_year", "end_year"),
+               ("water_depth", "waterDepth_m")]
+
+@cache_network()
+@coerce_props()
+@annotate()
+def parse(alts=None):
+    global files
+    name = __name__.split(".")[-1]
+    csv.field_size_limit(1 << 30)
+    for fnames, alt, fmt in files:
+        if alts is not None and alt not in alts:
+            continue
+        nodes, pipes, *facs = [read_table(name, fname) for fname in fnames]
+        idx = {r["id"]: 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["id"] for r in nodes])
+        g.vp.label = g.new_vp("string", vals=[r["name"] if r["name"] != "None"
+                                              else "" for r in nodes])
+        g.vp.latitude = g.new_vp("double", vals=[float(r["lat"]) for r in nodes])
+        g.vp.longitude = g.new_vp("double", vals=[float(r["long"]) for r in nodes])
+        g.vp.country = g.new_vp("string", vals=[r["country_code"] for r in nodes])
+        params = [ast.literal_eval(r["param"]) for r in nodes]
+        if "nuts_id_3" in params[0]:
+            g.vp.nuts_id = g.new_vp("string", vals=[p["nuts_id_3"] or ""
+                                                    for p in params])
+        for (_, k), rows in zip(facilities, facs):
+            count = numpy.zeros(len(nodes), dtype="int")
+            for r in rows:
+                for v in ast.literal_eval(r["node_id"]):
+                    count[idx[v]] += 1
+            g.vp[k] = g.new_vp("int", vals=count)
+
+        edges = []
+        for r in pipes:
+            u, v = ast.literal_eval(r["node_id"])
+            edges.append((idx[u], idx[v]))
+        g.add_edge_list(edges)
+        g.ep.name = g.new_ep("string", vals=[r["id"] for r in pipes])
+        g.ep.source_id = g.new_ep("string", vals=[";".join(ast.literal_eval(r["source_id"]))
+                                                  for r in pipes])
+        g.ep.countries = g.new_ep("string", vals=[";".join(ast.literal_eval(r["country_code"]))
+                                                  for r in pipes])
+        params = [ast.literal_eval(r["param"]) for r in pipes]
+        for k, col in pipe_params:
+            if col not in params[0]:
+                continue
+            g.ep[k] = g.new_ep("double", vals=[num(p[col]) for p in params])
+        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)