lifeR lifeR logo

cran version

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.

Installation

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")
remotes::install_github(repo = "jcoliver/lifeR")

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")
remotes::install_github(repo = "jcoliver/lifeR", build_vignettes = TRUE)

And load the package with library

library("lifeR")

A minimalist example

# Location of the file with your year list
list_file <- "~/Desktop/ebird_world_year_2021_list.csv"

# Read the list of species into memory
user_list <- read.csv(file = list_file)

# Extract the common names of species from your list
my_species <- user_list$Common

# Read in eBird API key from a text file; replace the argument to file with 
# the actual location of your eBird key file
key <- scan(file = "ebird-api-key.txt", what = "character")

# A single center requires vector of coordinates
# Change these, unless you really want to go birding near McCall, Idaho
locs <- c(45, -116)
SitesReport(centers = locs, 
            ebird_key = key, 
            species_seen = my_species)

Miscellaneous debris