| get_faunabr | R Documentation |
This function downloads the latest or an older version of Catálogo Taxonômico da Fauna do Brasil database, merges the information into a single data.frame, and saves this data.frame in the specified directory.
get_faunabr(output_dir, data_version = "latest",
solve_discrepancies = TRUE, translate = TRUE,
overwrite = TRUE, verbose = TRUE)
output_dir |
(character) a directory to save the data downloaded from Fauna do Brasil |
data_version |
(character) Version of the Fauna do Brasil database to download. Use "latest" to get the most recent version, which is updated frequently. Alternatively, specify an older version (e.g., data_version = "1.2").Default value is "latest". |
solve_discrepancies |
Resolve inconsistencies between species and subspecies information. When set to TRUE (default), species information is updated based on unique data from subspecies. For example, if a subspecies occurs in a certain state, it implies that the species also occurs in that state. |
translate |
(logical) whether to translate the original dataset ("lifeForm", "origin", "habitat", and "taxonRank") from Portuguese to English. Default is TRUE. |
overwrite |
(logical) If TRUE, data is overwritten. Default = TRUE. |
verbose |
(logical) Whether to display messages during function execution. Set to TRUE to enable display, or FALSE to run silently. Default = TRUE. |
The function downloads the latest version of the Catálogo Taxonômico da Fauna
do Brasil database from the official source. It then merges the information
into a single data.frame, containing details on species, taxonomy, occurrence,
and other relevant data.
The merged data.frame is then saved as a file in the specified output
directory. The data is saved in a format that allows easy loading using the
load_faunabr function for further analysis in R.
Brazilian Zoology Group. Catálogo Taxonômico da Fauna do Brasil. Available at: https://ipt.jbrj.gov.br/jbrj/resource?r=catalogo_taxonomico_da_fauna_do_brasil
## Not run:
#Creating a folder in a temporary directory
#Replace 'file.path(tempdir(), "faunaabr")' by a path folder to be create in
#your computer
my_dir <- file.path(file.path(tempdir(), "faunabr"))
dir.create(my_dir)
#Download, merge and save data
get_faunabr(output_dir = my_dir)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.