taxa module
Usage
from pyobis import taxa
query = taxa.search(scientificname="Mola mola")
query.execute()
query.data # Returns the data
query.api_url # Returns the API URL
query.to_pandas() # Returns a pandas DataFrame
data = taxa.search(scientificname="Mola mola").execute()
taxa.search(geometry="POLYGON((30.1 10.1, 10 20, 20 40, 40 40, 30.1 10.1))")
taxa.taxon(10332)
taxa.taxon(127405)
Methods:
- pyobis.taxa.search(scientificname=None, **kwargs)[source]
Get taxon records.
- Parameters:
scientificname – [String,Array] One or more scientific names from the OBIS backbone. All included and synonym taxa are included in the search
- Returns:
A dictionary
Usage:
from pyobis import taxa # build a query query = taxa.search(scientificname = 'Mola mola') query.execute() # execute the query i.e. fetch the data query.data # return the fetched data query.api_url # get the OBIS API URL for the built query query.mapper_url # get the OBIS Mapper URL (if it exists) # or simply get the data in one-easy step data = taxa.search(scientificname=['Mola mola','Abra alba']).execute()
- pyobis.taxa.taxon(id, **kwargs)[source]
Get taxon by ID
- Parameters:
id – [Fixnum] An OBIS taxon identifier
- Returns:
A TaxaResponse object
Usage:
from pyobis import taxa query1 = taxa.taxon(545439) query1.execute() # executes the query previously built from OBIS query1.data # returns the data query1.api_url # returns the OBIS API URL query1.mapper_url # returns the OBIS Mapper URL for easy visualization taxa.taxon(402913).execute() q2 = taxa.taxon(406296) q3 = taxa.taxon(415282)
- pyobis.taxa.annotations(scientificname, **kwargs)[source]
Get scientific name annotations by the WoRMS team.
- Parameters:
scientificname – [String] Scientific name. Leave empty to include all taxa.
- Returns:
A TaxaResponse Object
Usage:
from pyobis import taxa query1 = taxa.annotations(scientificname="Abra") query1.execute() # executes the query previously built from OBIS query1.data # returns the data query1.api_url # returns the OBIS API URL query1.mapper_url # returns the OBIS Mapper URL for easy visualization