Wrapper function to access and download occurrence records from the Botanical Information and Ecology Network (BIEN) database. It provides a unified interface to query BIEN data by species, genus, family, or by geographic or political boundaries.
Usage
get_bien(by = "species", cultivated = FALSE,
new.world = NULL, all.taxonomy = FALSE, native.status = FALSE,
natives.only = TRUE, observation.type = FALSE, political.boundaries = TRUE,
collection.info = TRUE, only.geovalid = TRUE, min.lat = NULL, max.lat = NULL,
min.long = NULL, max.long = NULL, species = NULL, genus = NULL,
country = NULL, country.code = NULL, state = NULL, county = NULL,
state.code = NULL, county.code = NULL, family = NULL, sf = NULL, dir,
filename = "bien_output", file.format = "csv", compress = FALSE,
save = FALSE, verbose = TRUE, ...)Arguments
- by
(character) type of query to perform (
"box","country","county","family","genus","records_per_species","species","sf", or"state"). Default isspecies.- cultivated
(logical) whether to include cultivated records or exclude them. Default is
FALSE.- new.world
(logical) if
TRUE, restricts records to the New World, ifFALSE, to the Old World, and ifNULL, no restriction. Default isNULL.- all.taxonomy
(logical) if
TRUE, returns all taxonomic levels available, otherwise, limits results to accepted names. Default isFALSE.- native.status
(logical) if
TRUE, includes information about native versus non-native status of occurrences. Default isFALSE.- natives.only
(logical) if
TRUE, restricts results to native species only. Default isTRUE.- observation.type
(logical) if
TRUE, includes information on observation types. Default isFALSE.- political.boundaries
(logical) if
TRUE, restricts the search to defined political boundaries. Default isTRUE.- collection.info
(logical) if
TRUE, includes collection-level metadata. Default isTRUE.- only.geovalid
(logical) if
TRUE, restricts output to georeferenced and spatially valid records. Default isTRUE.- min.lat
(numeric) the minimum latitude (in decimal degrees) for a bounding-box query when
by = "box".- max.lat
(numeric) the maximum latitude (in decimal degrees) for a bounding-box query when
by = "box".- min.long
(numeric) the minimum longitude (in decimal degrees) for a bounding-box query when
by = "box".- max.long
(numeric) the maximum longitude (in decimal degrees) for a bounding-box query when
by = "box". Ignored otherwise. Default isNULL.- species
(character) species name(s) to query when
by = "species"or"records_per_species". Default isNULL.- genus
(character) genus name(s) to query when
by = "genus". Default isNULL.- country
(character) country name when
by = "country","state", or"county". Default isNULL.- country.code
(character) two-letter ISO country code corresponding to
country. Default isNULL.- state
(character) state or province name when
by = "state"or"county". Default isNULL.- county
(character) county or equivalent subdivision name when
by = "county". Default isNULL.- state.code
(character) state or province code corresponding to
state. Default isNULL.- county.code
(character) county or equivalent subdivision code corresponding to
county. Default isNULL.- family
(character) family name(s) to query when
by = "family". Default isNULL.- sf
(object of class
sf) a spatial object defining an area of interest whenby = "sf". Default isNULL.- dir
(character) directory path where the file will be saved. Required if
save = TRUE.- filename
(character) name of the output file without extension. Default is
"bien_output".- file.format
(character) file format for saving output (
"csv","rds"). Default is"csv".- compress
(logical) if
TRUEandsave = TRUE, compresses the output file as .csv.zip. Default isFALSE.- save
(logical) if
TRUE, saves the results to a CSV file. Default isFALSE.- verbose
(logical) if
TRUE, prints messages about the progress and the number of species being checked. Default isTRUE.- ...
additional arguments passed to the underlying BIEN function.
