ebirdgeo: Sightings at location determined by latitude/longitude

View source: R/ebirdgeo.R

ebirdgeoR Documentation

Sightings at location determined by latitude/longitude

Description

Returns the most recent sighting date and specific location for the requested species of bird reported within the number of days specified and reported in the specified area.

Usage

ebirdgeo(
  species = NULL,
  lat = NULL,
  lng = NULL,
  dist = NULL,
  back = NULL,
  max = NULL,
  locale = NULL,
  provisional = FALSE,
  hotspot = FALSE,
  sleep = 0,
  key = NULL,
  ...
)

Arguments

species

Species code of the species of interest. Scientific names can be specified if wrapped around the species_code function. Defaults to NULL, so sightings for all species are returned. See eBird taxonomy for more information: https://ebird.org/science/use-ebird-data/the-ebird-taxonomy.

lat

Decimal latitude. value between -90.00 and 90.00, up to two decimal places of precision. Defaults to latitude based on IP.

lng

Decimal longitude. value between -180.00 and 180.00, up to two decimal places of precision. Defaults to longitude based on IP.

dist

Distance defining radius of interest from given lat/lng in kilometers (between 0 and 50, defaults to 25).

back

Number of days back to look for observations (between 1 and 30, defaults to 14).

max

Maximum number of result rows to return in this request (between 1 and 10000, defaults to all).

locale

Language/locale of response (when translations are available). See https://docs.oracle.com/javase/6/docs/api/java/util/Locale.html (defaults to en_US).

provisional

Should flagged records that have not been reviewed be included? (defaults to FALSE).

hotspot

Should results be limited to sightings at birding hotspots? (defaults to FALSE).

sleep

Time (in seconds) before function sends API call (defaults to zero. Set to higher number if you are using this function in a loop with many API calls).

key

eBird API key. You can obtain one from https://ebird.org/api/keygen. We strongly recommend storing it in your .Renviron file as an environment variable called EBIRD_KEY.

...

Curl options passed on to GET

Value

A data.frame containing the collected information:

"comName": species common name

"howMany": number of individuals observed, NA if only presence was noted

"lat": latitude of the location

"lng": longitude of the location

"locID": unique identifier for the location

"locName": location name

"locationPrivate": TRUE if location is not a birding hotspot

"obsDt": observation date formatted according to ISO 8601 (e.g. 'YYYY-MM-DD', or 'YYYY-MM-DD hh:mm'). Hours and minutes are excluded if the observer did not report an observation time.

"obsReviewed": TRUE if observation has been reviewed, FALSE otherwise

"obsValid": TRUE if observation has been deemed valid by either the automatic filters or a regional viewer, FALSE otherwise

"sciName" species' scientific name

Author(s)

Rafael Maia rm72@zips.uakron.edu, Sebastian Pardo sebpardo@gmail.com

References

http://ebird.org/

Examples

## Not run: 
ebirdgeo('amegfi', 42, -76) # American Goldfinch
ebirdgeo(species_code('spinus tristis'), 42, -76) # same as above
ebirdgeo(lat=42, lng=-76, max=10, provisional=TRUE, hotspot=TRUE)
ebirdgeo(species_code('Anas platyrhynchos'), 39, -121, max=5)
library('httr')
ebirdgeo(species_code('Anas platyrhynchos'), 39, -121, max=5, config=verbose())
ebirdgeo(species_code('Anas platyrhynchos'), 39, -121, max=5, config=progress())
# ebirdgeo(species_code('Anas platyrhynchos'), 39, -121, max=5, config=timeout(0.1))

## End(Not run)

ropensci/rebird documentation built on Nov. 27, 2024, 9:47 p.m.