Skip to content
Semantic Container with weather data.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

ZAMG Weather Data

This Semantic Container provides data from measurements of automatic weather stations in Austria maintained by ZAMG.

Docker Image:


To get a general introduction to the use of Semantic Containers please refer to the SemCon Tutorial.
Start container locally:

$ docker pull semcon/sc-tawes
$ docker run -d -p 3000:3000 semcon/sc-tawes

Access data:

$ curl http://localhost:3000/api/data


This section lists examples how to use this Semantic Container.


Perform the following steps to build up a local weather archive.

  • start an empty container that accepts data in CSV format

    $ wget
    $ docker run -d -p 3000:3000 semcon/sc-tawes /bin/ "$(< init_format_csv.trig)"
  • setup a cron script to fetch data on an hourly basis (replace id=xyz with your actual location)

    $ (crontab -l; echo "0 * * * * curl | curl -H "Content-Type: application/json" -d @- -X POST http://localhost:3000/api/data") | crontab


Semantic Containers support selling access to data. Perform the following steps to use this functionality:

  • start a dedicated billing service:
    a template is available on Github and Dockerhub; see also Swagger documentation

    $ docker run -d --name srv-billing -p 4800:3000 -v $PWD/key:/key --env-file .env semcon/srv-billing
  • start container with AUTH=billing:

    $ docker run -p 4000:3000 -d --name billing -e AUTH=billing --link srv-billing semcon/sc-base /bin/ "$(< init.trig)"
  • access to container is restricted:

    $ curl -s http://localhost:4000/api/data | jq
        "billing": {
            "payment-info": " text information...",
            "payment-methods": [ "Ether" ],
            "provider": "",
            "provider-pubkey-id": "..."
        "provision": {...},
        "validation": {...}
  • request to buy data:
    provide information about buyer in buyer_info.json:

        "buyer-info":{ ... hash with additional information ... },
        "signature":"...request signed with private GPG key and base64 encoded..."

    and send request:

    $ curl -s -H "Content-Type: application/json" \
        -d "$(< buyer_info.json)" \
        -X POST http://localhost:4000/api/buy | jq
        "billing": {
            "uid": "123..................................def",
            "signature": "...uid signed with private GPG key and base64 encoded...",
            "provider": "",
            "provider-pubkey-id": "...",
            "offer-timestamp": "2019-01-02T03:04:05.678Z",
            "offer-info": " text information...",
            "payment-method": "Ether",
            "payment-address": "0x123..................................def",
            "cost": 0.123,
            "payment-info": " text information..."
        "provision": {...},
        "validation": {...}
  • confirm transaction and access data: transfer the stated cost and use the uid from above in the input field; confirm the payment by sending the transaction hash:

    $ curl -s "http://localhost:4000/api/paid?tx=0x123def" | jq
        "key": "...oauth access key...",
        "secret": "...oauth secret encrypted with public key from buyer and base64 encoded..."

    Base64 decode and decrypt the secret to retrieve the Oauth2 secret and request a token:

    $ curl -s -d grant_type=client_credentials \
      -d client_id=$OAUTH_KEY \
      -d client_secret=$OAUTH_SECRET \
      -d scope=read \
      -X POST http://localhost:4000/oauth/token

    And finally request the data:

    $ curl -s -H "Authorization: Bearer $OATH_TOKEN" "http://localhost:4000/api/data?option1=value1&option2=value2"

Improve this Semantic Container

Please report any bugs or feature requests in the GitHub Issue-Tracker and follow the Contributor Guidelines.

If you want to develop yourself, follow these steps:

  1. Fork it!
  2. Create a feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Send a pull request



MIT Lizenz 2019 -

You can’t perform that action at this time.