ebirdst_subset: Subset eBird Status and Trends data spatiotemporally

Description Usage Arguments Value Methods (by class) Examples

View source: R/ebirdst-subset.R

Description

Spatiotemporally subset the raster or tabular eBird Status and Trends data. The spatiotemporal extent should be defined using ebirdst_extent().

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
ebirdst_subset(x, ext)

## S3 method for class 'data.frame'
ebirdst_subset(x, ext)

## S3 method for class 'sf'
ebirdst_subset(x, ext)

## S3 method for class 'Raster'
ebirdst_subset(x, ext)

Arguments

x

eBird Status and Trends data to subset; either a Raster object with 52 layers (one for each week) or a data.frame with PI or PD data.

ext

ebirdst_extent object; the spatiotemporal extent to filter the data to.

Value

eBird Status and Trends data in the same format as the input data.

Methods (by class)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
# bbox for southern michigan in may
bb_vec <- c(xmin = -86, xmax = -83, ymin = 41.5, ymax = 43.5)
e <- ebirdst_extent(bb_vec, t = c("05-01", "05-31"))

# download and load example data
sp_path <- ebirdst_download("example_data")
pis <- load_pis(sp_path)
abd <- load_raster(product = "abundance", sp_path)

# subset
abd_ss <- ebirdst_subset(abd, ext = e)
pis_ss <- ebirdst_subset(pis, ext = e)

## End(Not run)

ebirdst documentation built on Jan. 16, 2021, 5:16 p.m.