TaxonCount¶
- class pyinaturalist.models.TaxonCount(id=None, uuid=None, ancestry=None, ancestor_ids=NOTHING, complete_rank=None, complete_species_count=None, created_at=None, current_synonymous_taxon_ids=NOTHING, extinct=None, gbif_id=None, iconic_taxon_id=0, iconic_taxon_name=None, is_active=None, listed_places=None, listed_taxa_count=None, matched_term=None, name=None, names=NOTHING, observations_count=None, parent_id=None, preferred_common_name='', preferred_establishment_means=None, rank_level=None, reference_url=None, ranges=None, rank=None, taxon_changes_count=None, taxon_schemes_count=None, vision=None, wikipedia_summary=None, wikipedia_url=None, artificial=False, partial=False, indent_level=None, ancestors=NOTHING, children=NOTHING, conservation_status=None, conservation_statuses=NOTHING, default_photo=None, establishment_means=None, listed_taxa=NOTHING, taxon_photos=NOTHING, count=0, descendant_obs_count=0) None¶
Bases:
TaxonA
Taxonwith an associated count, used in aTaxonCountscollectionAttributes
Name
Type
Description
id
Unique record ID
uuid
Unversally unique record ID
ancestry
Slash-delimited string of ancestor IDs
ancestor_ids
Taxon IDs of ancestors, from highest rank to lowest
complete_rank
Complete or “leaf taxon” rank, e.g. species or subspecies
complete_species_count
Total number of species descended from this taxon
created_at
Date and time the taxon was added to iNaturalist
current_synonymous_taxon_ids
Taxon IDs of taxa that are accepted synonyms
extinct
Indicates if the taxon is extinct
gbif_id
GBIF taxon ID
iconic_taxon_id
ID of the iconic taxon (e.g., general taxon “category”)
iconic_taxon_name
Name of the iconic taxon (e.g., general taxon “category”)
is_active
Indicates if the taxon is active (and not renamed, moved, etc.)
listed_places
Indicates if there are listed places for this taxon
listed_taxa_count
Number of listed taxa from this taxon + descendants
matched_term
Matched search term, from autocomplete results
name
Taxon name; contains full scientific name at species level and below
names
All regional common names; only returned if
all_namesis specifiedobservations_count
Total number of observations of this taxon and its descendants
parent_id
Taxon ID of immediate ancestor
preferred_common_name
Common name for the preferred place, if any
preferred_establishment_means
Establishment means for this taxon in the given preferred place (if any)
rank_level
Number indicating rank level, for easier comparison between ranks (kingdom=highest)
reference_url
Reference URL for the taxonomy source
ranges
Indicates if there is range data for this taxon
rank
Taxon rank
Options:
infrahybrid,form,variety,subspecies,hybrid,species,complex,subsection,section,subgenus,genushybrid,genus,subtribe,tribe,supertribe,subfamily,family,epifamily,superfamily,zoosubsection,zoosection,parvorder,infraorder,suborder,order,superorder,subterclass,infraclass,subclass,class,superclass,subphylum,phylum,kingdomtaxon_changes_count
Number of curator changes to this taxon
taxon_schemes_count
Taxon schemes that include this taxon
vision
Indicates if this taxon is included in the computer vision model
wikipedia_summary
Taxon summary from Wikipedia article
wikipedia_url
URL to Wikipedia article for the taxon
count
Number of observations of this taxon
descendant_obs_count
Number of observations, including children
Methods
- __init__(id=None, uuid=None, ancestry=None, ancestor_ids=NOTHING, complete_rank=None, complete_species_count=None, created_at=None, current_synonymous_taxon_ids=NOTHING, extinct=None, gbif_id=None, iconic_taxon_id=0, iconic_taxon_name=None, is_active=None, listed_places=None, listed_taxa_count=None, matched_term=None, name=None, names=NOTHING, observations_count=None, parent_id=None, preferred_common_name='', preferred_establishment_means=None, rank_level=None, reference_url=None, ranges=None, rank=None, taxon_changes_count=None, taxon_schemes_count=None, vision=None, wikipedia_summary=None, wikipedia_url=None, artificial=False, partial=False, indent_level=None, ancestors=NOTHING, children=NOTHING, conservation_status=None, conservation_statuses=NOTHING, default_photo=None, establishment_means=None, listed_taxa=NOTHING, taxon_photos=NOTHING, count=0, descendant_obs_count=0) None¶
Method generated by attrs for class TaxonCount.
- classmethod copy(obj) BaseModel¶
Copy a model object. This is defined as a classmethod to easily initialize a subclass from a parent class instance. For copying an instance to the same type,
copy.deepcopy()can be used.- Return type:
- flatten(hide_root=False) List[Taxon]¶
Return this taxon and all its descendants as a flat list.
Taxon.indent_levelis set to indicate the tree depth of each taxon.- Parameters:
hide_root (
bool) – Exclude the current taxon from the list if it was automatically inserted bymake_tree()- Return type:
- classmethod from_json(value, user_id=None, **kwargs) TaxonCount¶
Flatten out count + taxon fields into a single-level dict before initializing
- Return type:
- classmethod from_json_file(value) List[T]¶
Initialize a collection of model objects from a JSON string, file path, or file-like object
- classmethod from_json_list(value, **kwargs) List[T]¶
Initialize a collection of model objects from an API response or response results