Releases: ropensci/rgbif
Releases · ropensci/rgbif
rgbif v0.9.3
NEW FEATURES
occ_data()andocc_search()gain ability to more flexibly deal with inputs to the
geometryparameter. Previously, long WKT strings passed toocc_search()or
occ_data()would fail because URIs can only be so long. Another option is to use
the download API (see?downloads). This version adds the ability to choose what to
do with long WKT strings via thegeom_bigparameter:asis(same as previous version),
bboxwhich detects if a WKT sting is likely too long, and creates a bounding box from the
WKT string then once data is retrived, clips the result to the original WKT string;axe
uses thegeoaxepackage to chop up the input WKT polygon into many, with toggles in the
new parametersgeom_sizeandgeom_n. (#197) (#199)- As part of this change, when >1 geometry value passed, or if
geom_big="axe", then
named elements of the output get namesgeom1,geom2,geom3, etc. instead of the
input WKT strings - this is because WKT strings can be very long, and make for very
awkward named access to elements. The original WKT strings can still be accessed via
attr(result, "args")$geometry
MINOR IMPROVEMENTS
- code tidying throughout the package
BUG FIXES
- Fix parsing bug in
name_usage()function, see commit e88cf01cc11cb238d44222346eaeff001c0c637e - Fix to tests to use new
testthatfxn names, e.g.,expect_gt()
instead ofexpect_more_than() - Fix to
occ_download()to parse error correctly when empty body passed from
GBIF (#202)
gbif v0.9.2
NEW FEATURES
- New function
occ_data()- its primary purpose to perform faster data requests. Whereas
occ_search()gives you lots of data, including taxonomic hierarchies and media records,
occ_data()only gives occurrence data. (#190)
MINOR IMPROVEMENTS
- Replaced
XMLwithxml2(#192) - Speed ups to the following functions due to use of
data.table::rbindlist()for
fast list to data.frame coercion:name_lookup(),name_backbone(),name_suggest(),
name_usage(), andparsenames()(#191) - Changes to
httrusage to comply with changes inhttr >= v1.1.0: now setting
encoding explicitly toUTF-8and parsing all data manually, using the internal
functionfunction(x) content(x, "text", encoding = "UTF-8")(#195)
BUG FIXES
- Fix to internal function
move_col()to not fail on fields that don't exist.
Was failing sometimes when no latitude or longitude columns were returned. (#196)
rgbif v0.9.0
NEW FEATURES
- New set of functions (
gbif_oai_*()) for working with
GBIF registry OAI-PMH service. Now importingoaipackage to
make working with GBIF's OAI-PMH service easier (#183) - Added code of conduct (#180)
- Now sending user-agent header with all requests from this
package to GBIF's servers indicating what version of rgbif
and that it's an ropensci package. Looks like
r-curl/0.9.4 httr/1.0.0 rOpenSci(rgbif/0.9.0), with whatever
versions of each package you're using. We also pass a user-agent
string with the headerX-USER-AGENTin case theuseragent
header gets stripped somewhere along the line (#185) - New function
gbif_citation()helps get citations for datasets
eith using the occurrence search API viaocc_search()or the
downloads API viaocc_downlad()(#178) (#179)
MINOR IMPROVEMENTS
- Using
importFrominstead ofimportin all cases now. - Parameter
collectorNamechanged torecordedBy(#184)
BUG FIXES
rgbif v0.8.9
MINOR IMPROVEMENTS
- Updated
terraformer.jsjavascript code included in the package
along with an update in that codebase (#156) - The
emailparameter nowNULLby default in the function
occ_download(), so that if not provided or not set in options,
then function fails. (#173) - Additional explanation added to the
?downloadshelp file. - Added internal checks to
elevation()to check for coordinates that
are impossible (e.g., latitude > 90), not complete (e.g., lat given,
long not given), or points at0,0(just warns, doesn't stop). (#176)
thanks @luisDVA - General code tidying across package
BUG FIXES
- A route changed for getting images for a taxon within the
/species
route, fix to functionname_usage()(#174) - Fix to
occ_search()to remove a block of code to do synonym checking.
This block of code was used if the parameterscientificNamewas passed,
and checked if the name given was a synonym; if yes, we used the accepted
name according to the GBIF backbone taxonomy; if no, we proceeded with the
name given by the user. We removed the block of code because the GBIF
API now essentially does this behind the scenes server side. See
https://github.com/gbif/gbif-api for examples. (#175)
rgbif 0.8.8
MINOR IMPROVEMENTS
- Additional tests added for
gbif_photos()andgbif_names()(#170)
BUG FIXES
- Fixed a few tests that were not passing on CRAN.
rgbif v0.8.6
NEW FEATURES
- New set of functions with names
occ_download*()for working with the GBIF download API. This is the same service as using the GBIF website, but via an API. See?downloads. (#154) (#167)
MINOR IMPROVEMENTS
- Explicitly import non-base R pkg functions, so importing from
utils,methods, andstats(#166)
BUG FIXES
- Fixed problem with
httrv1where empty list not allowed to pass to
thequeryparameter inGET(#163)
rgbif 0.8.4
NEW FEATURES
- New functions for the
/enumerationsGBIF API route:enumeration()
andenumeration_country(). Many parts of the GBIF API make use of
enumerations, i.e. controlled vocabularies for specific topics - and are
available via these functions. (#152)
IMPROVEMENTS
elevation()now requires an API key (#148)- The
V8package an Import now, used to do WKT read/create with use of
the Javascript library Terraformer (http://terraformer.io/). Replaces
packagesspandrgeos, which are no longer imported (#155) - Changed
occ_search()parameterspatialIssuesto
hasGeospatialIssues(#151) - Added note to docs about difference between
/searchand/count
services, and how they work. (#150) - Added tests for habitat parameter in
name_lookup()(#149) - Dropped
plyrfrom Imports (#159) - Dropped
stringrfrom Imports (#160) - Dropped
mapsandgridpackages from Imports (#161)
BUG FIXES
- Looping over records with
limitandstartparameters was in some
cases resulting in duplicate records returned. Problem fixed. (#157)
v0.8.0
IMPROVEMENTS
- All example moved to
\dontrun(#139) - README fixes for html (#141)
- Fixed documentation in
occ_search()to give correct values for default and max limit
and start parameters (#145) - Changed internal
GEThelper function to properly pass on error message (#144) - Replaced
assertthat::assert_that()withstopifnot()to have one less dependency (#134) - Fixed
occ_search()to allow ability to query by only publishingCountry, that is, with no
other parameters if desired (#137)
BUG FIXES
- Fixed bug in internal
GET()helper function to just passNULLto thequeryparameter when
the list of length 0 passed, since it caused requests to fail in some cases. - Fix to
name_lookup()to force a logical entry for certain parameters - before this fix
if the correct logical param was not passed, the GBIF API went with its default parameter (#135) - Fixed bug in
name_backbone()due to change innamelkupparser()helper function - fixes
parsing for verbose output (#136) - Fixed some broken URLs in
occ_search()documentation (#140)
v0.7.7
rgbif 0.7.7
NEW FEATURES
- New function
occ_issues()to subset data fromocc_search()based on GBIF issues. (#) (#122) - Related to the last bullet, GBIF issues now are returned by default in
occ_search()results, and are intentionally moved to the beginning of the column order of the data to be more obvious. (#102) occ_search()now returns all data fields by default. The default setting for thefieldsparameter isall- but can be changed. See?occ_search- New function
gbif_names()to view highlighted terms in name results from a call toname_lookup(). (#114) - New functions:
occ_issues_lookup()to lookup GBIF issues based on code name or full issue name, andgbif_issues()to print the entire issues table.
IMPROVEMENTS
- Completely replaced
RCurlwithhttr - Completely replaced
RJSONIOwithjsonlite. Should see slight performance in JSON parsing withjsonlite. - Default number of records in
occ_search()now 500; was 25. (#113) - Vignette for old version of GBIF API removed.
- New vignette for cleaning data via GBIF issues added. (#132)
- Functions for working with old GBIF API removed, now defunct. (#116)
- Now better parsing for some functions (
organizations(),datasets(),networks(),nodes(),installations()) to data.frames when possible. (#117) - Added further help to warn users when searching on ranges in latitude or longitude in
occ_search()(#123) calloptsparameter changed to...throughout all functions. Now pass on options tohttras named lists or functions. (#130)- Beware that GBIF data is becoming Darwin Core compliant - so many parameters throughout this package have changed from sentence_case to camelCase.
dataset_search()anddataset_suggest()gain new parameterpublishingOrg- Default for
limitparameter changed to 100 for dataset functions:dataset_search(),dataset_suggest(), anddatasets(). - Default for
limitparameter changed to 100 for registry functions:installations(),networks(),organizations, andnodes(). - Parameter changes in
networks():name,code,modifiedsince,startindex, andmaxresultsgone; new parametersquery,identifier,identifierType,limit, andstart - Parameter changes in
nodes(): new parametersidentifier,identifierType,limit, andstart
BUG FIXES
occ_search()failed sometimes on species that were not found. Fixed. (#112)- Added better handling of some server errors to pass on to user. (#115) (#118)
- Fixed incorrect parsing for some cases in
occ_search()(#119) - Fixed bad parsing on output from
name_lookup()(#120) - Fixed single map option in
gbif_photos()that caused map with no data. (#121) - Fixed some parameter names in
name_()functions according to changes in the GBIF API spec, and fixed documentation to align with GBIF API changes, and added note about maximum limit. (#124) (#127) (#129) Thanks to @willgearty ! - Fixed internals of
occ_search()so that user can pass in multiple values to theissueparameter. (#107) - Fixed URL to tutorial on ropensci website (#105) Thanks @fxi !
v0.7.0
rgbif 0.7.0
NEW FEATURES
occ_search()now has adplyrlike summary output whenreturn='all'. See?occ_searchfor examples. You can still easily access all data, by indexing tometa,hierarchy,data, ormediavia e.g.,$data,['data'], or[['data']]. (#95) See example below:
occ_search(taxonKey=key, fields=c('name','basisOfRecord','protocol'))Records found [8330]
Records returned [20]
No. unique hierarchies [1]
No. media records [20]
Args [taxonKey=2433407, limit=20, fields=name,basisOfRecord,protocol]
First 10 rows of data
name protocol basisOfRecord
1 Ursus americanus DWC_ARCHIVE HUMAN_OBSERVATION
2 Ursus americanus DWC_ARCHIVE HUMAN_OBSERVATION
3 Ursus americanus DWC_ARCHIVE HUMAN_OBSERVATION
4 Ursus americanus DWC_ARCHIVE HUMAN_OBSERVATION
5 Ursus americanus DWC_ARCHIVE HUMAN_OBSERVATION
6 Ursus americanus DWC_ARCHIVE HUMAN_OBSERVATION
7 Ursus americanus DWC_ARCHIVE HUMAN_OBSERVATION
8 Ursus americanus DWC_ARCHIVE HUMAN_OBSERVATION
9 Ursus americanus DWC_ARCHIVE HUMAN_OBSERVATION
10 Ursus americanus DWC_ARCHIVE HUMAN_OBSERVATION
.. ... ... ...- Media now returned from the GBIF API. Thus, in
occ_search(), we now return a media slot in the output list by default. - New function
gbif_photos()to view media files (photos in the wild or of museum specimens). Two options are available,which='map'creates a single map which presents the image when the user clicks on the point, andwhich='table'in which a table has one row for each image, presenting the image and an interactive map with the single point. (#88) See screenshots at bottom. - Two new packages are imported:
spandwhisker
IMPROVEMENTS
- GBIF updated their API, now at v1. URL endpoints in
rgbifchanged accordingly. (#92) - GBIF switched to using 2-letter country codes. Take note. (#90)
- GBIF switched all parameters to
camelCasefromunder_scorestyle - changed accordingly inrgbif. - Using package custom version of
plyr::compact()instead of importing fromplyr. - In
name_lookup()removedfacet_onlyparameter as it doesn't do anything - uselimit=0instead. Further, added two new slots of output:hierarchyandnames(for common/vernacular names) (#96). The output can be determined by user via thereturnparameter. - In
name_suggest(), if the fieldhigherClassificationMapis selected to be returned via thefieldsparameter, a list is returned with a data frame, and a list of the hierarchies separately. IfhigherClassificationMapis not selected, only a data frame is returned. occ_search()gains new parametersmediatypeandissue(#93), with detailed list of possible options for theissueparameter. Gains new examples for searching for images, examples of calls that will throw errors.- Updated the vignette.
BUG FIXES
- Added better error message to
check_wkt(). facet_onlyparameter removed fromdataset_search()function as it doesn't do anything - uselimit=0instead.- Fixed some examples that didn't work correctly.

