if (FALSE) {
# Search using a single string.
# Note that `search_taxa()` is not case sensitive
search_taxa("Reptilia")
# Search using multiple strings.
# `search_taxa()` will return one row per taxon
search_taxa("reptilia", "mammalia")
# Search using more detailed strings with authorship information
search_taxa("Acanthocladium F.Muell")
# Specify taxonomic levels in a tibble using "specificEpithet"
search_taxa(tibble::tibble(
class = "aves",
family = "pardalotidae",
genus = "pardalotus",
specificEpithet = "punctatus"))
# Specify taxonomic levels in a tibble using "scientificName"
search_taxa(tibble::tibble(
family = c("pardalotidae", "maluridae"),
scientificName = c("Pardalotus striatus striatus", "malurus cyaneus")))
# Use OOP for the same effect
# `identify()` tells the code that we want to search for _taxonomic_ metadata.
request_metadata() |>
identify("crinia") |>
collect()
# This approach has the advantage that we can call `select()`
request_metadata() |>
identify("crinia") |>
select(everything()) |>
collect()
# Look up a unique taxon identifier
search_identifiers(query = "https://id.biodiversity.org.au/node/apni/2914510")
# OOP process for identifiers uses `filter()`, not `identify()`
# In these cases the `field` argument is used to specify `type`
request_metadata() |>
filter(identifier = "https://id.biodiversity.org.au/node/apni/2914510") |>
select(everything()) |>
collect()
}
Run the code above in your browser using DataLab