Skip to contents

Users may wish to see the specific values within a chosen field, profile or list to narrow queries or understand more about the information of interest. show_values() provides users with these values. search_values() allows users for search for specific values within a specified field.

Usage

show_values(df)

search_values(df, query)

Arguments

df

A search result from search_fields(), search_profiles() or search_lists().

query

A string specifying a search term. Not case sensitive.

Value

A tibble of values for a specified field, profile or list.

Details

Each Field contains categorical or numeric values. For example:

  • The field "year" contains values 2021, 2020, 2019, etc.

  • The field "stateProvince" contains values New South Wales, Victoria, Queensland, etc. These are used to narrow queries with galah_filter().

Each Profile consists of many individual quality filters. For example, the "ALA" profile consists of values:

  • Exclude all records where spatial validity is FALSE

  • Exclude all records with a latitude value of zero

  • Exclude all records with a longitude value of zero

Each List contains a list of species, usually by taxonomic name. For example, the Endangered Plant species list contains values:

  • Acacia curranii (Curly-bark Wattle)

  • Brachyscome papillosa (Mossgiel Daisy)

  • Solanum karsense (Menindee Nightshade)

Examples

# \donttest{
# Show values in field 'cl22'
search_fields("cl22") |> 
  show_values()
#>  Showing values for 'cl22'.
#> # A tibble: 11 × 2
#>    field category                    
#>    <chr> <chr>                       
#>  1 cl22  New South Wales             
#>  2 cl22  Victoria                    
#>  3 cl22  Queensland                  
#>  4 cl22  South Australia             
#>  5 cl22  Western Australia           
#>  6 cl22  Northern Territory          
#>  7 cl22  Australian Capital Territory
#>  8 cl22  Tasmania                    
#>  9 cl22  Unknown1                    
#> 10 cl22  Ashmore and Cartier Islands 
#> 11 cl22  Coral Sea Islands           

# Search for any values in field 'cl22' that match 'tas'
search_fields("cl22") |> 
  search_values("tas")
#>  Showing values for 'cl22'.
#> # A tibble: 1 × 2
#>   field category
#>   <chr> <chr>   
#> 1 cl22  Tasmania

# See items within species list "dr19257"
search_lists("dr19257") |> 
  show_values()
#>  Showing values for 'dr19257'.
#> # A tibble: 17 × 6
#>         id name                                    commo…¹ scien…² lsid  dataR…³
#>      <int> <chr>                                   <chr>   <chr>   <chr> <chr>  
#>  1 4051259 https://id.biodiversity.org.au/node/ap… Curly-… Acacia… http… dr19257
#>  2 4051260 https://id.biodiversity.org.au/node/ap… A Spea… Austro… http… dr19257
#>  3 4051261 https://id.biodiversity.org.au/node/ap… Mossgi… Brachy… http… dr19257
#>  4 4051262 https://id.biodiversity.org.au/node/ap… Orchids Orchid… http… dr19257
#>  5 4051263 https://id.biodiversity.org.au/node/ap… Orchids Orchid… http… dr19257
#>  6 4051264 https://id.biodiversity.org.au/node/ap… Bluegr… Dichan… http… dr19257
#>  7 4051265 https://id.biodiversity.org.au/node/ap… Orchids Orchid… http… dr19257
#>  8 4051266 https://id.biodiversity.org.au/node/ap… Spike-… Eleoch… http… dr19257
#>  9 4051267 https://id.biodiversity.org.au/node/ap… Leafle… Indigo… http… dr19257
#> 10 4051268 https://id.biodiversity.org.au/node/ap… Erect … Lepidi… http… dr19257
#> 11 4051269 https://id.biodiversity.org.au/node/ap… Silver… Oleari… http… dr19257
#> 12 4051270 https://id.biodiversity.org.au/node/ap… NA      Philot… http… dr19257
#> 13 4051271 https://id.biodiversity.org.au/node/ap… Orchids Orchid… http… dr19257
#> 14 4051272 https://id.biodiversity.org.au/node/ap… Orchids Orchid… http… dr19257
#> 15 4051273 https://id.biodiversity.org.au/node/ap… Menind… Solanu… http… dr19257
#> 16 4051274 https://id.biodiversity.org.au/node/ap… Slende… Swains… http… dr19257
#> 17 4051275 https://id.biodiversity.org.au/node/ap… NA      Tyloph… http… dr19257
#> # … with abbreviated variable names ¹​commonName, ²​scientificName,
#> #   ³​dataResourceUid
# }