Make taxonomy lookups
Usage
make_gbif_taxonomy(
df,
taxa_col = "original_name",
taxonomy_file,
target_rank = "species",
limit = TRUE,
fixes = NULL,
overrides = NULL,
...
)
Arguments
- df
Dataframe with
taxa_col
.- taxa_col
Character. Name of column in
df
with taxa names- taxonomy_file
Character. Path to results from
envClean::get_taxonomy()
- target_rank
Character. Default is 'species'. At what level of the taxonomic hierarchy are results desired. This is the most detailed taxonomy returned. i.e. if genus is the
target_rank
, no taxa below genus are returned. SeeenvClean::lurank
rank
column.- limit
Logical. If true (default), the output taxonomy will be limited to the input names in
df
. Otherwise, all taxa found intaxonomy_file
will be returned.- fixes
Data frame with columns
resolved_to
andprefer
. Anytaxa
result inlutaxa
that matches a name inresolved_to
will be changed toprefer
. Mainly used where legitimate names are used in areas where they do not exist. e.g. Eastern osprey Pandion cristatus does not occur in South Australia but records of this species in South Australia are assumed to be legitimate Osprey (Pandion haliaetus) records.- overrides
Data frame with columns
original
andprefer
. Anyoriginal_name
result inlutaxa
that matches a name inoriginal
will be have its correspondingtaxa
changed toprefer
. Useful where GBIF Backbone Taxonomy provides a spurious result. e.g. The GBIF Backbone Taxonomy changes Thinornis rubricollis to Phalaropus lobatus rather than the preferred Charadrius cucullatus.- ...
Passed to
envClean::get_taxonomy()