Skip to main content

iNat Taxonomy for python and polars

Utilities for accessing the iNaturalist taxonomy via polars dataframes

Install:

pip install git+https://github.com/sammlapp/inat_taxonomy.git

Usage:

import inat_taxonomy as tax

# common names in any supported language
# (takes first match for each entry)
spanish_names = tax.vernacular_names(['Setophaga fusca','Homo sapiens'],'spanish')

# access the full polars df
tax.TAXONOMY

# check available languages
tax.list_lexicons()

# join taxonomy table with vernacular names
# note that this will create duplicate rows
# since some taxa have multiple vernacular name entries
tax_chinese = tax.add_vernacular_names('chinese-simplified')

# add another language to this same dataframe
table_with_2languages =tax.add_vernacular_names('czech',tax_chinese)

# look up higher taxonomic levels
family = tax.sp_to_level(['Setophaga fusca','Homo sapiens'], 'family')

# get scientific and common names of bird species
import polars as pl
bird_names = tax.add_vernacular_names('english').filter(pl.col('class').eq('Aves'),pl.col('taxonRank').eq('species')).select(['scientificName','vernacularName_english'])

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inat_taxonomy-0.1.0.tar.gz (26.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inat_taxonomy-0.1.0-py3-none-any.whl (26.3 MB view details)

Uploaded Python 3

File details

Details for the file inat_taxonomy-0.1.0.tar.gz.

File metadata

  • Download URL: inat_taxonomy-0.1.0.tar.gz
  • Upload date:
  • Size: 26.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for inat_taxonomy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ae76dd83ef0fbe9b05436d79063bf90b772791fd195e4eae2c0e5979c4231ca8
MD5 6b3c5ef4667f0fceba2beff3c6fa1b06
BLAKE2b-256 5873ebd71f0a2132a7a340c5b6ccf8d87f5877a49389d6a04231cd2fb92e23df

See more details on using hashes here.

File details

Details for the file inat_taxonomy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: inat_taxonomy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for inat_taxonomy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aac388a6eee5d3fb082187054f83ddc19e9785471753849733605e1fd165fdc9
MD5 3ead345bab3f7f2dfc84f04733ee9421
BLAKE2b-256 bd3e13cae9304eb12d23dae6109b90ba32168edd227e2297536da12bfc49b012

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page