atlas_taxonomy: Search taxonomic trees

View source: R/atlas_taxonomy.R

atlas_taxonomyR Documentation

Search taxonomic trees

Description

The ALA has its' own internal taxonomy that is derived from authoritative sources. atlas_taxonomy provides a means to query that taxonomy, returning a tibble showing all child nodes and which parent they are derived from.

Usage

atlas_taxonomy(
  request = NULL,
  identify = NULL,
  filter = NULL,
  constrain_ids = NULL
)

Arguments

request

optional data_request object: generated by a call to galah_call().

identify

data.frame: generated by a call to galah_identify().

filter

data.frame: generated by a call to galah_filter(rank == "chosen_rank"). The identity of the clade at which the downwards search should stop.

constrain_ids

string: Optional string to limit which taxon_concept_id's are returned. This is useful for restricting taxonomy to particular authoritative sources. Default is "biodiversity.org.au" for Australia (this can be overridded by setting constrain_ids = NULL) and NULL otherwise. Powered by grepl() meaning it supports regular expressions.

Details

The approach used by this function is recursive, meaning that it becomes slow for large queries such as atlas_taxonomy(search_taxa("Plantae"), down_to = galah_down_to(species)). Although the inputs to search_taxa and down_to are case-insensitive, node names are always returned in title case.

Value

A tibble containing taxon names, ranks and parent/child IDs

See Also

search_taxa() to search for an individual taxon; show_all(ranks) for valid ranks used to specify the down_to argument.

Examples

## Not run: 
# Get a taxonomic tree of *Chordata* down to the class level
galah_call() |> 
  galah_identify("chordata") |>
  galah_filter(rank == class) |>
  atlas_taxonomy()

## End(Not run)


galah documentation built on Nov. 20, 2023, 9:07 a.m.