RecentNearby {lifeR} | R Documentation |
Recent nearby eBird observations
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
)
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 |
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. |
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.
An object of class "recent_obs" with the following elements:
The type of query performed.
List of query parameters passed in request.
data frame of observations returned from query; if no
observations are returned, obs
is NULL
. Columns include:
The (usually) six-letter species code, see https://science.ebird.org/en/use-ebird-data/the-ebird-taxonomy/
Species' common name.
Species' scientific name.
eBird identifier of the location.
Name of the location.
Observation date as character string in the format "YYYY-MM-DD HH:MM".
Number of individuals.
Decimal latitude.
Decimal longitude.
Logical indicating if observation marked as valid.
Logical indicating if observation has been reviewed.
Logical indicating whether or not location is designated as private.
Checklist ID for this observation.
## Not run:
# 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)
## End(Not run)