Function Repository Resource:

TaxonomyGraph

Source Notebook

Visualize the taxonomy graph of a given species

Contributed by: Keiko Hirayama

ResourceFunction["TaxonomyGraph"][species]

visualizes the taxonomy graph for a specified species entity.

TaxonomyGraph illustrates the evolutionary tree of an organism. Vertices represent hierarchically organized taxa arranged based on taxonomic ranks.
Any entities of "TaxonomicSpecies" can be used.
ResourceFunction["TaxonomyGraph"] has the same options as Graph.

Examples

Basic Examples (2) 

Visualize the taxonomy graph of an animal:

In[1]:=
ResourceFunction["TaxonomyGraph"][
 Entity["TaxonomicSpecies", "AiluropodaMelanoleuca::fqjh7"]]
Out[1]=

Visualize the taxonomy graph of a plant:

In[2]:=
ResourceFunction["TaxonomyGraph"][
 Entity["TaxonomicSpecies", "Quercus::k2384"]]
Out[2]=

Highlight taxa of interest:

In[3]:=
ResourceFunction["TaxonomyGraph"][
 Entity["TaxonomicSpecies", "LoxodontaAfricana::qtsb3"], GraphHighlight -> {Entity["TaxonomicSpecies", "LoxodontaAfricana::qtsb3"], Entity["TaxonomicSpecies", "Mammalia::5448z"]}]
Out[3]=

Specify the layout of a graph:

In[4]:=
ResourceFunction["TaxonomyGraph"][
 Entity["TaxonomicSpecies", "DugongDugon::8b266"], GraphLayout -> "RadialDrawing"]
Out[4]=

Combine the taxonomy graphs of two species:

In[5]:=
species = {Entity["TaxonomicSpecies", "GiraffaCamelopardalis::y5488"],
    Entity["TaxonomicSpecies", "FelisCatus::ddvt3"]};
In[6]:=
GraphUnion[
 Sequence @@ Map[ResourceFunction["TaxonomyGraph"][#] &, species], GraphLayout -> "RadialDrawing", VertexLabels -> Placed["Name", Tooltip], GraphHighlight -> species]
Out[6]=

Trying to visualize the non-species entity returns a Missing value:

In[7]:=
ResourceFunction["TaxonomyGraph"][Entity["HorseBreed", "Barb"]]
Out[7]=

Requirements

Wolfram Language 13.0 (December 2021) or above

Version History

  • 1.0.0 – 25 October 2023

Related Resources

License Information