Comments (6)
Thanks for your question @qgroom
The short answer is: I don't know for sure how to get the same behavior.
pygbif does have name_lookup
which uses the /species/search
route here https://www.gbif.org/developer/species#searching - more of a full text search of names. That method gets closer, but still gives a lot of results of the a ending:
from pygbif import species
z = species.name_lookup(q='Lantanophaga pusillidactyla', status = "ACCEPTED")
In [14]: [ w['scientificName'] for w in z['results'] ]
Out[14]:
['Lantanophaga pusillidactyla',
'Lantanophaga pusillidactyla (Walker, 1864)',
'Lantanophaga pusillidactyla (Walker, 1864)',
'Lantanophaga pusillidactyla (Walker, 1864)',
'Lantanophaga pusillidactyla (Walker, 1864)',
'Lantanophaga pusillidactyla (Walker, 1864)',
'Lantanophaga pusillidactyla (Walker, 1864)',
'Lantanophaga pusillidactyla (Walker, 1864)',
'Lantanophaga pusillidactyla Walker 1864',
'Lantanophaga pusillidactyla (Walker, 1864)',
'Lantanophaga pusillidactyla (Walker, 1864)',
'Lantanophaga pusillidactyla (Walker, 1864)',
'Lantanophaga pusillidactyla (Walker, 1864)',
'Lantanophaga pusillidactyla (Walker, 1864)',
'Lantanophaga pusillidactylus (Walker, 1864)',
'Lantanophaga pusillidactylus (Walker, 1864)',
'Lantanophaga pusillidactylus (Walker, 1864)',
'Lantanophaga pusillidactylus (Walker, 1864)',
'Lantanophaga pussillidactyla (Walker, 1864)',
# cutoff ...]
I had a look at the gbif site with browser dev tools, but i think it's a slightly different internal set of APIs they're using.
@timrobertson100 any thoughts on how to replicate what the gbif website does wrt name searching?
from pygbif.
The species match API might be what you are looking for?
http://api.gbif.org/v1/species/match?name=Lantanophaga%20pusillidactyla
Or for species search it might be good to include a datasetKey=backbone
https://api.gbif.org/v1/species/search?q=Lantanophaga%20pusillidactyla&datasetKey=d7dddbf4-2cf0-4f39-9b2a-bb099caae36c
does that help?
from pygbif.
thanks @MortenHofft - right, we have that route implemented in name_backbone
method
Perhaps species.name_backbone('Lantanophaga pusillidactyla')
does what you want @qgroom
from pygbif.
Thanks, I'll give it a try and get back to you.
from pygbif.
Yes, that works. Perhaps a note is required in the documentation, but then I don't suppose anyone will read it.
from pygbif.
glad it works.
I don't suppose anyone will read it.
agree, but i guess its the right thing to do
from pygbif.
Related Issues (20)
- Support multiple download format
- Add examples to the documentation of newly implemented features
- Check operators and look-up tables
- add_predicate update
- Option "verbatim" in method species.name_usage throws error for specific taxon HOT 2
- Check if eventDate changes impact PyGBIF HOT 1
- Readthedocs maintainers HOT 4
- Download with taxonKey produces 401 check your number of active downloads. HOT 2
- Provide conversion utility that could create a SIMPLE_CSV format file from the more complete DWCA format download HOT 8
- cannot import name 'remove_expired_responses' from 'requests_cache' HOT 2
- update the configuration file for readthedocs HOT 1
- ImportError: cannot import name 'remove_expired_responses' from 'requests_cache' HOT 1
- make tests more robust to data changes HOT 1
- Add support for extension downloads HOT 1
- Examine package distribution release with GitHub Actions
- add support for occ.download_describe
- return pandas df an keep functionality of dict HOT 3
- can't use caching: AttributeError: module 'requests_cache' has no attribute 'delete' HOT 7
- feature request: live-caching system HOT 1
- Update to requirements.txt file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygbif.