rebird is a package to interface with the eBird webservices.

eBird is a real-time, online bird checklist program. For more information, visit their website: http://www.ebird.org

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

install.packages("devtools")
devtools::install_github("ropensci/rebird")

Direct use of rebird

Load the package:

library("rebird")

The eBird API server has been updated and thus there are a couple major changes in the way rebird works. API requests to eBird now require 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 https://csgillespie.github.io/efficientR/r-startup.html 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:

The species_code function can be called within other rebird functions, or the species code can be specified directly.

Recent notable sightings

Search for notable sightings at a given latitude and longitude

or a region

Historic Observations

Search for historic observations on a date at a region

or a hotspot

ebirdhistorical(loc = 'L196159', date = '2019-02-14', fieldSet = 'full')
#> # A tibble: 14 x 27
#>    speciesCode comName sciName locId locName obsDt howMany   lat   lng
#>    <chr>       <chr>   <chr>   <chr> <chr>   <chr>   <int> <dbl> <dbl>
#>  1 annhum      Anna's… Calypt… L196… Vancou… 2019…       4  49.3 -123.
#>  2 ribgul      Ring-b… Larus … L196… Vancou… 2019…       4  49.3 -123.
#>  3 glwgul      Glauco… Larus … L196… Vancou… 2019…      29  49.3 -123.
#>  4 norcro      Northw… Corvus… L196… Vancou… 2019…     100  49.3 -123.
#>  5 bkcchi      Black-… Poecil… L196… Vancou… 2019…      16  49.3 -123.
#>  6 bushti      Bushtit Psaltr… L196… Vancou… 2019…      20  49.3 -123.
#>  7 pacwre1     Pacifi… Troglo… L196… Vancou… 2019…       1  49.3 -123.
#>  8 houfin      House … Haemor… L196… Vancou… 2019…       2  49.3 -123.
#>  9 purfin      Purple… Haemor… L196… Vancou… 2019…       3  49.3 -123.
#> 10 amegfi      Americ… Spinus… L196… Vancou… 2019…      15  49.3 -123.
#> 11 daejun      Dark-e… Junco … L196… Vancou… 2019…      37  49.3 -123.
#> 12 sonspa      Song S… Melosp… L196… Vancou… 2019…      12  49.3 -123.
#> 13 spotow      Spotte… Pipilo… L196… Vancou… 2019…       1  49.3 -123.
#> 14 rewbla      Red-wi… Agelai… L196… Vancou… 2019…       6  49.3 -123.
#> # … with 18 more variables: obsValid <lgl>, obsReviewed <lgl>,
#> #   locationPrivate <lgl>, subnational2Code <chr>, subnational2Name <chr>,
#> #   subnational1Code <chr>, subnational1Name <chr>, countryCode <chr>,
#> #   countryName <chr>, userDisplayName <chr>, subId <chr>, obsId <chr>,
#> #   checklistId <chr>, presenceNoted <lgl>, hasComments <lgl>,
#> #   firstName <chr>, lastName <chr>, hasRichMedia <lgl>

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

product

  • [ ] Top 100
  • [ ] Checklist feed on a date
  • [ ] Recent checklists feed
  • [ ] Regional statistics on a date
  • [ ] View Checklist BETA

ref/geo

  • [ ] Adjacent Regions

ref/hotspot

  • [ ] Hotspots in a region
  • [ ] Nearby hotspots

ref/taxonomy

  • [x] eBird Taxonomy: ebirdtaxonomy()
  • [ ] Taxonomic Forms
  • [ ] Taxonomy Versions
  • [ ] Taxonomic Groups

ref/region

Meta

ropensci_footer