Recent nearby eBird observations
Usage
RecentNearby(
key,
lat = 32.241,
lng = -110.938,
dist = 50,
back = 4,
hotspot = TRUE,
include_provisional = FALSE,
max_tries = 5,
timeout_sec = 30,
verbose = TRUE
)
Arguments
- key
Character eBird API key.
- lat
Numeric latitude; use negative values for southern latitudes (i.e. -46.86, not "46.86 S).
- lng
Numeric longitude; use negative values for western longitudes (i.e. -72.08, not "72.08 W").
- dist
Numeric radius in kilometers of distance from geographic center point given by
lat
andlng
from which to return recent observations.- back
Integer number of days back to search for observations.
- hotspot
Logical indicating whether or not to restrict results to hotspot locations.
- include_provisional
Logical indicating whether or not to include observations which have not yet been reviewed.
- max_tries
Integer maximum number of query attempts to try.
- timeout_sec
Integer time to allow before query is aborted.
- verbose
Logical determining whether or not to print messages during queries.
Value
An object of class "recent_obs" with the following elements:
- query_type
The type of query performed.
- query_parameters
List of query parameters passed in request.
- obs
data frame of observations returned from query; if no observations are returned,
obs
isNULL
. Columns include:
Details
The function uses the eBird API (see https://documenter.getpostman.com/view/664302/S1ENwy59/) to query recent sightings. Queries to the eBird API require a user key; more information on obtaining a key can be found at the eBird API documentation.
Examples
if (FALSE) {
# Read eBird key in from file
key <- scan(file = "ebird-key.txt", what = "character")
# Search for observations 5 km from lat/lng coordinates
recent <- RecentNearby(key = key, lat = 32.28, lng = -111.02, dist = 5)
}