Description Usage Arguments Value Examples
View source: R/get_hierarchy_string.R
This a helper function to generate a formatted hierarchy string for a given taxon to use in the Bad Neighbor BAP. The function uses the SOLR service from the Integrated Taxonomic Information System ([ITIS](https://www.itis.gov)).
1 | get_hierarchy_string(taxon_name)
|
taxon_name |
A string for a scientific name for a taxonomic group to search |
A tibble with the returned tsn, taxonomic rank and formatted hierarchy string to use in other parts of the BAP
1 2 3 4 5 6 7 8 9 10 11 12 | # query ITIS to get the string
h_string <- get_hierarchy_string("Poaceae")
# print the result
h_string
# A tibble: 1 x 4
# tsn rank taxon hierarchy_homonym_string
# <chr> <chr> <chr> <chr>
# 1 40351 Family Poaceae "*\\-40351\\-*"
# use the result in the main bad neighbor query using state name and optional flag
buff_nn <- state_bad_neighbor_query(state_name = "Virginia", taxon = h_string$hierarchy_homonym_string, get_buffer_fips = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.