AMI-system / species_classifier

This repository contains the code to create on-device machine learning models for species classification.
MIT License
2 stars 0 forks source link

GBIF returning genus results for some rank='species' #7

Open KatrionaGoldmann opened 1 year ago

KatrionaGoldmann commented 1 year ago

GBIF results are called with data = species_api.name_backbone(name=name, strict=True, rank="SPECIES")

However, some of the calls return 'rank': 'GENUS' results.

Examples:

data = species_api.name_backbone(name='Macaria notata', strict=True, rank="SPECIES")

gives:

{'usageKey': 3256294, 'scientificName': 'Macaria Curtis, 1826', 
    'canonicalName': 'Macaria', 'rank': 'GENUS', 'status': 'ACCEPTED', 
    'confidence': 98, 'matchType': 'HIGHERRANK', 'kingdom': 'Animalia', 
    'phylum': 'Arthropoda', 'order': 'Lepidoptera', 'family': 'Geometridae', 
    'genus': 'Macaria', 'kingdomKey': 1, 'phylumKey': 54, 'classKey': 216, 
    'orderKey': 797, 'familyKey': 6950, 'genusKey': 3256294, 
    'synonym': False, 'class': 'Insecta'}

Not sure why since https://api.gbif.org/v1/species?name=Macaria%20notata returns species as the first result

KatrionaGoldmann commented 1 year ago
DavidRoy commented 1 year ago

Gbif consider this name as a synonym, e.g. https://www.gbif.org/species/5880550. can you list all cases where the match is not to rank=species

KatrionaGoldmann commented 1 year ago

I see, that makes sense. The problem cases are: