Additional rbison functionality

Scott Chamberlain

2020-06-08

The function bison() is sort of the main interface to searching for data in rbison, covered in the vignette rbison introduction. However, there are many other functions.

Load rbison

library('rbison')

Data provider statistics

BISON exposes an API supporting access to Data Provider and Resource based data access statistics.

out <- bison_stats(what='wms')
out$Arctos
out$Harvard_University_Herbaria
out$ZooKeys

Data provider information

head(bison_providers(provider_no=131))
out <- bison_providers(details=TRUE)
out$National_Herbarium_of_New_South_Wales

The Solr taxonomic name endpoint

Search for and collect taxonomic name data from the USGS Bison API using solr.

bison_tax(query="*bear")

Exact argument, here nothing found with latter call as *bear doesn’t exist, which makes sense

bison_tax(query="*bear", exact=FALSE)
bison_tax(query="*bear", exact=TRUE)

Using solr arguments (not all Solr arguments work). Return a certain number of rows

bison_tax(query="*bear", method="vernacularName", rows=3)

Return certain fields

bison_tax(query="*bear", method="vernacularName", fl='vernacularName')

The solr occurrence data endpoint

Search for and collect occurrence data from the USGS Bison API using their solr endpoint.

bison_solr(scientificName='Ursus americanus', computedStateFips='02',
 fl="scientificName", rows=3)
bison_solr(scientificName='Ursus americanus', computedStateFips='02',
 rows=3, fl="scientificName,decimalLongitude,decimalLatitude")
bison_solr(TSNs = 174670, rows=2)$points[,1:6]
bison_solr(kingdom = "Plantae", rows=2)$points[,1:6]

Using additional solr fields - Faceting

bison_solr(scientificName='Helianthus annuus', rows=0, facet='true',
 facet.field='computedStateFips')

Highlighting

bison_solr(scientificName='Helianthus annuus', rows=1, hl='true',
 hl.fl='scientificName')