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

'sp_occurrence' with 'geo=TRUE' still returns NA coordinates #9

Closed
AMBarbosa opened this issue Dec 23, 2021 · 1 comment
Closed

'sp_occurrence' with 'geo=TRUE' still returns NA coordinates #9

AMBarbosa opened this issue Dec 23, 2021 · 1 comment

Comments

@AMBarbosa
Copy link

The 'geo' argument says "only records that have a georeference (longitude and latitude values) will be downloaded", but this doesn't seem to be the case:

gf <- sp_occurrence(genus = "Daboia", species = "mauritanica", geo = F)
gt <- sp_occurrence(genus = "Daboia", species = "mauritanica", geo = T)
all.equal(gf, gt)  # TRUE
gt[ , c("lon", "lat")]  # NA coordinates still there

Cheers!

@rhijmans
Copy link
Member

Thanks very much again, again. There was a change in the GBIF API that I had not noticed. I now get:

library(geodata)
gt <- sp_occurrence(genus = "Daboia", species = "mauritanica", geo = T)
#Loading required namespace: jsonlite
#36 records found
#0-36
#36 records downloaded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants