munge_bbs_data: Subset BBS Data by One or More Parameters

View source: R/munge_bbs_data.R

munge_bbs_dataR Documentation

Subset BBS Data by One or More Parameters

Description

This function subsets the BBS observations using taxonomic, geospatial, or temporal features.

Usage

munge_bbs_data(
  bbs_list,
  states = NULL,
  countries = NULL,
  species = NULL,
  genera = NULL,
  order = NULL,
  family = NULL,
  zero.fill = TRUE,
  rpid = 101,
  year.range = 1966:lubridate::year(Sys.Date()),
  keep.stop.level.data = FALSE,
  QualityCurrentID = 1,
  active.only = FALSE,
  observations.output = "flat"
)

Arguments

bbs_list

A list with element "species_list", obtained from running bbsAssistant::get_bbs_data()...

states

vector of one or more states/territories/sub-national political regions (see data(region_codes))

countries

vector of one or more nations/countries (see data(region_codes))

species

A vector of one or more species (using English Common Name) to subset the data by. Capitalization ignored.

genera

vector of one or more genera to retain in data

order

vector of one or more orders to retain in data

family

vector of one or more families to retain in data

zero.fill

If TRUE and a single species is provided in 'species', this function will output list$observations with zero-filled data.

rpid

mostly for internal use. See BBS metadata documentation for more details.

year.range

value(s) of year(s) by which to subset the data. If not specified will return all data in the dataset.

keep.stop.level.data

logical TRUE will keep the stop-level data and metadata. FALSE will remove these and provide only mean values or sums.

QualityCurrentID

an index used to indicate the quality of the BBS data. See BBS metadata at USGS ScienceBase for more information. Suggest keeping this value at 1 unless you know what you're doing

active.only

Logical. If TRUE keep only active routes. Discontinued routes will be discarded.

observations.output

return the object as a list of data frames ("list") or a single data frame ("flat" or "df" or "data.frame")


TrashBirdEcology/bbsAssistant documentation built on May 20, 2022, 10:57 a.m.