{ "metadata": { "name": "", "signature": "sha256:ce94a81c498edd736bc185974940c1b103c326f34252f47e4c50ca19ae3dcc20" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Using OWSLib to access Bureau of Meteorology Water Data Services (using Sensor Observation Service 2.0)\n", "\n", "This py notebook shows how to retrieve water data from the Bureau of Meteorology's water data services (see http://www.bom.gov.au/waterdata/). The data service is a Sensor Observation Service (SOS) v2.0. \n", "\n", "## Service setup and metadata\n", "\n", "The following imports the required OWSLib library, and contructs the base service object using the BoM service URL. Note that some of the functions use here are not yet merged into OWSLib (see https://github.com/geopython/OWSLib/pull/241). " ] }, { "cell_type": "code", "collapsed": false, "input": [ "from owslib.sos import SensorObservationService\n", "from owslib.swe.observation.sos200 import SOSGetObservationResponse\n", "from IPython.core.display import HTML\n", "\n", "service = SensorObservationService('http://www.bom.gov.au/waterdata/services',version='2.0.0')" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 6 }, { "cell_type": "markdown", "metadata": {}, "source": [ "We now have a service description document (capabilities doc). This describes what the service can do and provides some identifiers for various data offerings. For example, we can extract all the available observed properties from the service:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "str =''\n", "for prop in service.observed_properties:\n", " str += '