iobis / robis

R client for the OBIS API
https://iobis.github.io/robis
Other
37 stars 11 forks source link

Specify fields in occurrence() in robis2.0.x? #49

Closed tomjwebb closed 5 years ago

tomjwebb commented 5 years ago

Am I missing something or is there no longer an option in occurrence to specify the fields to return?

Also have some of the field names changed? For instance, there is no longer depth but rather two fields, minimumDepthInMeters, maximumDepthInMeters?

For ref, I ran this query:

library(tidyverse)
library(raster)
library(robis)
library(mregions)
uk <- extent(c(-16, 4, 45, 65))
uk_poly <- as(as(uk, "SpatialPolygons"), "SpatialPolygonsDataFrame")
cal_fin <- occurrence(scientificname = "Calanus finmarchicus",
                      geometry = mr_as_wkt(uk_poly)) %>%
  as_tibble()
pieterprovoost commented 5 years ago

fields has been added in v2.1.2.

pieterprovoost commented 5 years ago

Version 2.1.4 of the package now adds depth as a polyfill as long as the API does not return depth.