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
.. ... ... ... ...
840 multimediaLicence Media filter field media
841 images Media filter field media
842 videos Media filter field media
843 sounds Media filter field media
844 qid Reference to pre-generated query other
[845 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 type |
Description |
---|---|
Configuration |
|
|
Show what living atlases are available |
|
Show what APIs & functions are available for each atlas |
|
Show what values are acceptable as ‘download reasons’ for a specified atlas |
Taxonomy |
|
|
Take a universal identifier and return taxonomic information |
|
Show valid taxonomic ranks (e.g. Kingdom, Class, Order, etc.) |
Filters |
|
|
Show fields that are stored in an atlas |
|
Show results of data quality checks run by each atlas |
Group filters |
|
|
Show what data quality profiles are available |
|
Show what species lists are available |
Data providers |
|
|
Show which institutions have provided data |
|
Show the specific collections within those institutions |
|
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 MACHINE_OBSERVATION
3 basisOfRecord OCCURRENCE
4 basisOfRecord 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 127287