
International Atlases
Martin Westgate, Dax Kellie
2022-10-20
Source:vignettes/international_atlases.Rmd
international_atlases.Rmd
The architecture developed by the ALA to store biodiversity data is used by over 20 International Living Atlases. Although there are slight differences in the core components of each Atlas’s architecture, galah
is flexible enough to handle most of these differences. As a result, it is possible to change which Living Atlas you get data from in galah
Supported Atlases
To see which international Living Atlases galah
currently supports, useshow_all_atlases()
.
## # A tibble: 10 × 4
## atlas institution acronym url
## <chr> <chr> <chr> <chr>
## 1 Australia Atlas of Living Australia ALA https://www.ala.org.au
## 2 Austria Biodiversitäts-Atlas Österreich BAO https://biodiversityatlas.at
## 3 Brazil Sistemas de Informações sobre a Biodiversidade Brasileira SiBBr https://sibbr.gov.br
## 4 Estonia eElurikkus <NA> https://elurikkus.ee
## 5 France Inventaire National du Patrimoine Naturel INPN https://inpn.mnhn.fr
## 6 Guatemala Sistema Nacional de Información sobre Diversidad Biológica de Guatemala SNIBgt https://snib.conap.gob.gt
## 7 Portugal GBIF Portugal GBIF.pt https://www.gbif.pt
## 8 Spain GBIF Spain GBIF.es https://www.gbif.es
## 9 Sweden Swedish Biodiversity Data Infrastructure SBDI https://biodiversitydata.se
## 10 United Kingdom National Biodiversity Network NBN https://nbn.org.uk
Some atlases support more types of data queries than others (e.g. counts, occurrences, species lists). To see what kinds of information and data can be returned from each atlase, you can see the list of supported Application Programming Interfaces (APIs).
show_all(apis)
## # A tibble: 167 × 5
## atlas system api_name api_url calle…¹
## <chr> <chr> <chr> <chr> <chr>
## 1 Australia collections collections_collections https://collections.ala.org.au/ws/collection show_a…
## 2 Australia collections collections_datasets https://collections.ala.org.au/ws/dataResource show_a…
## 3 Australia collections collections_providers https://collections.ala.org.au/ws/dataProvider show_a…
## 4 Australia data-quality profiles_all https://data-quality-service.ala.org.au/api/v1/data-profiles show_a…
## 5 Australia data-quality profiles_lookup https://data-quality-service.ala.org.au/api/v1/quality/activeProfile?profi… show_p…
## 6 Australia doi doi_download https://apis.ala.org.au/doi/api/doi/{doi_string}/download doi_do…
## 7 Australia images image_licences https://images.ala.org.au/ws/licence show_a…
## 8 Australia images image_metadata https://images.ala.org.au/ws/image/{id} media_…
## 9 Australia lists lists_all https://lists.ala.org.au/ws/speciesList show_a…
## 10 Australia lists lists_lookup https://lists.ala.org.au/ws/speciesListItems/{list_id} show_l…
## # … with 157 more rows, and abbreviated variable name ¹called_by
Set Atlas
Set which atlas you want to use by changing the atlas
argument in galah_config()
. This 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 = "Spain", 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")
show_all(datasets)
## # A tibble: 522 × 3
## name uri uid
## <chr> <chr> <chr>
## 1 A Distribution and Taxonomic Reference Dataset of Geranium (Geraniaceae) in the New World http… dr321
## 2 A global database for the distributions of crop wild relatives http… dr12
## 3 A matrix-based revision of the genus Hypogena Dejean, 1834 (Coleoptera Tenebrionidae) http… dr467
## 4 A new Mexican species of Chrysina Kirby (Coleoptera: Scarabaeidae: Rutelinae), with nomenclatural changes, new record… http… dr554
## 5 A new species of Setostylus Matile and new records of Setostylus bellulus (Williston) (Diptera: Keroplatidae) http… dr538
## 6 A revision of the genus Bromeloecia Spuler (Diptera: Sphaeroceridae: Limosininae) http… dr481
## 7 A synopsis of American Caraphia Gahan, 1906 (Coleoptera: Cerambycidae: Lepturinae) with description of two new species http… dr539
## 8 A synopsis of the Neotropical genus Protoneura (Odonata: Coenagrionidae) http… dr448
## 9 A systematic revision of the genus Archocentrus (Perciformes: Cichlidae), with the description of two new genera and … http… dr362
## 10 A taxonomic monograph of the genus Tylodinus Champion (Coleoptera: Curculionidae: Cryptorhynchinae: Tylodina) of Chia… http… dr564
## # … with 512 more rows
show_all(fields)
## # A tibble: 129 × 4
## id description type link
## <chr> <chr> <chr> <chr>
## 1 all_image_url Image URLs for this record fiel… <NA>
## 2 assertion_user_id User ID of the person who has made an assertion about this record fiel… <NA>
## 3 assertions A list of all assertions (user and system supplied) for a record resulting from data quality tes… fiel… <NA>
## 4 assertions_missing Assertion indicating missing field values for a record. E.g. missing basis of record fiel… <NA>
## 5 assertions_passed Assertion indicating a data quality test has been passed by this record fiel… <NA>
## 6 assertions_unchecked Assertion indicating a data quality test was not performed for this record typically due to the … fiel… <NA>
## 7 basis_of_record The basis of record e.g. Specimen, Observation http://rs.tdwg.org/dwc/terms/basisOfRecord fiel… <NA>
## 8 catalogue_number http://rs.tdwg.org/dwc/terms/catalogNumber fiel… <NA>
## 9 class The class the Atlas has matched this record to in the NSL http://rs.tdwg.org/dwc/terms/class fiel… <NA>
## 10 collection_code The collection code for this record. This will be populated if the data has come from a museum o… fiel… <NA>
## # … with 119 more rows
search_all(fields, "year")
## # A tibble: 3 × 4
## id description type link
## <chr> <chr> <chr> <chr>
## 1 year http://rs.tdwg.org/dwc/terms/year fiel… <NA>
## 2 occurrence_year Year ranges for a search. Calculated based on the unique values for a query. fiel… <NA>
## 3 date_precision The precision of the date information for the record. Values include 'Day', 'Month', 'Year', 'Year ran… fiel… <NA>
search_taxa("lagomorpha")
## # A tibble: 1 × 12
## search_term taxon_concept_id scientific_name scientific_name_authorship rank kingdom phylum class order family genus species
## <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
## 1 lagomorpha 785 Lagomorpha <NA> order Animalia Chordata Mammalia Lago… <NA> <NA> <NA>
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")
search_taxa("vlps") # Returns no data due to misspelling
## # A tibble: 1 × 1
## search_term
## <chr>
## 1 vlps
search_taxa("vulpes") # Returns data
## # A tibble: 1 × 13
## search_term taxon_concept_id scientific_name scientific_name_author…¹ rank kingdom super…² order class genus phylum family species
## <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
## 1 vulpes NBNSYS0000138878 Vulpes Frisch, 1775 genus Animal… Tetrap… Carn… Mamm… Vulp… Chord… Canid… <NA>
## # … with abbreviated variable names ¹scientific_name_authorship, ²superclass
galah_call() |>
galah_identify("vulpes") |>
galah_filter(year > 2010) |>
atlas_counts()
## # A tibble: 1 × 1
## count
## <int>
## 1 97224
Download species occurrence records from other atlases with atlas_occurrences()
galah_config(atlas = "Guatemala")
galah_call() |>
galah_identify("Lagomorpha") |>
galah_filter(year <= 1980) |>
galah_select(taxon_name, year) |>
atlas_occurrences()
## # A tibble: 39 × 2
## scientificName year
## <chr> <int>
## 1 Sylvilagus floridanus (J. A. Allen, 1890) 1968
## 2 Sylvilagus floridanus (J. A. Allen, 1890) 1906
## 3 Sylvilagus brasiliensis subsp. truei (J. Allen, 1890) 1947
## 4 Sylvilagus floridanus (J. A. Allen, 1890) 1968
## 5 Sylvilagus floridanus (J. A. Allen, 1890) 1968
## 6 Sylvilagus floridanus (J. A. Allen, 1890) 1906
## 7 Sylvilagus floridanus (J. A. Allen, 1890) 1960
## 8 Sylvilagus brasiliensis subsp. truei (J. Allen, 1890) 1960
## 9 Sylvilagus floridanus (J. A. Allen, 1890) 1952
## 10 Sylvilagus floridanus (J. A. Allen, 1890) 1955
## # … with 29 more rows
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$atlas,
function(x){
galah_config(atlas = x)
atlas_counts()
})
tibble(
atlas = atlases$atlas,
n = unlist(counts)) |>
filter(n > 0) |>
arrange(desc(n)) |>
gt()
atlas | n |
---|---|
United Kingdom | 205571136 |
Australia | 114080945 |
Sweden | 103417222 |
France | 87443384 |
Spain | 38269601 |
Brazil | 23316770 |
Portugal | 16043865 |
Austria | 7813712 |
Estonia | 6972683 |
Guatemala | 3509690 |