Choosing an atlas

Martin Westgate, Dax Kellie

2023-11-07

The GBIF network consists of a series of a series of ‘node’ organisations who collate biodiversity data from their own countries, with GBIF acting as an umbrella organisation to store data from all nodes. Several nodes have their own APIs, often built from the ‘living atlas’ codebase developed by the ALA. At present, galah supports the following functions and atlases:

plot of chunk atlas-support

Set Organisation

Set which atlas you want to use by changing the atlas argument in galah_config(). The atlas argument can accept a full name, an acronym, or a region to select a given atlas, all of which are available via show_all(atlases). Once a value is provided, it will automatically update galah’s server configuration to your selected atlas. The default atlas is Australia.

If you intend to download records, you may need to register a user profile with the relevant atlas first.

galah_config(atlas = "GBIF.es", email = "your_email_here")

Look up Information

You can use the same look-up functions to find useful information about the Atlas you have set. Available information may vary for each Living Atlas.

galah_config(atlas = "Guatemala")
## Atlas selected: Sistema Nacional de Información sobre Diversidad Biológica de Guatemala
## (SNIBgt) [Guatemala]
show_all(datasets)
## # A tibble: 1,283 × 3
##    id     name                                                                         uri  
##    <chr>  <chr>                                                                        <chr>
##  1 dr1440 A catalogue of the Heteroptera (Hemiptera) or true bugs of Argentina         http…
##  2 dr1436 A cybercatalogue of American sand fly types (Diptera, Psychodidae, Phleboto… http…
##  3 dr1226 A distinctive new species of biting midge in the subgenus Euprojoannisia Br… http…
##  4 dr321  A Distribution and Taxonomic Reference Dataset of Geranium (Geraniaceae) in… http…
##  5 dr1285 A geographic distribution database of the cassava whitefly complex (Hemipte… http…
##  6 dr12   A global database for the distributions of crop wild relatives               http…
##  7 dr467  A matrix-based revision of the genus Hypogena Dejean, 1834 (Coleoptera Tene… http…
##  8 dr1061 A Monographic Revision of the Genus Hoplopyga Thomson, 1880 (Coleoptera: Sc… http…
##  9 dr1570 A new Anomiopus Westwood (Coleoptera: Scarabaeidae: Scarabaeinae) from the … http…
## 10 dr1177 A new Central American genus of pleasing fungus beetles (Coleoptera: Erotyl… http…
## # ℹ 1,273 more rows
show_all(fields)
## # A tibble: 128 × 3
##    id                   description        type  
##    <chr>                <chr>              <chr> 
##  1 all_image_url        <NA>               fields
##  2 assertion_user_id    Assertions by user fields
##  3 assertions           Record issues      fields
##  4 assertions_missing   <NA>               fields
##  5 assertions_passed    <NA>               fields
##  6 assertions_unchecked <NA>               fields
##  7 basis_of_record      Record type        fields
##  8 catalogue_number     Catalogue Number   fields
##  9 cl10011              <NA>               fields
## 10 class                Class              fields
## # ℹ 118 more rows
search_all(fields, "year")
## # A tibble: 2 × 3
##   id              description      type  
##   <chr>           <chr>            <chr> 
## 1 year            Year             fields
## 2 occurrence_year Date (by decade) fields
search_taxa("lagomorpha")
## # A tibble: 1 × 8
##   search_term scientific_name taxon_concept_id rank  kingdom  phylum   class    order     
##   <chr>       <chr>           <chr>            <chr> <chr>    <chr>    <chr>    <chr>     
## 1 lagomorpha  Lagomorpha      785              order Animalia Chordata Mammalia Lagomorpha

Download data

You can build queries as you normally would in galah. For taxonomic queries, use search_taxa() to make sure your searches are returning the correct taxonomic data.

galah_config(atlas = "United Kingdom")
## Atlas selected: National Biodiversity Network (NBN) [United Kingdom]
search_taxa("vlps")   # Returns no data due to misspelling
## # A tibble: 0 × 0
search_taxa("vulpes") # Returns data
## # A tibble: 1 × 12
##   search_term scientific_name scientific_name_author…¹ taxon_concept_id rank  kingdom phylum
##   <chr>       <chr>           <chr>                    <chr>            <chr> <chr>   <chr> 
## 1 vulpes      Vulpes          Frisch, 1775             NBNSYS0000138878 genus Animal… Chord…
## # ℹ abbreviated name: ¹​scientific_name_authorship
## # ℹ 5 more variables: class <chr>, order <chr>, family <chr>, genus <chr>, superclass <chr>
galah_call() |>
  galah_identify("vulpes") |>
  galah_filter(year > 2010) |>
  atlas_counts()
## # A tibble: 1 × 1
##    count
##    <int>
## 1 123736

Download species occurrence records from other atlases with atlas_occurrences()

galah_config(atlas = "Guatemala")
## Atlas selected: Sistema Nacional de Información sobre Diversidad Biológica de Guatemala
## (SNIBgt) [Guatemala]
galah_call() |>
  galah_identify("Lagomorpha") |>
  galah_filter(year <= 1980) |>
  galah_select(taxon_name, year) |>
  atlas_occurrences()
## # A tibble: 4 × 2
##   scientificName                   year
##   <chr>                           <dbl>
## 1 Erinnyis ello subsp. ello        1973
## 2 Aellopos titan Burmeister, 1856  1971
## 3 Manduca rustica Fabricius, 1775  1930
## 4 Manduca rustica Fabricius, 1775  1930

Complex queries with multiple Atlases

It is also possible to create more complex queries that return data from multiple Living Atlases. As an example, setting atlases within a loop with galah_config() and purrr::map() allows us to return the total number of species records in each Living Atlas in one table.

library(purrr)
library(tibble)
library(dplyr)
library(gt)

atlases <- show_all(atlases)

counts <- map(atlases$region, 
  function(x){
    galah_config(atlas = x)
    atlas_counts()
})

atlases |>
    select(region, institution) |>
    bind_cols(bind_rows(counts)) |>
    arrange(desc(count)) |>
    gt() |>
    fmt_number(column = count)
region institution count
Global Global Biodiversity Information Facility 2,083,165,001.00
United Kingdom National Biodiversity Network 254,155,214.00
France Portail français d'accès aux données d'observation sur les espèces 143,668,494.00
Australia Atlas of Living Australia 131,963,195.00
Sweden Swedish Biodiversity Data Infrastructure 124,556,849.00
Spain GBIF Spain 57,696,934.00
Brazil Sistemas de Informações sobre a Biodiversidade Brasileira 24,369,137.00
Portugal GBIF Portugal 16,043,865.00
Austria Biodiversitäts-Atlas Österreich 8,976,175.00
Estonia eElurikkus 7,475,447.00
Guatemala Sistema Nacional de Información sobre Diversidad Biológica de Guatemala 3,617,694.00