Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
KatrionaGoldmann opened this issue May 15, 2023 · 3 comments
Open

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

KatrionaGoldmann opened this issue May 15, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@KatrionaGoldmann
Copy link
Member

KatrionaGoldmann commented May 15, 2023

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 KatrionaGoldmann added bug Something isn't working invalid This doesn't seem right labels May 15, 2023
@KatrionaGoldmann KatrionaGoldmann self-assigned this May 15, 2023
@KatrionaGoldmann KatrionaGoldmann moved this to 🥚 Todo in AMBER May 15, 2023
@KatrionaGoldmann
Copy link
Member Author

  • Quick fix: add a catch to skip over these cases (completed in d259c59)

@DavidRoy
Copy link
Member

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
Copy link
Member Author

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

  • returning rank=Genus:

    • Coleophora albicans
    • Agonopterix umbellana
    • Macaria notata
    • Xanthorhoe ferrugata
    • Agrotis spinifera
    • Orthosia cruda
    • Swammerdamia
    • Ochsenheimeria urella
  • returning no rank:

    • Cyrtogramme melagynalis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🥚 Todo
Development

No branches or pull requests

3 participants