History of foodweb_little_rock
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 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/foodweb_little_rock/__init__.py b/entries/foodweb_little_rock/__init__.py
index 79a0de3..447aff5 100644
--- a/entries/foodweb_little_rock/__init__.py
+++ b/entries/foodweb_little_rock/__init__.py
@@ -31,7 +31,7 @@ The network has the following properties:
tags = ['Biological', 'Food web', 'Unweighted', 'Metadata']
url = 'https://web.archive.org/web/20180916202441/http://research.mssm.edu/maayan/datasets/qualitative_networks.shtml'
citation = [('N. D. Martinez, "Artifacts or attributes? Effects of resolution on the Little Rock Lake food web." Ecological Monographs 61(4), 367-392 (1991)', 'https://doi.org/10.2307/2937047')]
-icon_hash = '584101b38cf714f319c45416'
+date_added = '2020-08-11'
upstream_license = None
# The Ma'ayan Laboratory site is gone; the file is obtained from the Internet
# Archive.
[entries] Prefix the properties in the descriptions with (Node), (Edge) or (Graph) 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/foodweb_little_rock/__init__.py b/entries/foodweb_little_rock/__init__.py
index 806c7d1..79a0de3 100644
--- a/entries/foodweb_little_rock/__init__.py
+++ b/entries/foodweb_little_rock/__init__.py
@@ -25,7 +25,9 @@ Nodes are taxa (autotrophs, herbivores, carnivores and decomposers, as well as f
The network has the following properties:
-- Nodes: `taxon`, the taxon number in the source file; `name`, the name of the taxon ("?" for taxon 0); `group`, the taxonomic or functional group of the taxon (its name, if it belongs to no group)."""
+- (Node) `taxon`: the taxon number in the source file.
+- (Node) `name`: the name of the taxon ("?" for taxon 0).
+- (Node) `group`: the taxonomic or functional group of the taxon (its name, if it belongs to no group)."""
tags = ['Biological', 'Food web', 'Unweighted', 'Metadata']
url = 'https://web.archive.org/web/20180916202441/http://research.mssm.edu/maayan/datasets/qualitative_networks.shtml'
citation = [('N. D. Martinez, "Artifacts or attributes? Effects of resolution on the Little Rock Lake food web." Ecological Monographs 61(4), 367-392 (1991)', 'https://doi.org/10.2307/2937047')]
[entries] Remove unneeded code from the entries 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/foodweb_little_rock/__init__.py b/entries/foodweb_little_rock/__init__.py
index f5c99c5..806c7d1 100644
--- a/entries/foodweb_little_rock/__init__.py
+++ b/entries/foodweb_little_rock/__init__.py
@@ -52,7 +52,7 @@ taxa = {
6: "Rock bass (Ambloptes rupestris), adult",
8: "Black crappie (Pomoxis nigromaculatus), adult",
9: "Mudminnow (Umbra)",
- 10: "Shinner (Notemigonus crysoleucus)",
+ 10: "Shiner (Notemigonus crysoleucus)",
12: "Diaptomus minutus",
52: "Scapholeberis kingi",
53: "Sida crystallina",
@@ -65,10 +65,8 @@ taxa = {
60: "Hemiptera Gerris",
61: "Hydroporus",
76: "Gyrinus",
- 10: "Shiner (Notemigonus crysoleucus)",
62: "Leptophlebia",
63: "Caenis",
- 12: "Diaptomus minutus",
13: "Diacyclops thomasi",
14: "Mesocyclops edax",
15: "Tropocyclops prasinus",
@@ -257,7 +255,6 @@ groups = {
@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] Move KONECT-derived entries to their original sources 45943ea
The entries now download the data from where KONECT obtained them (live or via the Wayback Machine), gaining the metadata KONECT dropped (names, identifiers, timestamps, attributes), with descriptions and citations rewritten from the original sources: - Ma'ayan lab collection: faa_routes, foodweb_little_rock (taxon names were assigned to the wrong nodes), interactome_pdz, interactome_figeys, interactome_stelzl, interactome_vidal - Pajek collection and primary sources: word_assoc (from the Edinburgh Associative Thesaurus; KONECT dropped all counts >= 10), foldoc, new_guinea_tribes - bitriad: elite, ceo_club (adds the CEO KONECT's copy lacked) - Lovro Subelj: cora, euroroad (adds isolated cities and parallel roads) - SNAP: elec (all votes, with elections and nominators) - Zenodo: wiki_talk (user ids and roles) - MPI-SWS: flickr_growth, facebook_wall (edges now point from poster to wall owner, as documented), wikipedia_growth (full timestamps) - Other sources: prosper, jester, reactome (the 2014 release KONECT used), unicodelang (CLDR 27), wordnet (WordNet 3.1), chicago_road (TNTP ChicagoRegional)
diff --git a/entries/foodweb_little_rock/__init__.py b/entries/foodweb_little_rock/__init__.py
index 05ce277..f5c99c5 100644
--- a/entries/foodweb_little_rock/__init__.py
+++ b/entries/foodweb_little_rock/__init__.py
@@ -19,14 +19,22 @@
from .. import *
title = "Little Rock Lake food web (1991)"
-description = """A food web among the species found in Little Rock Lake in Wisconsin. Nodes are taxa (like species), either autotrophs, herbivores, carnivores or decomposers. Edges represent feeding (nutrient transfer) of one taxon on another.[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
-tags = ['Biological', 'Food web', 'Unweighted']
-url = 'http://konect.cc/networks/maayan-foodweb'
-citation = [('N. Martinez, "Artifacts or attributes? Effects of resolution on the Little Rock Lake food web." Ecological Monographs (1991).', 'https://doi.org/10.2307/2937047')]
+description = """The food web of Little Rock Lake, Wisconsin (USA), a highly resolved food web first published by Martinez (1991), in which most taxa are resolved to the genus or species level. The data were obtained from the network collection of the Ma'ayan Laboratory (Mount Sinai School of Medicine), which distributed them in its SIG flat file format, with the taxa identified only by numbers (0 to 182). Taxon names and groups were assigned manually from the numbering of the taxa in the original publication.
+
+Nodes are taxa (autotrophs, herbivores, carnivores and decomposers, as well as fine organic matter), and a directed edge points from a food source to its consumer. Taxon 0 has no counterpart in the publication's list of taxa: it has no incoming edges and points to all the algae and cyanobacteria, to fine organic matter, fish eggs and two insect taxa, so that it acts as a common source of the basal taxa; its meaning is not documented. Self-loops denote cannibalism.
+
+The network has the following properties:
+
+- Nodes: `taxon`, the taxon number in the source file; `name`, the name of the taxon ("?" for taxon 0); `group`, the taxonomic or functional group of the taxon (its name, if it belongs to no group)."""
+tags = ['Biological', 'Food web', 'Unweighted', 'Metadata']
+url = 'https://web.archive.org/web/20180916202441/http://research.mssm.edu/maayan/datasets/qualitative_networks.shtml'
+citation = [('N. D. Martinez, "Artifacts or attributes? Effects of resolution on the Little Rock Lake food web." Ecological Monographs 61(4), 367-392 (1991)', 'https://doi.org/10.2307/2937047')]
icon_hash = '584101b38cf714f319c45416'
-upstream_prefix = 'http://konect.cc/files'
-files = [('download.tsv.maayan-foodweb.tar.bz2', None, 'konect')]
+upstream_license = None
+# The Ma'ayan Laboratory site is gone; the file is obtained from the Internet
+# Archive.
+upstream_prefix = 'https://web.archive.org/web/20150912005135id_/http://research.mssm.edu:80/maayan/datasets'
+files = [('foodweb.sig', None, 'sig')]
def fetch_upstream(force=False):
return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
@@ -251,23 +259,32 @@ groups = {
def parse(alts=None):
global files
name = __name__.split(".")[-1]
- for fnames, alt, fmt in files:
+ for fname, alt, fmt in files:
if alts is not None and alt not in alts:
continue
- if isinstance(fnames, str):
- fnames = [fnames]
- with ExitStack() as stack:
- fs = [stack.enter_context(open_upstream_file(name, fn, "rb")) for fn in fnames]
- g = parse_graph(fs, fmt, directed=True)
-
- g.vp.name = g.new_vp("string")
- g.vp.group = g.new_vp("string")
-
- for v in g.vertices():
- idx = g.num_vertices() - int(v) - 1
- g.vp.name[v] = taxa[idx]
- g.vp.group[v] = g.vp.name[v]
- for r, rg in groups.items():
- if idx in rg:
- g.vp.group[v] = r
+ # SIG flat file: 13 space-separated columns per line, of which only
+ # the first (source) and sixth (target) are informative here; taxa
+ # are named "A<number>".
+ g = Graph(directed=True)
+ vs = {}
+ edges = []
+ with open_upstream_file(name, fname, "rb") as f:
+ for line in f.read().decode("utf-8").splitlines():
+ row = line.split()
+ if len(row) == 0:
+ continue
+ edges.append([vs.setdefault(int(row[i][1:]), len(vs))
+ for i in (0, 5)])
+ g.add_vertex(len(vs))
+ g.vp.taxon = g.new_vp("int")
+ g.vp.name = g.new_vp("string")
+ g.vp.group = g.new_vp("string")
+ for idx, v in vs.items():
+ g.vp.taxon[v] = idx
+ g.vp.name[v] = taxa[idx]
+ g.vp.group[v] = taxa[idx]
+ for r, rg in groups.items():
+ if idx in rg:
+ g.vp.group[v] = r
+ g.add_edge_list(edges)
yield alt, g
Update copyright information 73a4f0d
diff --git a/entries/foodweb_little_rock/__init__.py b/entries/foodweb_little_rock/__init__.py
index 01c4c23..05ce277 100644
--- a/entries/foodweb_little_rock/__init__.py
+++ b/entries/foodweb_little_rock/__init__.py
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2020-2024 Tiago de Paula Peixoto <tiago@skewed.de>
+# 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
Update copyright information 3d288ea
diff --git a/entries/foodweb_little_rock/__init__.py b/entries/foodweb_little_rock/__init__.py
index 0511a92..01c4c23 100644
--- a/entries/foodweb_little_rock/__init__.py
+++ b/entries/foodweb_little_rock/__init__.py
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2020-2023 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2020-2024 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
Update copyright information 8d005ae
diff --git a/entries/foodweb_little_rock/__init__.py b/entries/foodweb_little_rock/__init__.py
index 7385b3b..0511a92 100644
--- a/entries/foodweb_little_rock/__init__.py
+++ b/entries/foodweb_little_rock/__init__.py
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2021 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2020-2023 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
foodweb_little_rock: add manual annotations from paper d60e782
diff --git a/entries/foodweb_little_rock/__init__.py b/entries/foodweb_little_rock/__init__.py
index 0f0192a..7385b3b 100644
--- a/entries/foodweb_little_rock/__init__.py
+++ b/entries/foodweb_little_rock/__init__.py
@@ -32,6 +32,219 @@ def fetch_upstream(force=False):
return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
force)
+# manual annotations from paper
+taxa = {
+ 1: "Yellow perch (Perca flaverscens), young",
+ 3: "Largemouth bass (Micropterus salsmoides), young",
+ 5: "Rock bass (Ambloptes rupestris), young",
+ 7: "Black crappie (Pomoxis nigromaculatus), young",
+ 11: "Fish eggs",
+ 2: "Yellow perch (Perca flaverscens), adult",
+ 4: "Largemouth bass (Micropterus salsmoides), adult",
+ 6: "Rock bass (Ambloptes rupestris), adult",
+ 8: "Black crappie (Pomoxis nigromaculatus), adult",
+ 9: "Mudminnow (Umbra)",
+ 10: "Shinner (Notemigonus crysoleucus)",
+ 12: "Diaptomus minutus",
+ 52: "Scapholeberis kingi",
+ 53: "Sida crystallina",
+ 54: "Macrocyclops albidus",
+ 55: "Eucyclops serrulatus",
+ 56: "Acanthocyclops",
+ 57: "Microcyclops rubellus",
+ 58: "Harpacticoid copepods",
+ 59: "Harpacticoid copepodids",
+ 60: "Hemiptera Gerris",
+ 61: "Hydroporus",
+ 76: "Gyrinus",
+ 10: "Shiner (Notemigonus crysoleucus)",
+ 62: "Leptophlebia",
+ 63: "Caenis",
+ 12: "Diaptomus minutus",
+ 13: "Diacyclops thomasi",
+ 14: "Mesocyclops edax",
+ 15: "Tropocyclops prasinus",
+ 64: "Oecetis",
+ 65: "Mystacides",
+ 66: "Limnephilus",
+ 16: "Epischura lacustris",
+ 67: "Agrypnia",
+ 68: "Banksiola",
+ 17: "Bosmina longirostris",
+ 18: "Eubosmina",
+ 69: "Molanna",
+ 19: "Daphnia galeata mendotae",
+ 20: "Daphnia parvula",
+ 21: "Diaphanosoma birgei",
+ 22: "Holopedium gibberum",
+ 23: "Leptodora kindtii",
+ 24: "Polyphemus pediculus",
+ 70: "Polycentropus",
+ 71: "Anisoptera epitheca",
+ 72: "Libellula",
+ 73: "Sympetrum",
+ 74: "Enallagma",
+ 75: "Neuroptera Climacia",
+ 25: "Conochilus unicornis",
+ 26: "Conochiloides",
+ 27: "Kellicottia longispina",
+ 28: "Kellicottia bostoniensis",
+ 29: "Keratella cochlearis",
+ 30: "Keratella taurocephala",
+ 31: "Keratella crassa",
+ 32: "Keratella hiemalis",
+ 33: "Polyarthra remata",
+ 34: "Polyarthra vulgaris",
+ 35: "Trichocerca cylindrica",
+ 36: "Asplanchna",
+ 37: "Gastropus",
+ 38: "Synchaeta",
+ 77: "Hemiptera Veliidae",
+ 78: "Hemiptera Notonectids",
+ 79: "Magaloptera Sialis",
+ 80: "Lepidoptera Pyralidae eoparagyractis",
+ 81: "Bezzia",
+ 82: "Sphaeromais",
+ 83: "Chaoborus albatus",
+ 84: "Chaoborus punctipennis",
+ 85: "Albabesmyia",
+ 86: "Clinotanypus",
+ 87: "Djalmabatista",
+ 88: "Guttipelopia",
+ 39: "Nauplii",
+ 89: "Larsia",
+ 40: "Calanoid copepodids",
+ 41: "Cyclopoid copepodids",
+ 90: "Macropelopis",
+ 91: "Procladius",
+ 92: "Chaetocladius",
+ 42: "Alona affinis",
+ 43: "Alona quadrangularis",
+ 44: "Alona rustica",
+ 45: "Alona intermedia",
+ 46: "Alonella excisa",
+ 47: "Disparalona acutirostris",
+ 48: "Chydorus spl",
+ 49: "Chydorus sp2",
+ 50: "Acantholeberis curvirostris",
+ 51: "Ophryoxus gracilis",
+ 93: "Corynoneura",
+ 94: "Cricotopus",
+ 95: "Nanocladius",
+ 96: "Micropsectra",
+ 97: "Paratanytarsus",
+ 98: "Tanytarsus",
+ 99: "Chironomus",
+ 100: "Cladopelma",
+ 101: "Cryptochironomus",
+ 102: "Endochironomus",
+ 104: "Microtendipes",
+ 105: "Parachironomus",
+ 106: "Paratendipes",
+ 144: "Sphaerozosma",
+ 145: "Spirogyra",
+ 146: "Tribonema",
+ 147: "Zygnema",
+ 107: "Polypedilum",
+ 103: "Glyptotendipes",
+ 108: "Pseudochironomus",
+ 109: "Stenochironomus",
+ 110: "Stictochironomus",
+ 111: "Xenochironomus",
+ 148: "Chroococcus",
+ 149: "Gloeothece",
+ 150: "Merismopedia",
+ 151: "Aphanocapsa",
+ 152: "Gomphosphaeria",
+ 153: "Coelosphaerium",
+ 154: "Rhabdoderma",
+ 155: "Aphanothece",
+ 156: "Anabaena",
+ 112: "Bivalvia",
+ 113: "Campeloma decisum",
+ 114: "Sphaeriidae",
+ 115: "Annelida Oligochaete",
+ 116: "Annelida Hirudinea",
+ 117: "Turbellaria Tricladida",
+ 118: "Amphipoda Crangonyx gracilis",
+ 119: "Spongilla lacustris",
+ 120: "Ephydatia muelleri",
+ 121: "Corvomyenia everetti",
+ 122: "Arthropoda Hydracarina",
+ 123: "Bambusina",
+ 124: "Batrachospermum",
+ 125: "Binuclearia",
+ 126: "Bulbochaete",
+ 127: "Desmidium",
+ 128: "Geminella",
+ 129: "Groenbladia",
+ 130: "Hapalosiphon",
+ 131: "Hyalotheca",
+ 132: "Lyngbya",
+ 133: "Microchaete",
+ 134: "Microcoleus",
+ 135: "Mougeotia",
+ 136: "Oedogonium",
+ 137: "Oscillatoria",
+ 138: "Phormidium",
+ 139: "Plectonema",
+ 140: "Radiofilum",
+ 141: "Rhizoclonium",
+ 142: "Schizothrix",
+ 143: "Scytonema",
+ 157: "Arthrodesmus",
+ 158: "Cosmarium",
+ 159: "Crucigenia",
+ 160: "Euastrum",
+ 161: "Oocystis",
+ 162: "Pediastrum",
+ 163: "Quadrigula",
+ 164: "Schroederia",
+ 165: "Spondylosium",
+ 166: "Staurastrum",
+ 167: "Tetraedron",
+ 168: "Ankistrodesmus",
+ 169: "Xanthidium",
+ 170: "Elaktothrix",
+ 171: "Scenedesmus",
+ 172: "Phacus",
+ 173: "Trachelomonas",
+ 174: "Chroomonas",
+ 175: "Cryptomonas",
+ 176: "Asterionella",
+ 177: "Dinobryon",
+ 178: "Mallomonas",
+ 179: "Synedra",
+ 180: "Synura",
+ 181: "Tabellaria",
+ 182: "Fine organic matter",
+ 0: "?"}
+
+groups = {
+ "Young of year fishes": [1, 3, 5, 7],
+ "Adult fishes": [2, 4, 6, 8],
+ "Minnows": [9,10],
+ "Pelagic copepods": range(12, 17),
+ "Pelagic cladocera": range(17, 25),
+ "Pelagic rotifers": range(25, 39),
+ "Juvenile pelagic zooplankton": range(39, 42),
+ "Bhentic cladocera": range(42, 54),
+ "Bhentic copepods": range(54, 60),
+ "Hemiptera Gerris": [60],
+ "Coleoptera": [61, 76],
+ "Ephemeroptera": [62, 63],
+ "Trichoptera": range(64, 71),
+ "Odonata": range(71, 75),
+ "Diptera": range(81, 112),
+ "Mollusca": range(112, 115),
+ "Porifera": range(119, 121),
+ "Filamentous algea": range(123, 148),
+ "Cyanobacteria": range(148, 157),
+ "Green algea": range(157, 172),
+ "Euglenophyta": [172, 173],
+ "Cryptophyta": [174, 175],
+ "Chrysophyceae": range(176, 182)}
+
@cache_network()
@coerce_props()
@annotate()
@@ -46,4 +259,15 @@ def parse(alts=None):
with ExitStack() as stack:
fs = [stack.enter_context(open_upstream_file(name, fn, "rb")) for fn in fnames]
g = parse_graph(fs, fmt, directed=True)
+
+ g.vp.name = g.new_vp("string")
+ g.vp.group = g.new_vp("string")
+
+ for v in g.vertices():
+ idx = g.num_vertices() - int(v) - 1
+ g.vp.name[v] = taxa[idx]
+ g.vp.group[v] = g.vp.name[v]
+ for r, rg in groups.items():
+ if idx in rg:
+ g.vp.group[v] = r
yield alt, g
Update copyright info db2efcc
diff --git a/entries/foodweb_little_rock/__init__.py b/entries/foodweb_little_rock/__init__.py
index 21df637..0f0192a 100644
--- a/entries/foodweb_little_rock/__init__.py
+++ b/entries/foodweb_little_rock/__init__.py
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2020 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2021 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
Un-orphan KONECT datasets 894eba5
KONECT has been brought back from the dead for the time being.
diff --git a/entries/foodweb_little_rock/__init__.py b/entries/foodweb_little_rock/__init__.py
index 224d593..21df637 100644
--- a/entries/foodweb_little_rock/__init__.py
+++ b/entries/foodweb_little_rock/__init__.py
@@ -26,7 +26,6 @@ url = 'http://konect.cc/networks/maayan-foodweb'
citation = [('N. Martinez, "Artifacts or attributes? Effects of resolution on the Little Rock Lake food web." Ecological Monographs (1991).', 'https://doi.org/10.2307/2937047')]
icon_hash = '584101b38cf714f319c45416'
upstream_prefix = 'http://konect.cc/files'
-orphan = True
files = [('download.tsv.maayan-foodweb.tar.bz2', None, 'konect')]
def fetch_upstream(force=False):
Update citations to use DOIs e878874
diff --git a/entries/foodweb_little_rock/__init__.py b/entries/foodweb_little_rock/__init__.py
index a928440..224d593 100644
--- a/entries/foodweb_little_rock/__init__.py
+++ b/entries/foodweb_little_rock/__init__.py
@@ -23,7 +23,7 @@ description = """A food web among the species found in Little Rock Lake in Wisco
[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
tags = ['Biological', 'Food web', 'Unweighted']
url = 'http://konect.cc/networks/maayan-foodweb'
-citation = [('N. Martinez, "Artifacts or attributes? Effects of resolution on the Little Rock Lake food web." Ecological Monographs (1991).', 'http://onlinelibrary.wiley.com/doi/10.2307/2937047/full')]
+citation = [('N. Martinez, "Artifacts or attributes? Effects of resolution on the Little Rock Lake food web." Ecological Monographs (1991).', 'https://doi.org/10.2307/2937047')]
icon_hash = '584101b38cf714f319c45416'
upstream_prefix = 'http://konect.cc/files'
orphan = True
Add support for 'orphan' datasets and tag konect entries e330b80
diff --git a/entries/foodweb_little_rock/__init__.py b/entries/foodweb_little_rock/__init__.py
index e2ee8cb..a928440 100644
--- a/entries/foodweb_little_rock/__init__.py
+++ b/entries/foodweb_little_rock/__init__.py
@@ -26,6 +26,7 @@ url = 'http://konect.cc/networks/maayan-foodweb'
citation = [('N. Martinez, "Artifacts or attributes? Effects of resolution on the Little Rock Lake food web." Ecological Monographs (1991).', 'http://onlinelibrary.wiley.com/doi/10.2307/2937047/full')]
icon_hash = '584101b38cf714f319c45416'
upstream_prefix = 'http://konect.cc/files'
+orphan = True
files = [('download.tsv.maayan-foodweb.tar.bz2', None, 'konect')]
def fetch_upstream(force=False):
Change license from GPLv3 to AGPLv3 d754be5
diff --git a/entries/foodweb_little_rock/__init__.py b/entries/foodweb_little_rock/__init__.py
index 952b14a..e2ee8cb 100644
--- a/entries/foodweb_little_rock/__init__.py
+++ b/entries/foodweb_little_rock/__init__.py
@@ -3,18 +3,18 @@
#
# Copyright (C) 2020 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 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 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 General Public License for more details.
+# 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 General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# 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 *
Add explicit attribution to descriptions obtained from ICON 1645314
diff --git a/entries/foodweb_little_rock/__init__.py b/entries/foodweb_little_rock/__init__.py
index d700606..952b14a 100644
--- a/entries/foodweb_little_rock/__init__.py
+++ b/entries/foodweb_little_rock/__init__.py
@@ -19,7 +19,8 @@
from .. import *
title = "Little Rock Lake food web (1991)"
-description = "A food web among the species found in Little Rock Lake in Wisconsin. Nodes are taxa (like species), either autotrophs, herbivores, carnivores or decomposers. Edges represent feeding (nutrient transfer) of one taxon on another."
+description = """A food web among the species found in Little Rock Lake in Wisconsin. Nodes are taxa (like species), either autotrophs, herbivores, carnivores or decomposers. Edges represent feeding (nutrient transfer) of one taxon on another.[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
tags = ['Biological', 'Food web', 'Unweighted']
url = 'http://konect.cc/networks/maayan-foodweb'
citation = [('N. Martinez, "Artifacts or attributes? Effects of resolution on the Little Rock Lake food web." Ecological Monographs (1991).', 'http://onlinelibrary.wiley.com/doi/10.2307/2937047/full')]
Initial commit cc85872
diff --git a/entries/foodweb_little_rock/__init__.py b/entries/foodweb_little_rock/__init__.py
new file mode 100644
index 0000000..d700606
--- /dev/null
+++ b/entries/foodweb_little_rock/__init__.py
@@ -0,0 +1,48 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2020 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 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+from .. import *
+
+title = "Little Rock Lake food web (1991)"
+description = "A food web among the species found in Little Rock Lake in Wisconsin. Nodes are taxa (like species), either autotrophs, herbivores, carnivores or decomposers. Edges represent feeding (nutrient transfer) of one taxon on another."
+tags = ['Biological', 'Food web', 'Unweighted']
+url = 'http://konect.cc/networks/maayan-foodweb'
+citation = [('N. Martinez, "Artifacts or attributes? Effects of resolution on the Little Rock Lake food web." Ecological Monographs (1991).', 'http://onlinelibrary.wiley.com/doi/10.2307/2937047/full')]
+icon_hash = '584101b38cf714f319c45416'
+upstream_prefix = 'http://konect.cc/files'
+files = [('download.tsv.maayan-foodweb.tar.bz2', None, 'konect')]
+
+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
+ if isinstance(fnames, str):
+ fnames = [fnames]
+ with ExitStack() as stack:
+ fs = [stack.enter_context(open_upstream_file(name, fn, "rb")) for fn in fnames]
+ g = parse_graph(fs, fmt, directed=True)
+ yield alt, g