Catalogue of Life

col.col_children(name=None, id=None, format=None, start=None, checklist=None)

Search Catalogue of Life for for direct children of a particular taxon.

Parameters:
  • name – The string to search for. Only exact matches found the name given will be returned, unless one or wildcards are included in the search string. An * (asterisk) character denotes a wildcard; a % (percentage) character may also be used. The name must be at least 3 characters long, not counting wildcard characters.
  • id – The record ID of the specific record to return (only for scientific names of species or infraspecific taxa)
  • format – format of the results returned. Valid values are format=xml and format=php; if the format parameter is omitted, the results are returned in the default XML format. If format=php then results are returned as a PHP array in serialized string format, which can be converted back to an array in PHP using the unserialize command
  • start – The first record to return. If omitted, the results are returned from the first record (start=0). This is useful if the total number of results is larger than the maximum number of results returned by a single Web service query (currently the maximum number of results returned by a single query is 500 for terse queries and 50 for full queries).
  • checklist – The year of the checklist to query, if you want a specific year’s checklist instead of the lastest as default (numeric).

Details You must provide one of name or id. The other parameters (format and start) are optional. Returns A list of data.frame’s.

Usage:

# A basic example
import pytaxize
pytaxize.col_children(name=["Apis"])

# An example where there is no classification, results in data.frame with no rows
pytaxize.col_children(id=[15669061])

# Use a specific year's checklist
pytaxize.col_children(name=["Apis"], checklist="2012")
pytaxize.col_children(name=["Apis"], checklist="2009")

# Pass in many names or many id's
out = pytaxize.col_children(name=["Buteo","Apis","Accipiter"], checklist="2012")
# get just one element in list of output
out[0]
col.col_downstream(name=None, downto=None, format=None, start=None, checklist=None)
Parameters:
  • name – The string to search for. Only exact matches found the name given will be returned, unless one or wildcards are included in the search string. An * (asterisk) character denotes a wildcard; a % (percentage) character may also be used. The name must be at least 3 characters long, not counting wildcard characters.
  • downto – The taxonomic level you want to go down to. See examples below. The taxonomic level IS case sensitive, and you do have to spell it correctly. See code{data(rank_ref)} for spelling.
  • checklist – The year of the checklist to query, if you want a specific year’s checklist instead of the lastest as default (numeric).
  • format – The returned format (default = None). If NULL xml is used. Currently only xml is supported.
  • start – The first record to return (default = None). If NULL, the results are returned from the first record (start=0). This is useful if the total number of results is larger than the maximum number of results returned by a single Web service query (currently the maximum number of results returned by a single query is 500 for terse queries and 50 for full queries).

Returns a list of DataFrame’s.

Usage:

# Some basic examples
pytaxize.col_downstream(name=["Apis"], downto="Species")
pytaxize.col_downstream(name=["Bryophyta"], downto="Family")

# An example that takes a bit longer
pytaxize.col_downstream(name=["Plantae","Animalia"], downto="Class")

# Using a checklist from a specific year
pytaxize.col_downstream(name=["Bryophyta"], downto=["Family"], checklist="2009")

Search Catalogue of Life for taxonomic IDs

Parameters:
  • name – The string to search for. Only exact matches found the name given will be returned, unless one or wildcards are included in the search string. An * (asterisk) character denotes a wildcard; a % (percentage) character may also be used. The name must be at least 3 characters long, not counting wildcard characters.
  • id – The record ID of the specific record to return (only for scientific names of species or infraspecific taxa)
  • start – The first record to return. If omitted, the results are returned from the first record (start=0). This is useful if the total number of results is larger than the maximum number of results returned by a single Web service query (currently the maximum number of results returned by a single query is 500 for terse queries and 50 for full queries).
  • checklist – The year of the checklist to query, if you want a specific year’s checklist instead of the lastest as default (numeric).

You must provide one of name or id. The other parameters (format and start) are optional.

Usage:

# A basic example
pytaxize.col_search(name=["Apis"])
pytaxize.col_search(id=15669061) # - DOESNT WORK

# Many names
pytaxize.col_search(name=["Apis","Puma concolor"])

# Many ids - DOESNT WORK
pytaxize.col_search(id=[15669061,6862841])

# An example where there is no data
pytaxize.col_search(id=11935941)

# Example with more than 1 result
pytaxize.col_search(name=['Poa'])