Catalogue of Life

col.children(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). Valid years are 2010 through the previous year from the current date. If none given, the “lastest” checklist is used

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

Usage:

from pytaxize import col
col.children(name=["Apis"])

# An example where there is no classification, results in data.frame with no rows
col.children(id=["4fdb38d6220462049eab9e3f285144e0"])

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

# Pass in many names or many id's
out = col.children(name=["Buteo","Apis","Accipiter"], checklist="2012")
# get just one element in list of output
out[0]
col.search(id=None, start=None, checklist=None)

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:

from pytaxize import col

col.search(name=["Apis"])
col.search(id=15669061)

# Many names
col.search(name=["Apis","Puma concolor"])

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

# An example where there is no data
col.search(id=11935941)

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