rebird: wrapper to the eBird API
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://confluence.cornell.edu/display/CLOISAPI/eBird+API+1.1
Install
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")
Direct use of rebird
Load the package
library("rebird")
Sightings at location determined by latitude/longitude
Search for bird occurrences by latitude and longitude point
ebirdgeo(species = 'spinus tristis', lat = 42, lng = -76)
#> # A tibble: 40 x 12
#> lng locName howMany sciName obsValid locationPrivate obsDt
#> <dbl> <chr> <int> <chr> <lgl> <lgl> <chr>
#> 1 -75.8 Chenango Valley~ 4 Spinus ~ TRUE FALSE 2018-~
#> 2 -76.1 US-New York-End~ 4 Spinus ~ TRUE TRUE 2018-~
#> 3 -75.9 Salt Springs SP 5 Spinus ~ TRUE FALSE 2018-~
#> 4 -75.9 US-New York-Cas~ 2 Spinus ~ TRUE TRUE 2018-~
#> 5 -75.9 Woodbourne Fore~ 19 Spinus ~ TRUE FALSE 2018-~
#> 6 -75.9 Boland Pond 1 Spinus ~ TRUE FALSE 2018-~
#> 7 -76.0 Murphys Pits (r~ 3 Spinus ~ TRUE FALSE 2018-~
#> 8 -76.0 Waterman--IBM G~ 12 Spinus ~ TRUE FALSE 2018-~
#> 9 -75.9 Workwalk 2 Spinus ~ TRUE TRUE 2018-~
#> 10 -76.0 "Home " 13 Spinus ~ TRUE TRUE 2018-~
#> # ... with 30 more rows, and 5 more variables: obsReviewed <lgl>,
#> # comName <chr>, lat <dbl>, locID <chr>, locId <chr>
Recent observations at a region
Search for bird occurrences by region and species name
ebirdregion(region = 'US', species = 'Setophaga caerulescens')
#> # A tibble: 209 x 12
#> lng locName howMany sciName obsValid locationPrivate obsDt
#> <dbl> <chr> <int> <chr> <lgl> <lgl> <chr>
#> 1 -80.2 Bill Baggs Ca~ 9 Setophaga~ TRUE FALSE 2018-~
#> 2 -80.6 Lori Wilson P~ 1 Setophaga~ TRUE FALSE 2018-~
#> 3 -80.1 Hugh Taylor B~ 2 Setophaga~ TRUE FALSE 2018-~
#> 4 -80.0 Lantana Natur~ 3 Setophaga~ TRUE FALSE 2018-~
#> 5 -80.1 Spanish River~ 1 Setophaga~ TRUE FALSE 2018-~
#> 6 -81.8 Fort Zachary ~ 1 Setophaga~ TRUE FALSE 2018-~
#> 7 -81.0 Embry-Riddle ~ 1 Setophaga~ TRUE FALSE 2018-~
#> 8 -82.3 Paynes Prairi~ 1 Setophaga~ TRUE FALSE 2018-~
#> 9 -80.2 Greynolds Park 4 Setophaga~ TRUE FALSE 2018-~
#> 10 -80.1 Orchard View 3 Setophaga~ TRUE TRUE 2018-~
#> # ... with 199 more rows, and 5 more variables: obsReviewed <lgl>,
#> # comName <chr>, lat <dbl>, locID <chr>, locId <chr>
Recent observations at hotspots
Search for bird occurrences by region
ebirdhotspot(locID = c('L99381','L99382'))
#> # A tibble: 125 x 12
#> lng locName sciName obsValid locationPrivate obsDt obsReviewed
#> <dbl> <chr> <chr> <lgl> <lgl> <chr> <lgl>
#> 1 -76.5 Stewart ~ Branta ca~ TRUE FALSE 2018-0~ FALSE
#> 2 -76.5 Stewart ~ Spatula d~ TRUE FALSE 2018-0~ FALSE
#> 3 -76.5 Stewart ~ Spatula c~ TRUE FALSE 2018-0~ FALSE
#> 4 -76.5 Stewart ~ Anas plat~ TRUE FALSE 2018-0~ FALSE
#> 5 -76.5 Stewart ~ Aythya co~ TRUE FALSE 2018-0~ FALSE
#> 6 -76.5 Stewart ~ Aythya af~ TRUE FALSE 2018-0~ FALSE
#> 7 -76.5 Stewart ~ Bucephala~ TRUE FALSE 2018-0~ FALSE
#> 8 -76.5 Stewart ~ Lophodyte~ TRUE FALSE 2018-0~ FALSE
#> 9 -76.5 Stewart ~ Mergus me~ TRUE FALSE 2018-0~ FALSE
#> 10 -76.5 Stewart ~ Oxyura ja~ TRUE FALSE 2018-0~ FALSE
#> # ... with 115 more rows, and 5 more variables: comName <chr>, lat <dbl>,
#> # locID <chr>, locId <chr>, howMany <int>
Frequency of observations at hotspots or regions
Obtain historical frequencies of bird occurrences by hotspot or region
ebirdfreq(loctype = 'hotspots', loc = 'L196159')
#> # A tibble: 8,976 x 4
#> comName monthQt frequency sampleSize
#> <chr> <chr> <dbl> <dbl>
#> 1 Snow Goose January-1 0. 27.
#> 2 Greater White-fronted Goose January-1 0. 27.
#> 3 Cackling Goose January-1 0. 27.
#> 4 Canada Goose January-1 0. 27.
#> 5 Cackling/Canada Goose January-1 0. 27.
#> 6 Trumpeter Swan January-1 0. 27.
#> 7 Wood Duck January-1 0.185 27.
#> 8 Blue-winged Teal January-1 0. 27.
#> 9 Blue-winged/Cinnamon Teal January-1 0. 27.
#> 10 Northern Shoveler January-1 0.704 27.
#> # ... with 8,966 more rows
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.
Meta
- Please report any issues or bugs.
- License: MIT
- Get citation information for
rebird
in R doingcitation(package = 'rebird')