Taxon

Visualize taxanomic distributions from OBIS data in various forms.

pydwcviz.taxon.plot_dist(data, **kwargs)

Generates a plotly sunburst plot from a DataFrame of occurrence records.

Parameters

data – [Pandas DataFrame] A Pandas DataFrame of occurrence records with columns [“kingdom”, “phylum”, “class”, “order”, “family”, “genus”,”species”].

Returns

A plotly sunburst plot figure object

Usage:

from pydwcviz import taxon
from pyobis import occurrences

# get the data
fig = taxon.plot_dist(occurrences.search(scientificname = "Mola mola").execute())

# show the figure
fig.show()
pydwcviz.taxon.latdist(data, level='Species', bbox_to_anchor=[1.5, 1.2], interactive=False)

Generates a line plot of taxonomic distribution against latitude at a taxonomic level

Parameters
  • data – [Pandas DataFrame] A Pandas DataFrame of occurrence records with columns [“kingdom”, “phylum”, “class”, “order”, “family”, “genus”,”species”].

  • level – [String] Taxonomic level to plot distribution at. One of [“kingdom”, “phylum”, “class”, “order”, “family”, “genus”,”species”].

  • bbox_to_anchor – [List <Float>] Position to anchor bounding box for easy viewing of legend.

  • interactive – [Boolean] If True, the matplotlib plot. If False then plotly interactive plot

Returns

A Matplotlib axes object.

Usage:

from pydwcviz import taxon
from pyobis import occurrences

# plot the figure with the data
taxon.latdist(occurrences.search(scientificname = "Mola mola").execute(), level="species", interactive=False)

# interactive plot using plotly
fig = taxon.latdist(occurrences.search(scientificname = "Mola mola").execute(), level="species", interactive=True)
fig.show()