An R package for identifying locations to visit in order to increase your species list count. The package relies on the eBird API to query for recent observations and compare them to a user’s species list. The lists can be life lists, year lists, county lists, etc.
You can install lifeR from CRAN via:
install.packages("lifeR")
Alternatively, you can download the development version from GitHub with the help of the remotes package:
install.packages("remotes")
::install_github(repo = "jcoliver/lifeR") remotes
If you install from GitHub and want to have the introductory vignette
included in the installation, then pass
build_vignettes = TRUE
in the call to
install_github()
:
install.packages("remotes")
::install_github(repo = "jcoliver/lifeR", build_vignettes = TRUE) remotes
And load the package with library
library("lifeR")
# Location of the file with your year list
<- "~/Desktop/ebird_world_year_2021_list.csv"
list_file
# Read the list of species into memory
<- read.csv(file = list_file)
user_list
# Extract the common names of species from your list
<- user_list$Common
my_species
# Read in eBird API key from a text file; replace the argument to file with
# the actual location of your eBird key file
<- scan(file = "ebird-api-key.txt", what = "character")
key
# A single center requires vector of coordinates
# Change these, unless you really want to go birding near McCall, Idaho
<- c(45, -116)
locs SitesReport(centers = locs,
ebird_key = key,
species_seen = my_species)