rbison

knitr::opts_chunk$set(
  fig.path = "man/figures/",
  cache.path = "inst/readmecache/",
  comment = "#>",
  collapse = TRUE,
  warning = FALSE,
  message = FALSE
)

cran checks R-CMD-check codecov.io rstudio mirror downloads cran version

Wrapper for the USGS Bison (https://bison.usgs.gov) API

Description

USGS Biodiversity Information Serving Our Nation (BISON) is a web-based federal mapping resource that provides access to georeferenced (those with latitude and longitude coordinates) and non-georeferenced data describing the occurrence or presence of terrestrial and aquatic species recorded or collected by a person (or instrument) at a specific time in the United States, U.S. Territories, U.S. Marine Exclusive Economic Zones (EEZs), and Canada. Each record in a species occurrence dataset available in BISON will typically consist of a scientific name (genus and specific epithet), a date, and one or more geographic references such as a state name, county name, and/or decimal latitude and longitude coordinates. In addition to these typical data fields, species occurrence datasets often include many other data fields that describe each species occurrence event in more detail.

BISON is the US Node of GBIF and regularly updates from GBIF to have full coverage and is committed to eventually providing most BISON originating data to GBIF, however, users should be aware that several million BISON records are not in GBIF. The Solr API for BISON is fully open with no limits, allowing full batch download, faceting and geospatial searches on both DC fields and BISON added fields such as the full ITIS taxonomy, FIPS Codes, and georeferencing of county records to documented centroids.

rbison allows one to pull species occurrence data from these datasets, inspect species occurance summaries, and then map species occurance within the US, within the contiguous 48 states, and/or at county or state level.

Current data providers for BISON can be found at https://bison.usgs.gov/providers.jsp

See https://bison.usgs.gov/doc/api.jsp for API docs for the BISON API.

Installation

From CRAN

install.packages("rbison")

Or the development version from Github

remotes::install_github("ropensci/rbison")

Load package

library("rbison")

Notice that the function bisonmap automagically selects the map extent to plot for you, being one of the contiguous lower 48 states, or the lower 48 plus AK and HI, or a global map. If some or all points outside the US, a global map is drawn, and throws a warning. . You may want to make sure the occurrence lat/long coordinates are correct.

get data

out <- bison(species = "Phocoenoides dalli dalli", count = 10)

inspect summary

out$summary

map occurrences

bisonmap(out)

All points within the US (including AK and HI)

get data

out <- bison(species = "Cyanocitta stelleri", count = 500)

inspect summary

out$summary

map occurrences

bisonmap(out)

All points within the contiguous 48 states

get data

out <- bison(species = "Aquila chrysaetos", count = 300)

inspect summary

out$summary

map occurrences

bisonmap(out)

Map county or state level data

Counties - using last data call for Aquila

bisonmap(out, tomap = "county")

States - using last data call for Aquila

bisonmap(out, tomap = "state")

BISON SOLR interface

taxa

The taxa service searches for and gives back taxonomic names

bison_tax(query = "*bear")

And you can search by scientific name

bison_tax(query = "Helianthus*", method = "scientificName")

occurrence search

The occurrence service searches by scientific names and gives back occurrence data similar to data given back by the bison() function

Searching for data and looking at output

x <- bison_solr(scientificName = "Aquila chrysaetos", rows = 10, 
    fl = "scientificName,decimalLongitude,decimalLatitude")
x$points

Mapping the data

out <- bison_solr(scientificName = "Aquila chrysaetos", rows = 1000)
bisonmap(out)

Meta

This package is part of a richer suite called SPOCC Species Occurrence Data (https://github.com/ropensci/spocc), along with several other packages, that provide access to occurrence records from multiple databases. We recommend using SPOCC as the primary R interface to rbison unless your needs are limited to this single source.

ropensci_footer



ropensci/rbison documentation built on May 18, 2022, 6:31 p.m.