Diversity¶
Generate biodiversity indices for species analysis.
- pydwcviz.diversity.shannon(df, decimals=3)¶
Generate Shannon’s Diversity Index from species occurrence data.
- Parameters
df – [DataFrame] DataFrame. Species Occurrence data as a pandas DataFrame
decimals – [Integer] Decimals. Precision to be maintained in coordinates. Used for aggregation of records (binning).
- Returns
A DataFrame
Usage:
from pyobis import occurrences from pydwcviz import diversity data = occurrences.search( # this is a geometry in the Arabian Sea (right of India) geometry="POLYGON ((58.3301 19.0935, 69.8145 19.0381, 69.8145 9.5161, 58.6230 9.6316, 58.3301 19.0935))", ).execute() diversity.shannon(data, 3)
- pydwcviz.diversity.es50(df, decimals=3)¶
Generate ES50 (Hulbert’s) Diversity Index from species occurrence data.
- Parameters
df – [DataFrame] DataFrame. Species Occurrence data as a pandas DataFrame with at least [‘decimalLongitude’,’decimalLatitude’, ‘id’, ‘species’]
decimals – [Integer] Decimals. Precision to be maintained in coordinates. Used for aggregation of records (binning).
- Returns
A DataFrame
Usage:
from pyobis import occurrences from pydwcviz import diversity data = occurrences.search( # this is a geometry in the Arabian Sea (right of India) geometry="POLYGON ((58.3301 19.0935, 69.8145 19.0381, 69.8145 9.5161, 58.6230 9.6316, 58.3301 19.0935))", ).execute() diversity.es50(data, 3)