In the ALA, all records are associated with an identifier that uniquely
identifies the taxon to which that record belongs. However, taxonomic names
are often ambiguous due to homonymy; i.e. re-use of names (common or
scientific) in different clades. Hence, search_taxa
provides a means
to search for taxonomic names and check the results are 'correct' before
proceeding to download data via
atlas_occurrences()
, atlas_species()
or atlas_counts()
. The resulting
data.frame
of taxonomic information can be passed to galah_identify()
to
provide the identify
argument of atlas_
functions, which then filters
the resulting records to the specified taxon or taxa.
search_taxa(...)
: One or more scientific names, separated by commas and
given as strings. If greater control is required to disambiguate search
terms, taxonomic levels can be provided explicitly via a data.frame
(see examples). Note that searches are not case-sensitive.
An object of class tbl_df
, data.frame
(aka a tibble) and ala_id
containing taxonomic information.
Search using a single term
search_taxa("Reptilia") #> # A tibble: 1 x 9 #> search_term scientific_name taxon_concept_id rank match_type kingdom phylum class issues #> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> #> 1 Reptilia REPTILIA urn:lsid:biodiversity.org.au:afd.taxon:682e1~ class exactMatch Animalia Chorda~ Repti~ noIss~
Note that search_taxa()
is not case sensitive
search_taxa("reptilia") # not case sensitive #> # A tibble: 1 x 9 #> search_term scientific_name taxon_concept_id rank match_type kingdom phylum class issues #> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> #> 1 reptilia REPTILIA urn:lsid:biodiversity.org.au:afd.taxon:682e1~ class exactMatch Animalia Chorda~ Repti~ noIss~
Search multiple taxa. search_taxa()
will return one row per taxon
search_taxa(c("reptilia", "mammalia")) #> # A tibble: 2 x 10 #> search_term scientific_name taxon_concept_id rank match_type kingdom phylum class issues vernacular_name #> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> #> 1 reptilia REPTILIA urn:lsid:biodiversity.org.au:a~ class exactMatch Animalia Chord~ Rept~ noIss~ <NA> #> 2 mammalia MAMMALIA urn:lsid:biodiversity.org.au:a~ class exactMatch Animalia Chord~ Mamm~ noIss~ Mammals
galah_identify()
uses search_taxa()
to narrow data queries
galah_call() |> galah_identify("reptilia") |> atlas_counts() #> # A tibble: 1 x 1 #> count #> <int> #> 1 1317131
search_identifiers()
for how to get names if taxonomic identifiers
are already known. galah_identify()
, galah_select()
, galah_filter()
and
galah_geolocate()
for ways to restrict the information returned
by atlas_occurrences()
and related functions.
atlas_taxonomy()
to look up taxonomic trees.