pytaxize¶
This is a port of the R package taxize. There is a lot going on in the R version of this library, so it will take a while to get all the same functionality over here.
Why? A significant advantage of a Python version of taxize will be for those that are pythonistas at heart. Also, you could use pytaxize in a web app, whereas you could with taxize (e.g., in a Shiny app), but it wouldn’t scale, be very fast, etc.
Installation¶
Stable from pypi
pip install pytaxize
Development version
sudo pip install git+git://github.com/sckott/pytaxize.git#egg=pytaxize
Taxonomic Ids¶
I’ve started working on a class interface for taxonomic IDs, which will have a bunch of extension methods to do various things with taxon ids. What’s available right now is just getting COL ids.
from pytaxize import Ids
res = Ids('Poa annua')
res.ncbi()
res.ids
{'Poa annua': [{'id': '93036',
'name': 'Poa annua',
'rank': 'species',
'uri': 'https://www.ncbi.nlm.nih.gov/taxonomy/93036'}]}
ITIS¶
from pytaxize import itis
itis.accepted_names(504239)
{'acceptedName': 'Dasiphora fruticosa',
'acceptedTsn': '836659',
'author': '(L.) Rydb.'}
itis.hierarchy_up(tsn = 36485)
{'author': 'Raf.',
'parentName': 'Asteraceae',
'parentTsn': '35420',
'rankName': 'Genus',
'taxonName': 'Agoseris',
'tsn': '36485'}
Catalogue of Life¶
from pytaxize import col
x = col.children(name=["Apis"])
x[0][0:2]
[{'id': '7a4a38c5095963949d6d6ec917d471de',
'name': 'Apis andreniformis',
'rank': 'Species'},
{'id': '39610a4ceff7e5244e334a3fbc5e47e5',
'name': 'Apis cerana',
'rank': 'Species'}]
Modules¶
- pytaxize modules
Introduction to pygbif modules.
- Taxonomic Identifiers Class
The Ids class
- Children
The Children class
- Classification
The Classification class
- Scientific and common names
Scientific to common names, and vice versa
- NCBI
The ncbi module: NCBI methods
- ITIS
The itis module: ITIS methods
- Global Names Resolver
The gn module: methods for Global Names Index and Resolver
- Catalogue of Life
The col module: Catalogue of Life methods
- Other methods
Variety of other methods
All the rest¶
- Changelog
See what has changed in recent pygbif versions.
- Contributors
pygbif contributors.
- Contributing
Learn how to contribute to the pygbif project.
- Contributor Code of Conduct
Expected behavior in this community. By participating in this project you agree to abide by its terms.
- LICENSE
The pygbif license.