flora_download

Download Plant Datasets from the Flora e Funga do Brasil Platform
floraR::flora_download()

Description

Downloads plant taxonomic and distributional records in Darwin Core Archive (DwC-A) format from the Rio de Janeiro Botanical Garden’s Flora e Funga do Brasil (FFB) platform. The function allows downloading the latest release, specific dataset versions, or all available versions.

Details

Each dataset version is retrieved directly from the FFB IPT data portal and saved locally in a structured folder. The function checks whether the requested version is already downloaded and avoids re-downloading it unnecessarily.

To download a specific version, it is recommended to use flora_version() to inspect available versions first and extract the exact version string.

Arguments

Argument Description
version Character. Specifies which dataset version(s) to download: - "latest" (default): Download the most recent dataset version. - "all": Download all available dataset versions (may require large disk space). - A specific version string (e.g., "393.001") or a character vector of versions. Use flora_version() to view and select valid version numbers.
verbose Logical. If TRUE (default), prints informative messages during download. If FALSE, runs silently.
dir Character. Local directory path to save the downloaded files. Defaults to creating a folder named "flora_download" in the working directory. Each dataset version is extracted into its own subdirectory.

Value

One or more folders containing the Darwin Core Archive (DwC-A) files for the selected version(s) of the Flora e Funga do Brasil dataset. If no internet connection is available, previously downloaded local datasets will be used automatically (if found).

Examples

# View available dataset versions
versions_df <- flora_version()

# Download the latest dataset
flora_download()

# Download a specific version
flora_download(version = versions_df$Version[1])

# Download multiple versions
flora_download(version = c("393.001", "392.002"))

# Download all versions (large download!)
flora_download(version = "all")

# Work offline (uses previously downloaded data if available)
flora_download(version = "latest", dir = "flora_download")