Is there a tool / code snippet that allows downloading of taxonomy data from the site?

Thanks! That makes sense. Still a bit obnoxious, but much more manageable.

1 Like

you’re welcome. we all do the best we can with what we get.

@pisum Thank you - this is very helpful. Do you have an idea why the following call
https://api.inaturalist.org/v1/taxa?q=astragalus&is_active=any&per_page=500
does not include the ranks of sections and subsections?

the q= parameter initiates a search by string. if you want to look for all descendant taxa of the genus Astragalus, you need to search using taxon_id=49370 as the filter parameter in place of q=astragalus

1 Like

Thanks again!

1 Like

Synonyms can exist on any taxon. As you say they are generated as a result of a taxon change ie. the name of the ‘old’ inactive taxon becomes a synonym on the ‘new’ active taxon. I think they are sometimes added by the auto importer and can also be added manually by curators. They are just names with the Scientific Names (sci) lexicon with the ‘currently accepted?’ flag set to false.

what i was saying above was that i think as it’s technically recorded within the system, the synonyms exist only on the inactive taxon records, referring to the new replacement taxon / taxa.

do you have an example of this?

If the taxa endpoint is queried with the ‘all_names’ parameter set to ‘true’ eg: https://api.inaturalist.org/v1/taxa?q=dracopis&is_active=true&all_names=true Each taxon in the “results” array will have a “names” attribute with an array of one or more name objects. All names with “locale”: “sci” are the ‘Scientific Names’ lexicon, the “is_valid” attribute is “true” for the current name and “false” for synonyms.

ok. if you want to get the alternate / inactive scientific names like that, then i guess you would have to get the full taxonomy via the API and parse out all the alternate names that way. it may be easy or hard, depending on how many taxa you need to get.

so then to get something similar from the DWCA export, there would need to be (1) a separate names file for sci that (2) includes both active and inactive sci names (which would require modifications to the export, probably).

i still need to find a case where the alternate scientific names are manually added (as opposed to being done as a result of taxon changes) to see what exactly happens to the taxon records in such a case…

I recently did this when I added this species:
https://www.inaturalist.org/taxa/1442532-Polemonium-villosum

When curating toward POWO, I will often add all or some of the more prominent synonyms listed in POWO as non-accepted scientific names in hopes that someone trying to add one of the synonymized names later will instead be directed to iNat’s currently accepted name, and especially when there has been confusion around intended application of the iNat name.

I think it’s also important to add appropriate non-accepted scientific names when curating for a deviation from the taxonomic standard, for the same reasons.

2 Likes

ok. if folks are doing this kind of thing, then i guess these currently can be found only via the API.

Here’s a species created by the auto importer with a synonymized name added as part of that process:
https://www.inaturalist.org/taxa/1442841-Dissochaeta-fallax

And incidentally, I notice that the “synonym” in this case is also the name of an active taxon in iNaturalist, so some curator clean-up will be needed…

Hi Jane,

I was going to create a new topic, since I got you here I’ll just shoot, as the question is somewhat relevant.

I’m wondering if it’s possible to get (a selected part of) the up-to-date taxon tree of iNat, labeled with localized common name (just like those when using iNat export tool). As far as I know there is not an API for this. I’m not sure if it’s appropriate to raise a feature request, as it may not be useful to most users. But it’s surely something that iNat stuff would use (at least have a around).

What I want to do is to create guidance of editing common names for curators, https://github.com/wsyxbcl/iNat-chs-names. My current method is to use the iNat export tool, selecting the desired taxon level, do an observation-based export and then clean the data, where only a very small part is used (a waste of the iNat server resource) and it doesn’t cover taxa which do not have any observation. An taxon-based export (with common names) would be useful.

I’d liks to hear your suggestions, thanks.

By “localized” do you mean in a particular language or set to a particular iNat place?

(As an example, Willow Ptarmigan and Willow Grouse are both English common names, but the second one is set to the UK.)

Assuming you mean in a particular language, I would use the tool that pisum built and pass the language in the URL. For example, https://jumear.github.io/stirfry/iNatAPIv1_taxa.html?taxon_id=47852&locale=zh-CN will give you taxa within Fagaceae with their Simplified Chinese common names. There is an export link in the upper left.

(And I ended up moving your post to this existing topic.)

1 Like

this works fine for a limited set of taxa, but if you want Chinese names for all taxa, i would think the easiest way to get this is from the DWCA taxon export.

Sure, but the original question said “a selected part of”, and the DWCA requires an extra step (to match the Chinese names to the taxon info* via the taxon ID).

*by taxon info I mean the scientific name, ancestry, etc.

1 Like

Thank you Jane, this is what I’m looking for.
(And this is the right place, LOL.)

the DWCA requires an extra step (to match the Chinese names to the taxon info* via the taxon ID).

Indeed, and it’s also not up-to-date with iNat database.

@pisum Great job, much appreciated. API limit up to 10000 looks fine, the whole dataset I’m currently working with is around a size of 50000, I can “divide and conquer”.

2 Likes

On the other hand:
https://jumear.github.io/stirfry/iNatAPIv1_taxa.html?taxon_id=64070&is_active=any

Boechera 64070” is inactive and a synonym of “Boechera 1068235”, “Borodinia 868981”, and “Yosemitea 902757”. In the context of taxon-change-synonymy, I don’t think it’s a problem for a synonym to also be the name of an active taxon. Given that, it’s not obvious what rule set we should expect manual-list-synonymy to follow. We’re not really in the world of ICNafp-compliant names.

1 Like

In the context of iNaturalist, the intent is always to have a single active taxonomic concept for each scientific name at any given time. Otherwise iNat users would be confronted with a multiple-choice question when trying assign their chosen name to an observation, and the vast majority who are not taxonomists (and also some who are) would not know which to choose.

For purposes of iNat, “synonyms” are those visible on the Taxonomy tab of a taxon page, in the Scientific Names lexicon, at any given time. Boechera 64070 is not listed as a synonym on the taxon pages for Yosemitea, Borodinia, and Boechera 1068235. That is as it should be, since Boechera 64070 is a different and more inclusive concept for that name before it was split into three smaller genera (one of which must by rules retain the same name).

At least in the scope within which I curate plant taxa on iNaturalist, I only use (and advocate only using) ICNaft-compliant names (matters of iNat’s quirky display formatting aside). Unless I’m misunderstanding what you mean by this, taxa with non-ICNafp-compliant names should always be flagged for curator attention. This includes names that violate ICNafp Principle IV:

Each taxonomic group with a particular circumscription, position, and rank can bear only one correct name, the earliest that is in accordance with the rules, except in specified cases.