Skip to contents

Filters and retrieves data from an eBird GeoDatabase file (.gdb) using a SQL query.

Usage

get_ebird(path = NULL, species = NULL, year = NULL, month = NULL, ...)

Arguments

path

Character string specifying the file path to the eBird GeoDatabase file (.gdb).

species

Character vector of species names to filter (e.g., "Snow Goose"). If NULL, the query will not filter by species.

year

Integer vector of years to filter (e.g., 2012:2014).

month

Integer vector of months to filter (e.g., 4:5). If NULL, the query will filter by year only.

...

Additional arguments passed to terra::query(), such as select for selecting specific columns or limit to limit the number of rows returned.

Value

A SpatVector object containing the filtered eBird data.

Examples

if (FALSE) { # \dontrun{
# Example: Retrieve data for Snow Goose in April and May of 2012-2014
get_ebird(
  path = "path/to/ebird.gdb",
  species = "Snow Goose",
  year = 2012:2014,
  month = 4:5
)

# Example: Retrieve only specific columns
get_ebird(
  path = "path/to/ebird.gdb",
  species = "Snow Goose",
  year = 2012,
  select = c("COMMON_NAME", "OBSERVATION_DATE")
)} # }