Example query: (show) (hide)

Query specification:

  • name: urn:fairease.eu:udal:example:weekdays
  • description: Name of weekdays in different languages
  • parameters:
    • (optional) lang: language selection (e.g., en, {en, fr} )
    • (optional) format: long (full weekday name, e.g., Monday) or short (abbreviation, e.g., Mon)
  • result: tabular data with columns
    • number – number from 1 (Monday) to 7 (Sunday)
    • lang – language of the data in the row
    • name – weekday name (when no format is selected or when format is long)
    • short_name – abbreviated weekday name (when no format is selected or when format is short)

which can return the following result when lang is set to en and no format is provided:

number lang name short_name
1 en Monday Mon
2 en Tuesday Tue
3 en Wednesday Wed
4 en Thursday Thu
5 en Friday Fri
6 en Saturday Sat
7 en Sunday Sun
Example query - MGO Observatory: (show) (hide)

Query specification:

  • name: urn:embrc.eu:emobon:observatory-overview
  • description: All EMO-BON observatories & associated metadata
  • parameters:
    • (optional) ID: observatory ID selection (e.g., BPNS )
    • (optional) type: type of observatory (water, sediment or hard)
  • result: tabular data with columns
    • observatory – indexnumber
    • URI – URI of the observatory
    • name – name of the observatory
    • type – type of observatory
    • country – country of the observatory
    • location – geographical coordinates of the observatory
    • MR-id – URI of the marine region(s) where the observatory is located
    • MR-name – name of the marine region(s) where the observatory is located
    • broad-biome – broad biome(s) associated with the observatory
    • local-biome – local biome(s) assocaited with the observatory
    • mixs-terms – MIxS term(s) associated with the observatory

which can return the following result when ID is set to BPNS and type to sediment:

observatory URI name type country location MR-id MR-name broad-biome local-biome mixs-terms
1 http://data.emobon.embrc.eu/observatory-bpns-crate/sediment/observatory/BPNS BPNS sediment Belgium (51.433331 2.808331) http://marineregions.org/mrgid/1912; http://marineregions.org/mrgid/2350; http://marineregions.org/mrgid/26567 North Atlantic Ocean; North Sea; Belgian part of the North Sea marine biome [ENVO:00000447]; marine benthic biome[ENVO_01000024] shallow_marine_sediment_[ENVO:03000034] sediment
  • Find a UDAL implementation (e.g., https://github.com/fair-ease/py-udal-fe-impl)

    from fairease.udal.udal import UDAL
    
  • Create a UDAL object

    wikidata = UDAL('https://www.wikidata.org/')
    
  • Execute a query

    query_name = 'urn:fairease.eu:udal:example:weekdays'
    query_params = { 'lang': 'en' }
    result = wikidata.execute(query_name, query_params)
    
  • Get the data

    data = result.data()
    

    which should contain something like

    number name lang
    1 Monday en
    2 Tuesday en
    3 Wednesday en
    4 Thursday en
    5 Friday en
    6 Saturday en
    7 Sunday en