A programmatic interface to fishbase.org.
Accessing data from FishBase using R
rfishbase
is a package for interfacing with the fishbase.org database. It provides code to download and parse a local copy of fishbase, which can be used for rapid access for a variety of analysis functions.
rfishbase
is available on CRAN and can be installed through the R package manager (see install.packages
). The latest (development) version is hosted here on github, and can be installed using the devtools package:
library(devtools)
install_github("rfishbase", "ropensci")
rfishbase
is developed by Carl Boettiger in collaboration with Duncan Temple Lang and Peter Wainwright, and is part of the rOpenSci project. This software, examples, and documentation are freely provided under the CC0 license.
A preprint of our manuscript introducing the package can be found in the inst/doc directory.
Froese, R. and D. Pauly. Editors. 2011. FishBase.
World Wide Web electronic publication.
www.fishbase.org, version (08/2011).
clean_data
: clean the fish.base data into pure ASCIIdrop_nonascii
: remove non-ASCII charactersfamilySearch
: A function to find all fish that are members of a scientific FamilyfindSpecies
: Returns the matching indices in the data given a list of species namesfish.data
: A cached copy of extracted FishBase data, 03/2012.fish_names
: Return the scientific names, families, classes, or orders of the input datafishbase
: Query the XML page of fishbase given a fishbase id
and return the XML R objectgetData
: Description: a general function to loop over all fish ids to get data
also drops the missing entriesgetDepth
: Returns available depth range datagetQuantTraits
: Returns all quantitative trait values found in the morphology datagetRefs
: Returns the FishBase reference id numbers matching a query.getSize
: Returns available size data of specified type (length, weight, or age)habitatSearch
: A function to search for the occurances of any keyword in habitat descriptionlabridtree
: An example phylogeny of labrid fishloadCache
: Load an updated cacheupdateCache
: Update the cached copy of fishbase datawhich_fish
: which_fish is the the generic search function for fishbase
a variety of description types