Skip to contents

This function enriches plant records in a collection using information from POWO (WCVP), IUCN redlist and BGCI.

Usage

enrich_collection(
  collection,
  wcvp = NA,
  iucnRedlist = NA,
  BGCI = NA,
  taxon_name_column = "TaxonName",
  taxon_name_full_column = NA,
  taxon_author_column = NA,
  do_is_autonym = FALSE,
  do_status_year = FALSE,
  do_taxon_types = FALSE,
  ...,
  wcvp_wanted_info = c("plant_name_id", "taxon_name", "taxon_authors", "taxon_rank",
    "taxon_status", "powo_id", "family", "genus", "species", "lifeform_description",
    "climate_description", "geographic_area", "Dist_000_area_code_l3", "Dist_000_labels",
    "Dist_100_area_code_l3", "Dist_010_area_code_l3", "Dist_001_area_code_l3",
    "Dist_101_area_code_l3", "Dist_110_area_code_l3", "Dist_011_area_code_l3",
    "main_common_name", "assessment_date", "category", "criteria", "population_trend"),
  redlist_wanted_info = c("plant_name_id", "main_common_name", "assessment_date",
    "category", "criteria", "population_trend")
)

Arguments

collection

A data frame containing a collection.

wcvp

World Checklist of Vascular Plants (WCVP) database, obtained using the function import_wcvp_names(). If NA WCVP enrichment is not performed.

iucnRedlist

IUCN Red List of Threatened Species database, obtained using the function XXXX. If NA IUCN red list enrichment is not performed.

BGCI

Requires a cleaned BGCI plant search database to obtain how many collections globally a taxon is contained (Not freely available). If NA BGCI plant search enrichment is not performed.

taxon_name_column

The name of the column in the collection corresponding to taxonomic names.

taxon_name_full_column

The name of the column in the collection corresponding to joined taxonomic names and authors.

taxon_author_column

The name of the column in the collection corresponding to the authors of the taxonomic names.

do_is_autonym

Flag (TRUE/FALSE) for whether to add the column is_autonym, see add_is_autonym() for details.

do_status_year

Flag (TRUE/FALSE) for whether to add the column status_year, see add_status_year() for details.

do_taxon_types

Flag (TRUE/FALSE) for whether to add the column taxon_type, see add_taxon_type() for details.

...

Arguments (i.e., attributes) used in the matching algorithm (passed along to match_collection_to_wcvp()). Examples include typo_method, do_convert_accepted and try_fix_hybrid.

wcvp_wanted_info

A character vector containing the information we want to extract from WCVP. These are matched to column names in wcvp$wcvp_names, wcvp$geography and wcvp$redlist (if the later two exist).

redlist_wanted_info

A character vector containing the information we want to extract from IUCN red list, corresponding to column names in iucnRedlist.

Value

The collection data frame enriched with information dependent on function inputs (new columns).