logo Netzschleuder network catalog, repository, and centrifuge

History of flensburg_fjord

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/flensburg_fjord/__init__.py b/entries/flensburg_fjord/__init__.py
index 60c43a2..d6822eb 100644
--- a/entries/flensburg_fjord/__init__.py
+++ b/entries/flensburg_fjord/__init__.py
@@ -43,7 +43,7 @@ Edge properties:
 tags = ['Biological', 'Food web', 'Unweighted', 'Metadata']
 url = 'https://esapubs.org/archive/ecol/E092/174/default.htm'
 citation = [('C. D. Zander, N. Josten, K. C. Detloff, R. Poulin, J. P. McLaughlin, D. W. Thieltges, "Food web including metazoan parasites for a brackish shallow water ecosystem in Germany and Denmark." Ecology 92(10), 2007 (2011)', 'https://doi.org/10.1890/11-0374.1')]
-icon_hash = '56a85c8e26855e083a2f7941'
+date_added = '2026-10-25'
 upstream_license = None
 upstream_prefix = 'https://esapubs.org/archive/ecol/E092/174'
 files = [(('All_Flensburg_Data_Files.zip:All_Flensburg_Data_Files/Flensburg_Data_Nodes.csv',
[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/flensburg_fjord/__init__.py b/entries/flensburg_fjord/__init__.py
index b348ec3..60c43a2 100644
--- a/entries/flensburg_fjord/__init__.py
+++ b/entries/flensburg_fjord/__init__.py
@@ -72,7 +72,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] New entry: flensburg_fjord by Tiago de Paula Peixoto 38c085d
diff --git a/entries/flensburg_fjord/__init__.py b/entries/flensburg_fjord/__init__.py
new file mode 100644
index 0000000..b348ec3
--- /dev/null
+++ b/entries/flensburg_fjord/__init__.py
@@ -0,0 +1,116 @@
+#! /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/>.
+
+import csv
+from .. import *
+
+title = "Flensburg Fjord food web with parasites (2011)"
+description = """A food web of the Flensburg Fjord, a brackish, shallow water inlet of the Baltic Sea between Germany and Denmark, which includes metazoan parasites and other infectious agents. The data on the free-living assemblages and on parasitism were gathered in field sampling, and supplemented with published sources and local expert knowledge. Nodes are the life cycle stages of species (or of coarser taxonomic or functional groups, such as phytoplankton, macroalgae, meiofauna, or some groups of birds, which are lumped into single nodes); each life cycle stage of a parasite with a complex life cycle (e.g. the cercariae, metacercariae, parthenitae and adults of trematodes) is a separate node. There are 180 nodes, corresponding to 123 species or assemblages. A directed edge goes from a consumer to a resource (prey or host). Besides predation, edges include parasitic interactions (macroparasitism, parasitic castration, pathogen infection, trophically transmitted parasitism), the consumption of the parasites of a prey by its predator (concomitant predation on symbionts), the trophic transmission of parasites to their next hosts, and predation among parasites within the same host. Each pair of nodes has at most one link type, and there are two self-loops. The data follow the format of R. F. Hechinger and colleagues for food webs with parasites; columns that are not filled in the source (e.g. body sizes, biomasses) are omitted. A version of this web aggregated by species (with the life stages of each parasite merged into a single node) is the network `flensburg` of the entry `coastal_parasite_webs`. The authors list some missing or under-represented groups: bird and fish ectoparasites, bacteria, free-living protists, parasitic protists, fungi and viruses were not, or only partially, sampled.
+
+Node properties:
+- `name`: working name of the node (common or scientific name, or a descriptive name).
+- `species_id`: species identifier, shared by the nodes corresponding to the different life cycle stages of the same species.
+- `stage_id`: life cycle stage within the species, where 1 is the adult, and higher numbers are younger stages (the meaning of the numbers depends on the group).
+- `stage`: name of the life cycle stage (e.g. "Adult", "Cercariae", "Metacercariae", "Parthinitae", "Larvae").
+- `organismal_group`: broad group of organisms (e.g. "Trematode", "Fish", "Bird", "Amphipod").
+- `node_type`: the level at which the node is built ("Taxon", "Lifecycle Stage", "Common Name Group", "Detritus/Stock").
+- `resolution`: the lowest taxonomic level that the node represents (e.g. "Species", "Family", "Assemblage"); `resolution_notes`: notes on the resolution.
+- `feeding`: whether the node is "Feeding", "Non-Feeding" or "Autotroph".
+- `lifestyle_stage` and `lifestyle_species`: whether the life cycle stage, or the species as a whole, is "Freeliving" or "Infectious".
+- `consumer_strategy`: consumer strategy of the life cycle stage (e.g. "predator", "macroparasite", "trophically transmitted parasite", "parasitic castrator", "pathogen", "detritivore", "autotroph", "non-feeding").
+- `mobility`: short-term mobility ("Low", "Intermediate" or "High", empty if not given); `residency`: long-term residency of free-living nodes ("resident" or "migrant", empty if not given).
+- `kingdom`, `phylum`, `class`, `order`, `family`, `genus`, `specific_epithet`: taxonomy (empty if not given).
+- `notes`: notes on the node.
+
+Edge properties:
+- `link_type`: type of the interaction, one of "Predation", "Concomitant Predation on Symbionts", "Macroparasitism", "Trophic Transmission", "Trophically Transmitted Parasitism", "Predation on free-living non-feeding stages", "Detritivory", "Parasite intraguild trophic interaction", "Parasitic Castration", "Pathogen Infection" and "Micropredation" (see the metadata of the source for definitions).
+- `link_type_id`: the corresponding numeric code used by the source."""
+tags = ['Biological', 'Food web', 'Unweighted', 'Metadata']
+url = 'https://esapubs.org/archive/ecol/E092/174/default.htm'
+citation = [('C. D. Zander, N. Josten, K. C. Detloff, R. Poulin, J. P. McLaughlin, D. W. Thieltges, "Food web including metazoan parasites for a brackish shallow water ecosystem in Germany and Denmark." Ecology 92(10), 2007 (2011)', 'https://doi.org/10.1890/11-0374.1')]
+icon_hash = '56a85c8e26855e083a2f7941'
+upstream_license = None
+upstream_prefix = 'https://esapubs.org/archive/ecol/E092/174'
+files = [(('All_Flensburg_Data_Files.zip:All_Flensburg_Data_Files/Flensburg_Data_Nodes.csv',
+           'All_Flensburg_Data_Files.zip:All_Flensburg_Data_Files/Flensburg_Data_Links.csv'),
+          None, None)]
+
+# (property name, column header) of the non-empty node columns
+node_cols = [("species_id", "Species ID "), ("stage_id", "Stage ID"),
+             ("stage", "Stage"), ("name", "WorkingName"),
+             ("organismal_group", "OrganismalGroup"), ("node_type", "NodeType"),
+             ("resolution", "Resolution"),
+             ("resolution_notes", "ResolutionNotes"), ("feeding", "Feeding"),
+             ("lifestyle_stage", "LifestyleStage"),
+             ("lifestyle_species", "LifestyleSpecies"),
+             ("consumer_strategy", "ConsumerStrategyStage"),
+             ("mobility", "Mobility"), ("residency", "Residency"),
+             ("kingdom", "Kingdom"), ("phylum", "Phylum"), ("class", "Class"),
+             ("order", "Order"), ("family", "Family"), ("genus", "Genus"),
+             ("specific_epithet", "Specific epithet")]
+
+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, fl = [stack.enter_context(open_upstream_file(name, f, "r"))
+                      for f in fnames]
+            rows = [r for r in csv.reader(fn)]
+            header, rows = rows[0], [r for r in rows[1:] if r and r[0].strip()]
+            links = [r for r in csv.reader(fl)]
+            lheader, links = links[0], [r for r in links[1:] if r and r[0].strip()]
+
+        col = {c: i for i, c in enumerate(header) if c != ""}
+        N = max(int(r[0]) for r in rows)
+        g = Graph(N, directed=True)
+        for pname, c in node_cols:
+            ptype = "int" if pname in ("species_id", "stage_id") else "string"
+            g.vp[pname] = g.new_vp(ptype)
+        g.vp.notes = g.new_vp("string")
+        for r in rows:
+            v = g.vertex(int(r[0]) - 1)
+            for pname, c in node_cols:
+                x = r[col[c]].strip()
+                if g.vp[pname].value_type() == "int32_t":
+                    g.vp[pname][v] = int(x)
+                else:
+                    g.vp[pname][v] = x
+            # The node notes are in the first (unnamed) column after
+            # 'Node notes'
+            g.vp.notes[v] = " ".join(x.strip() for x in r[col["Node notes"]:]
+                                     if x.strip())
+
+        lcol = {c: i for i, c in enumerate(lheader) if c != ""}
+        g.ep.link_type = g.new_ep("string")
+        g.ep.link_type_id = g.new_ep("int")
+        for r in links:
+            e = g.add_edge(int(r[lcol["ConsumerNodeID"]]) - 1,
+                           int(r[lcol["ResourceNodeID"]]) - 1)
+            g.ep.link_type[e] = r[lcol["LinkType"]].strip()
+            g.ep.link_type_id[e] = int(r[lcol["LinkNumber"]])
+        yield alt, g