[R-sig-Geo] Problems with gbif function in package dismo

Tim Bean timbean at gmail.com
Wed Jun 15 22:41:35 CEST 2016


Hello r-sig-geo,
The gbif function in package dismo does not appear to be functioning. No
matter what genus/species combination I try, the function finds 0 records.
For example:

sp.occur <- gbif(genus='Erethizon', species='', geo=TRUE)

Returns "0 records found."

I've tried to go through the underlying code to generate the gbif API call,
for example:

http://api.gbif.org/v1/occurrence/search?scientificname=Erethizon+dorsatum&limit=1

which returns:

{"offset":0,"limit":1,"endOfRecords":true,"count":0,"results":[],"facets":[]}

The GBIF API documentation suggests that perhaps that should be:

http://api.gbif.org/v1/occurrence/search?scientificName=Erethizon+dorsatum&limit=1

(note "scientificName" with capital 'N'), but I get no results with that
either.

However, identifying the genusKey:

http://api.gbif.org/v1/species/match?genus=Erethizon

which returns genusKey=2437593

and using that to search occurrence records:

http://api.gbif.org/v1/occurrence/search?genusKey=2437593

produces the expected results. Is anybody else having problems with the
dismo function? Does anybody know if GBIF has updated their API? Am I
missing something obvious?

Thanks,
Tim

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list