Look Up Information#

There are two simplified functions to look up information:

  • galah.show_all()

  • galah.search_all()

  • galah.show_values()

  • galah.search_values()

These are individual functions that are able to return all types of information in one place, rather than using specific sub-functions to look up information.

For example, to show all available Living Atlases supported:

>>> galah.show_all(atlases=True)
       atlas                                                institution  acronym                           url
0  Australia                                  Atlas of Living Australia      ALA        https://www.ala.org.au
1    Austria                            Biodiversitäts-Atlas Österreich      BAO  https://biodiversityatlas.at
2     Brazil  Sistemas de Informações sobre a Biodiversidade Brasileira    SiBBr          https://sibbr.gov.br
3     France                  Inventaire National du Patrimoine Naturel     INPN          https://inpn.mnhn.fr
4     Global                   Global Biodiversity Information Facility     GBIF              https://gbif.org
5      Spain                                                 GBIF Spain  GBIF.es           https://www.gbif.es

To search for a specific available Living Atlas:

>>> galah.search_all(atlases="Spain")
   atlas institution  acronym                  url
0  Spain  GBIF Spain  GBIF.es  https://www.gbif.es

To show all fields:

>>> galah.show_all(fields=True)
                    id                                     description   type link
0        _nest_parent_                                             NaN  field  NaN
1          _nest_path_                                             NaN  field  NaN
2               _root_                                             NaN  field  NaN
3       abcdTypeStatus                   ABCD field in use by herbaria  field  NaN
4    acceptedNameUsage  http://rs.tdwg.org/dwc/terms/acceptedNameUsage  field  NaN
..                 ...                                             ...    ...  ...
755  multimediaLicence                              Media filter field  media     
756             images                              Media filter field  media     
757             videos                              Media filter field  media     
758             sounds                              Media filter field  media     
759                qid                Reference to pre-generated query  other     

[760 rows x 4 columns]

And to search for a specific field:

>>> galah.search_all(fields="Australian States",column_name="description")
       id                                                                                                          description    type link
0    cl22                                                  Australian States and Territories Australian States and Territories  layers     
1  cl2013  ASGS Australian States and Territories Australian Statistical Geography Standard  Australian States and Territories  layers

Here is a list of information types that can be used with galah.show_all() and galah.search_all():

Information for galah.show_all() and galah.search_all()#

Information type

Description

Configuration

atlases

Show what living atlases are available

apis

Show what APIs & functions are available for each atlas

reasons

Show what values are acceptable as ‘download reasons’ for a specified atlas

Taxonomy

identifiers

Take a universal identifier and return taxonomic information

ranks

Show valid taxonomic ranks (e.g. Kingdom, Class, Order, etc.)

Filters

fields

Show fields that are stored in an atlas

assertions

Show results of data quality checks run by each atlas

Group filters

profiles

Show what data quality profiles are available

lists

Show what species lists are available

Data providers

providers

Show which institutions have provided data

collections

Show the specific collections within those institutions

datasets

Shows all the data groupings within those collections

_values functions#

Sifting through the output of galah.show_all(fields=True) to find a specific field can be inefficient. Instead, we might wish to use search_fields to look for specific fields that match a search, and get their possible values to filter our results.

If we want to know what kinds of fields describe the basis of how an occurrence was recorded, you can search for the keyword “basis” using galah.search_all():

>>> galah.search_all(fields="basis")
                  id                                                                                                   description   type                                                                          link
0      basisOfRecord  What this is a record of e.g. specimen, human observation, fossil http://rs.tdwg.org/dwc/terms/basisOfRecord  field  https://github.com/AtlasOfLivingAustralia/ala-dataquality/wiki/basisOfRecord
1  raw_basisOfRecord                                                         The basis of record as supplied by the data publisher  field                                                                           NaN

Once a desired field is found, you can use show_values to understand the information contained within that field, e.g.

>>> galah.show_values(field="basisOfRecord")
           field             category
0  basisOfRecord    HUMAN_OBSERVATION
1  basisOfRecord   PRESERVED_SPECIMEN
2  basisOfRecord          OBSERVATION
3  basisOfRecord           OCCURRENCE
4  basisOfRecord  MACHINE_OBSERVATION
5  basisOfRecord      MATERIAL_SAMPLE
6  basisOfRecord      LIVING_SPECIMEN
7  basisOfRecord    MATERIAL_CITATION
8  basisOfRecord      FOSSIL_SPECIMEN

You can even narrow down your search by searching for matching values:

>>>  galah.search_values(field="basisOfRecord",value="SPECIMEN")
           field            category
0  basisOfRecord     LIVING_SPECIMEN
1  basisOfRecord     FOSSIL_SPECIMEN
2  basisOfRecord  PRESERVED_SPECIMEN

This provides the information you need to pass meaningful queries to galah_filter.

>>> galah.atlas_counts(filters="basisOfRecord=LIVING_SPECIMEN")
   totalRecords
0        126135