# bounding box of the north eastern united stats as a numeric vector
bb_vec <- c(xmin = -80, xmax = -70, ymin = 40, ymax = 47)
ebirdst_extent(bb_vec)
# bbox object
bb <- sf::st_bbox(bb_vec, crs = 4326)
ebirdst_extent(bb)
# polygon imported from a shapefile
poly <- sf::read_sf(system.file("shape/nc.shp", package="sf"))
ebirdst_extent(poly)
# subset to january
ebirdst_extent(bb, t = c("2021-01-01", "2021-01-31"))
# dates can wrap around, e.g. to use dec-jan
ebirdst_extent(bb, t = c("2021-12-01", "2021-01-31"))
# dates can also be given without an associated year
ebirdst_extent(bb, t = c("12-01", "01-31"))
Run the code above in your browser using DataLab