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         Flanders                                            Vlaams Biodiversiteitsportaal      VBP    https://natuurdata.inbo.be
4           France       Portail français d'accès aux données d'observation sur les espèces  OpenObs          https://inpn.mnhn.fr
5           Global                                 Global Biodiversity Information Facility     GBIF              https://gbif.org
6        Guatemala  Sistema Nacional de Información sobre Diversidad Biológica de Guatemala   SNIBgt     https://snib.conap.gob.gt
7              Kew                                                          Kew Data Portal      KDP          https://data.kew.org
8         Portugal                                                            GBIF Portugal  GBIF.pt           https://www.gbif.pt
9            Spain                                                               GBIF Spain  GBIF.es           https://www.gbif.es
10          Sweden                                 Swedish Biodiversity Data Infrastructure     SDBI   https://biodiversitydata.se
11  United Kingdom                                            National Biodiversity Network      NBN            https://nbn.org.uk

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          abcdTypeStatus                     ABCD field in use by herbaria  field  NaN
1       acceptedNameUsage    http://rs.tdwg.org/dwc/terms/acceptedNameUsage  field  NaN
2     acceptedNameUsageID  http://rs.tdwg.org/dwc/terms/acceptedNameUsageID  field  NaN
3            accessRights                                               NaN  field  NaN
4          annotationsDoi                                               NaN  field  NaN
...                   ...                                               ...    ...  ...
1100    multimediaLicence                                Media filter field  media     
1101               images                                Media filter field  media     
1102               videos                                Media filter field  media     
1103               sounds                                Media filter field  media     
1104                  qid                  Reference to pre-generated query  other     

[1105 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 ASGS 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  raw_basisOfRecord                                                         The basis of record as supplied by the data publisher  field                                                                           NaN
1      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

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           OCCURRENCE
3  basisOfRecord  MACHINE_OBSERVATION
4  basisOfRecord          OBSERVATION
5  basisOfRecord      MATERIAL_SAMPLE
6  basisOfRecord      LIVING_SPECIMEN
7  basisOfRecord      FOSSIL_SPECIMEN
8  basisOfRecord    MATERIAL_CITATION

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        133650