get_species_path {ebirdst}R Documentation

Get the data package path for a given species


This helper function can be used to get the path to a data package for a given species to be used by the various loading functions.


get_species_path(species, path = rappdirs::user_data_dir("ebirdst"))



character; a single species given as a scientific name, common name or six-letter species code (e.g. woothr). The full list of valid species is can be viewed in the ebirdst_runs data frame included in this package. To download the example dataset, use "example_data".


character; directory to download the data to. All downloaded files will be placed in a sub-directory of this directory named according to the unique run ID associated with this species. Defaults to a persistent data directory, which can be found by calling rappdirs::user_data_dir("ebirdst")).


The path to the data package directory.


## Not run: 
# download the example data

# get the path
path <- get_species_path("example_data")

# use it to load data
abd <- load_raster(path, "abundance")

# get the path to the full data package for yellow-bellied sapsucker
# common name, scientific name, or species code can be used
path <- get_species_path("Yellow-bellied Sapsucker")
path <- get_species_path("Sphyrapicus varius")
path <- get_species_path("yebsap")

## End(Not run)

[Package ebirdst version 0.3.5 Index]