Make taxonomy lookups
make_gbif_taxonomy(
df,
taxa_col = "original_name",
taxonomy_file,
target_rank = "species",
limit = TRUE,
fixes = NULL,
overrides = NULL,
...
)
Dataframe with taxa_col
.
Character. Name of column in df
with taxa names
Character. Path to results from
envClean::get_taxonomy()
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. See envClean::lurank
rank
column.
Logical. If true (default), the output taxonomy will be limited
to the input names in df
. Otherwise, all taxa found in taxonomy_file
will
be returned.
Data frame with columns resolved_to
and prefer
. Any taxa
result in lutaxa
that matches a name in resolved_to
will be changed to
prefer
. 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.
Data frame with columns original
and prefer
. Any
original_name
result in lutaxa
that matches a name in original
will be
have its corresponding taxa
changed to prefer
. 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()
named list with elements:
Dataframe. For each unique name in taxa_col
, the best
taxa
to use (taking into account target_rank
)
Dataframe. For each taxa
in lutaxa
a row of taxonomic
hierarchy and matching gbif usageKeys