ropensci / spocc

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

occ function not downloading gbif data #232

Closed AMBarbosa closed 3 years ago

AMBarbosa commented 3 years ago

Dear colleagues,

like rgbif::occ_data #https://github.com/ropensci/rgbif/issues/431, spocc::occ is currently not downloading data from GBIF, apparently due to some column length inconsistency:

library(spocc)
occ(query = "Turdus merula", from = c("gbif", "bison", "inat", "ebird", "ecoengine", "vertnet"))

2 3 Searched: gbif, bison, inat, ebird, ecoengine, vertnet Occurrences - Found: 49,568, Returned: 1,006 Search type: Scientific bison: Turdus merula (5) inat: Turdus merula (500) ecoengine: Turdus merula (1) vertnet: Turdus merula (500) Warning messages: 1: gbif: No records returned in GBIF for Turdus merula 2: gbif: Column 44 of item 1 is length 4 inconsistent with column 1 which is length 300. Only length-1 columns are recycled. 3: ebird: No records returned in eBird for Turdus merula 4: ebird: You must provide an API key from eBird. You can pass it to the 'key' argument or store it as an environment variable called EBIRD_KEY in your .Renviron file. If you don't have a key, you can obtain one from: https://ebird.org/api/keygen.

sessionInfo()

R version 4.0.0 (2020-04-24) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale: [1] LC_COLLATE=Portuguese_Portugal.1252 [2] LC_CTYPE=Portuguese_Portugal.1252
[3] LC_MONETARY=Portuguese_Portugal.1252 [4] LC_NUMERIC=C
[5] LC_TIME=Portuguese_Portugal.1252

attached base packages: [1] stats graphics grDevices utils datasets methods
[7] base

other attached packages: [1] spocc_1.0.8 sp_1.4-1

loaded via a namespace (and not attached): [1] Rcpp_1.0.4.6 pillar_1.4.4 compiler_4.0.0
[4] plyr_1.8.6 tools_4.0.0 uuid_0.1-4
[7] lubridate_1.7.8 jsonlite_1.6.1 lifecycle_0.2.0
[10] tibble_3.0.1 gtable_0.3.0 lattice_0.20-41
[13] rgbif_3.2.0 pkgconfig_2.0.3 rlang_0.4.6
[16] rstudioapi_0.11 mapproj_1.2.7 curl_4.3
[19] crul_0.9.0 rbison_0.8.0 ridigbio_0.3.5
[22] xml2_1.3.2 stringr_1.4.0 dplyr_0.8.5
[25] httr_1.4.1 rgeos_0.5-3 generics_0.0.2
[28] vctrs_0.3.0 maps_3.3.0 triebeard_0.3.0
[31] rvertnet_0.8.0 grid_4.0.0 rebird_1.1.0
[34] tidyselect_1.1.0 httpcode_0.3.0 geoaxe_0.1.0
[37] glue_1.4.0 data.table_1.12.8 R6_2.4.1
[40] oai_0.3.0 conditionz_0.1.0 whisker_0.4
[43] purrr_0.3.4 ggplot2_3.3.0 magrittr_1.5
[46] urltools_1.7.3 scales_1.1.1 ellipsis_0.3.0
[49] assertthat_0.2.1 colorspace_1.4-1 stringi_1.4.6
[52] lazyeval_0.2.2 munsell_0.5.0 crayon_1.3.4

sckott commented 3 years ago

thanks for opening the issue @AMBarbosa !

this is an rgbif problem, not a problem in spocc. this should already be fixed in rgbif, via ropensci/rgbif#427

install like remotes::install_github("ropensci/rgbif") or install.packages("rgbif", repos="https://dev.ropensci.org")