A programmatic interface to the eBird database. Find out more about eBird at their website.
You can install the stable version from CRAN
install.packages("rebird")
Or the development version from Github
install.packages("devtools") devtools::install_github("ropensci/rebird")
Then load the package into the R session
library("rebird")
The eBird API server
requires users to provide an API key, which is linked to your eBird user account.
You can pass it to the 'key' argument in rebird
functions, but we highly recommend
storing it as an environment variable called EBIRD_KEY in your .Renviron file.
If you don't have a key, you can obtain one from https://ebird.org/api/keygen.
You can keep your .Renviron file in your global R home directory (R.home()
), your user's home
directory (Sys.getenv("HOME")
), or your current working directory (getwd()
). Remember
that .Renviron is loaded once when you start R, so if you add your API key to the file you will
have to restart your R session. See ?Startup
for more information on R's startup files.
Furthermore, functions now use species codes, rather than scientific names, for species-specific requests.
We've made the switch easy by providing the species_code
function, which converts a scientific name to
its species code:
species_code('sula variegata')
The species_code
function can be called within other rebird
functions, or the species code
can be specified directly.
The eBird taxonomy is internally stored in rebird
and can be called using
rebird::tax
While the internal taxonomy is kept up to date with each package release, it could be outdated if a new taxonomy is made available before the package is updated. You can obtain the latest eBird taxonomy by
new_tax <- ebirdtaxonomy()
Search for bird occurrences by latitude and longitude point
ebirdgeo(species = species_code('spinus tristis'), lat = 42, lng = -76)
Search for bird occurrences by region and species name
ebirdregion(loc = 'US', species = 'btbwar')
Search for bird occurrences by a given hotspot
ebirdregion(loc = 'L99381')
Search for a species' occurrences near a given latitude and longitude
nearestobs(species_code('branta canadensis'), 42, -76)
Search for notable sightings at a given latitude and longitude
ebirdnotable(lat = 42, lng = -70)
or a region
ebirdnotable(locID = 'US-NY-109')
Obtain a list of species reported on a specific date in a given region
ebirdhistorical(loc = 'US-VA-003', date = '2019-02-14',max = 10)
or a hotspot
ebirdhistorical(loc = 'L196159', date = '2019-02-14', fieldSet = 'full')
Obtain detailed information on any valid eBird region
ebirdregioninfo("CA-BC-GV")
or hotspot
ebirdregioninfo("L196159")
Obtain a list of eBird species codes for all species recorded in a region
ebirdregionspecies("GB-ENG-LND")
or a hotspot
ebirdregionspecies("L5803024")
Obtain a list of all subregions within an eBird region
ebirdsubregionlist("subnational1","US")
Obtain a list of checklists submitted on a given date at a region or hotspot
ebirdchecklistfeed(loc = "L207391", date = "2020-03-24", max = 5)
Obtain all information on a specific checklist
ebirdchecklist("S139153079")
Obtain a list of hotspots within a region
ebirdhotspotlist("CA-NS-HL")
or within a radius of up to 50 kilometers, from a given set of coordinates.
ebirdhotspotlist(lat = 30, lng = -90, dist = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.