This document describes the JSON data that is used by the trophic web visualizations found on the data tab.
Data for a source page with id page_id
is found at /api/pages/<page_id>/pred_prey.json
. eg: https://eol.org/api/pages/620727/pred_prey.json
{
"nodes": [...],
"links": [...]
}
nodes
are classified into four groups: "source"
, "predator"
, "prey"
, "competitor"
. "source"
is the source taxon in the predator and prey records. It is the focal species, the point of reference for the rest of the trophic web. A "competitor"
is a predator of a "prey"
node. There is a limit of 7 predators, 7 prey, and 10 competitors. In order for a node to be included, it must be a species and have an icon.
node
attributes:
id
: thepage_id
for the taxongroup
: one of the group values described abovegroupDesc
: a more verbose description of how this node relates to the source node.icon
: taxon page icon urllabel
: The common name for the taxon if available, otherwise the scientific namelabelWithItalics
: Same aslabel
, but with<i></i>
tags surrounding the portions that should be italicized.x
: convenience for visualization code, always 0.y
: same asx
link
attributes:
source
: the nodeid
of the taxon that eats thetarget
target
: the nodeid
of the taxon that is eaten by thesource