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:
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()
Sightings at location determined by latitude/longitude
Search for bird occurrences by latitude and longitude point
ebirdhotspotlist("CA-NS-HL")
#> # A tibble: 298 × 9
#> locId locName countryCode subnational1Code subnational2Code lat lng
#> <chr> <chr> <chr> <chr> <chr> <dbl> <dbl>
#> 1 L2334369 Abraham … CA CA-NS CA-NS-HL 45.2 -62.6
#> 2 L7003818 Admiral … CA CA-NS CA-NS-HL 44.7 -63.7
#> 3 L1765807 Admiral … CA CA-NS CA-NS-HL 44.8 -63.1
#> 4 L12227034 Armdale-… CA CA-NS CA-NS-HL 44.6 -63.6
#> 5 L12690538 Armdale-… CA CA-NS CA-NS-HL 44.6 -63.6
#> 6 L2390509 Bald Roc… CA CA-NS CA-NS-HL 44.5 -63.6
#> 7 L7598385 Bayers L… CA CA-NS CA-NS-HL 44.6 -63.7
#> 8 L11019120 Beaver B… CA CA-NS CA-NS-HL 44.8 -63.7
#> 9 L1872934 Bedford … CA CA-NS CA-NS-HL 44.7 -63.7
#> 10 L12134597 Bedford-… CA CA-NS CA-NS-HL 44.7 -63.7
#> # ℹ 288 more rows
#> # ℹ 2 more variables: latestObsDt <chr>, numSpeciesAllTime <int>
or within a radius of up to 50 kilometers, from a given set of
coordinates.
ebirdhotspotlist(lat = 30, lng = -90, dist = 10)
#> No region code provided, locating hotspots using lat/lng
#> # A tibble: 54 × 9
#> locId locName countryCode subnational1Code subnational2Code lat lng
#> <chr> <chr> <chr> <chr> <chr> <dbl> <dbl>
#> 1 L6025517 Algiers … US US-LA US-LA-071 30.0 -90.1
#> 2 L3886471 Armstron… US US-LA US-LA-071 30.0 -90.1
#> 3 L727179 Audubon … US US-LA US-LA-071 30.0 -90.0
#> 4 L6665071 BAEA Nes… US US-LA US-LA-087 30.0 -90.0
#> 5 L6666949 BAEA Nes… US US-LA US-LA-071 29.9 -90.0
#> 6 L2423926 Bayou Bi… US US-LA US-LA-071 30.0 -90.0
#> 7 L725034 Bayou Sa… US US-LA US-LA-071 30.1 -89.9
#> 8 L37730406 Bayou Sa… US US-LA US-LA-071 30.1 -89.9
#> 9 L727232 Chalmett… US US-LA US-LA-087 29.9 -90.0
#> 10 L453412 City Par… US US-LA US-LA-071 30.0 -90.1
#> # ℹ 44 more rows
#> # ℹ 2 more variables: latestObsDt <chr>, numSpeciesAllTime <int>
rebird and other packages
How to use rebird
This package is part of a richer suite called spocc - Species
Occurrence Data, along with several
other packages, that provide access to occurrence records from multiple
databases. We recommend using spocc as the primary R interface to
rebird unless your needs are limited to this single source.
auk vs. rebird
Those interested in eBird data may also want to consider
auk, an R package
that helps extracting and processing the whole eBird dataset. The
functions in rebird are faster but mostly limited to accessing recent
(i.e. within the last 30 days) observations, although ebirdfreq() does
provide historical frequency of observation data. In contrast, auk
gives access to the full set of ~ 500 million eBird observations. For
most ecological applications, users will require auk; however, for
some use cases, e.g. building tools for birders, rebird provides a
quicker and easier way to access data. rebird and auk are both part
of the rOpenSci project.
API requests covered by rebird
The 2.0 APIs have considerably been expanded from the previous version,
and rebird only covers some of them. The webservices covered are
listed below; if you’d like to contribute wrappers to APIs not yet
covered by this package, feel free to submit a pull request!
data/obs
Recent observations in a region: ebirdregion()
Recent notable observations in a region: ebirdnotable()
Recent observations of a species in a region: ebirdregion()
Recent nearby observations: ebirdgeo()
Recent nearby observations of a species: ebirdgeo()
Get citation information for rebird in R doing
citation(package = 'rebird')
Please note that the ‘rebird’ project is released with a Contributor
Code of
Conduct.
By contributing to this project, you agree to abide by its terms.
rebird: wrapper to the eBird API
rebirdis a package to interface with the eBird webservices.eBird is a real-time, online bird checklist program. For more information, visit their website: https://ebird.org/home
The API for the eBird webservices can be accessed here: https://documenter.getpostman.com/view/664302/S1ENwy59?version=latest
Install
You can install the stable version from CRAN
Or the development version from Github
Direct use of
rebirdLoad the package:
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
rebirdfunctions, 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?Startupfor 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_codefunction, which converts a scientific name to its species code:The
species_codefunction can be called within otherrebirdfunctions, or the species code can be specified directly.eBird Taxonomy
The eBird taxonomy is internally stored in
rebirdand can be called usingWhile 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
Sightings at location determined by latitude/longitude
Search for bird occurrences by latitude and longitude point
Recent observations at a region
Search for bird occurrences by region and species name
Recent observations at hotspots
Search for bird occurrences by a given hotspot
Nearest observations of a species
Search for a species’ occurrences near a given latitude and longitude
Recent notable sightings
Search for notable sightings at a given latitude and longitude
or a region
Historic Observations
Obtain a list of species reported on a specific date in a given region
or a hotspot
Information on a given region or hotspot
Obtain detailed information on any valid eBird region
or hotspot
Obtain a list of eBird species codes for all species recorded in a region
or a hotspot
Obtain a list of all subregions within an eBird region
Checklist Feed
Obtain a list of checklists submitted on a given date at a region or hotspot
View Checklist
Obtain all information on a specific checklist
Hotspots in a region or nearby coordinates
Obtain a list of hotspots within a region
or within a radius of up to 50 kilometers, from a given set of coordinates.
rebirdand other packagesHow to use
rebirdThis package is part of a richer suite called spocc - Species Occurrence Data, along with several other packages, that provide access to occurrence records from multiple databases. We recommend using
spoccas the primary R interface torebirdunless your needs are limited to this single source.aukvs.rebirdThose interested in eBird data may also want to consider
auk, an R package that helps extracting and processing the whole eBird dataset. The functions inrebirdare faster but mostly limited to accessing recent (i.e. within the last 30 days) observations, althoughebirdfreq()does provide historical frequency of observation data. In contrast,aukgives access to the full set of ~ 500 million eBird observations. For most ecological applications, users will requireauk; however, for some use cases, e.g. building tools for birders,rebirdprovides a quicker and easier way to access data.rebirdandaukare both part of the rOpenSci project.API requests covered by
rebirdThe 2.0 APIs have considerably been expanded from the previous version, and
rebirdonly covers some of them. The webservices covered are listed below; if you’d like to contribute wrappers to APIs not yet covered by this package, feel free to submit a pull request!data/obs
ebirdregion()ebirdnotable()ebirdregion()ebirdgeo()ebirdgeo()nearestobs()ebirdnotable()ebirdhistorical()product
ebirdchecklistfeed()ebirdregionspecies()ebirdchecklist()ref/geo
ref/hotspot
ebirdhotspotlist()ebirdhotspotlist()ebirdregioninfo()ref/taxonomy
ebirdtaxonomy()ebirdtaxonomyversion()ref/region
ebirdregioninfo()ebirdsubregionlist()Meta
rebirdin R doingcitation(package = 'rebird')