ropensci / spocc

Species occurrence data toolkit for R
https://docs.ropensci.org/spocc
Other
116 stars 27 forks source link

gbif new deployment and “georeferenced” parameter #56

Closed sghignone closed 10 years ago

sghignone commented 10 years ago

Hello everybody, sorry but I'm very new to spocc, so forgive me for being eventually not precise... Yesterday I started playing with spocc, and everything was ok in morning (april, 9). After a while nothing was working (see below the error). Today I heard GBIF developpers, and they told me that yesterday they deployed a new version of our portal, and that, in this new version, the “georeferenced” parameter has been renamed to HAS_COORDINATE. Are you aware of this? Which is the affected libraries update schedule, if any? Thanks a lot. Regards, Stefano

The error:

library("spocc") spp <- c('Danaus plexippus','Accipiter striatus','Pinus contorta') dat <- occ(query = spp, from = 'gbif', gbifopts = list(georeferenced=TRUE)) Error in data.frame(name = name, key = key, rank = row.names(name), row.names = NULL) : arguments imply differing number of rows: 6, 7

sckott commented 10 years ago

Hi @sghignone - Thanks for the heads up! We didn't know about this change. I will get this fixed asap, probably by 1030 PST or so.

sckott commented 10 years ago

hey again @sghignone - Looks like the field names have changed,, e,.g,

Pushing fix soon - this needs a fix in the rgbif package, which is used within spocc, so you'll need to update both pkgs

sckott commented 10 years ago

@sghignone the hasCoordinate field is an additional field that is related to the georeferenced parameter - see http://www.gbif.org/developer/occurrence#p_hasCoordinate

so fi you say hasCoordinate=TRUE, you get records that have data for both lat and long, whereas georeferenced=TRUE requires data in one of lat or long, but doesn't require data in both fields

sckott commented 10 years ago

woops, mean to reference this issue from rgbif commit ropensci/rgbif#70

sckott commented 10 years ago

A new version of rgbif is on CRAN http://cran.r-project.org/web/packages/rgbif/index.html

Closing