pybomwater

Provides access to Web Data Services ( SOS2 ) station reference data and historical time series water data for stations across Australia, collected by the Bureau of Meteorology.
https://github.com/csiro/pybomwater

Category: Hydrosphere
Sub Category: Ocean and Hydrology Data Access

Keywords from Contributors

geostatistics spatio-temporal-analysis

Last synced: about 22 hours ago
JSON representation

Repository metadata

Tool for requesting data from BoM Water Data Service

README.md

BoM Water

A python tool for requesting data from BoM Sensor Observation Service (SOS2, as WaterML 2.0 format)

website
license status CI pypi
codecov

This package has been developed to access to the BoM Water Data Sensor Observation Service (SOS) with a goal to easily and efficiently integrate data into scientific workflows

License

MIT-derived (see License.txt)

Installation

From pypi:

pip install pybomwater

From source:

  • Using poetry
    • I like to keep the .venv in my project directory so I use poetry config --local virtualenvs.in-project true
    • poetry install which will install the dependencies listed in the poetry.lock
    • poetry shell which is initialize the environment within your running application (eg cmd), or in VS Code Cmd+Shift+p and then type Python Interpreter and select the environment you just built.

Usage

see Jupyter Notebook example


NOTE

The first time a BomWater object is instantiated (bm = bom_water.BomWater()) a cache of data is created. This process obtains data from the BoM service and will take a little while to complete. Once cached this process is not repeated and performance will return to normal.


Running tests

By default, pytest skips tests that call the live BoM SOS service. To run those
integration tests explicitly:

PYBOMWATER_RUN_LIVE=1 pytest -m live_bom

The progressive observation load test is gated separately. It makes five
increasingly large requests, stops immediately on HTTP 429, and prints timings,
response sizes, observation counts, and any rate-limit headers:

PYBOMWATER_RUN_LOAD=1 pytest -m load_bom -s

The companion notebook test is also gated separately. It clones
bomwater-notebook into a temporary directory and executes every notebook
against the current pybomwater checkout. Install its optional runtime and run
it with:

python -m pip install -r requirements-notebooks.txt

PYBOMWATER_RUN_NOTEBOOKS=1 pytest -m notebook_bom -s

Documentation

Bureau of Meteorology (BoM) documentation on using their SOS service is available at the following links:

The following cells implement requests that access the BoM SOS2 service.

GetCapabilties

Lists services available and the filters that can be used to select data output by those services. It also provides an overview of parameters, time series types and geographic area covered by the services.

GetFeatureOfInterest

Provides details about a set of geographical features or locations at which observations are measured. They can be selected according to the parameter measured, type of time series available, and area or point location.

GetDataAvailability

Lists the type of data available for a ‘feature of interest’ and its coverage. This includes a list of parameters, the time series types available for each of the parameters, and the observed period of record for each time series type.

GetObservation

Returns observations of a specified ‘feature of interest’ and parameter, within a specific time series type. Each observation has a datetime, value, quality and interpolation type.

Parameter currently available via SOS2

Parameter Water regulation Data Subcategory
Dry Air Temperature 4f
Electrical Conductivity @ 25C 9a
Evaporation 4c
Ground Water Level 2a
Rainfall 4a
Relative Humidity 4h
Storage Level 3a
Storage Volume 3b
Turbidity 9d
Water Course Discharge (standard time series types) 1b
Water Course Discharge (flood warning time series types) 11b
Water Course Level (standard time series types) 1a
Water Course Level (flood warning time series types) 11a
Water pH 9g
Water Temperature 9h
Wind Direction 4

Timeseries pattern and aggreated available

Time series name Procedure Identifier Time series description
DMQaQc.Merged.DailyMean.24HR Pat1_C_B_1_DailyMean or Pat9_C_B_1_DailyMean DMQaQc.Merged.AsStored.1 timeseries aggregated to daily means, reported from midnight to midnight.
DMQaQc.Merged.DailyMax.24HR Pat1_C_B_1_DailyMax or Pat9_C_B_1_DailyMax Maximum of values in the DMQaQc.Merged.AsStored.1 timeseries - from midnight to midnight
DMQaQc.Merged.DailyMin.24HR Pat1_C_B_1_DailyMin or Pat9_C_B_1_DailyMin Minimum of values in the DMQaQc.Merged.AsStored.1 timeseries - from midnight to midnight.
DMQaQc.Merged.MonthlyMean.CalMonth Pat1_C_B_1_MonthlyMean or Pat9_C_B_1_MonthlyMean DMQaQc.Merged.AsStored.1 timeseries aggregated to monthly means.
DMQaQc.Merged.YearlyMean.CalYear Pat1_C_B_1_YearlyMean or Pat9_C_B_1_YearlyMean DMQaQc.Merged.AsStored.1 timeseries aggregated to yearly means.
DMQaQc.Merged.DailyTotal.09HR Pat2_C_B_1_DailyTot09 DMQaQc.Merged.AsStored.1 timeseries aggregated to daily totals, reported from 9am to 9am.
DMQaQc.Merged.DailyTotal.24HR Pat2_C_B_1_DailyTot24 DMQaQc.Merged.AsStored.1 timeseries aggregated to daily totals,reported from midnight to midnight.
DMQaQc.Merged.MonthlyTotal.CalMonth Pat2_C_B_1_MonthlyTot24 DMQaQc.Merged.AsStored.1 timeseries aggregated to monthly totals.
DMQaQc.Merged.YearlyTotal.CalYear Pat2_C_B_1_YearlyTot24 DMQaQc.Merged.AsStored.1 timeseries aggregated to yearly totals.
DMQaQc.Merged.HourlyMean.HR Pat3_C_B_1_HourlyMean DMQaQc.Merged.AsStored.1 timeseries aggregated to hourly means.
DMQaQc.Merged.DailyMean.24HR Pat3_C_B_1_DailyMean DMQaQc.Merged.AsStored.1 timeseries aggregated to daily means, reported from midnight to midnight.
DMQaQc.Merged.DailyMax.24HR Pat3_C_B_1_DailyMax Maximum of values in the DMQaQc.Merged.AsStored.1 timeseries - from midnight to midnight.
DMQaQc.Merged.DailyMin.24HR Pat3_C_B_1_DailyMin Minimum of values in the DMQaQc.Merged.AsStored.1 timeseries - from midnight to midnight.
DMQaQc.Merged.MonthlyMean.CalMonth Pat3_C_B_1_MonthlyMean DMQaQc.Merged.AsStored.1 timeseries aggregated to monthly means.
DMQaQc.Merged.YearlyMean.CalYear Pat3_C_B_1_YearlyMean DMQaQc.Merged.AsStored.1 timeseries aggregated to yearly means.
DMQaQc.Merged.HourlyMean.HR Pat4_C_B_1_HourlyMean DMQaQc.Merged.AsStored.1 timeseries aggregated to hourly means.
DMQaQc.Merged.DailyMean.09HR Pat4_C_B_1_DailyMean09 DMQaQc.Merged.AsStored.1 timeseries aggregated to daily means, reported from 9am to 9am.
DMQaQc.Merged.DailyMax.24HR Pat4_C_B_1_DailyMax Maximum of values in the DMQaQc.Merged.AsStored.1 timeseries - from midnight to midnight.
DMQaQc.Merged.DailyMin.24HR Pat4_C_B_1_DailyMin Minimum of values in the DMQaQc.Merged.AsStored.1 timeseries - from midnight to midnight.
DMQaQc.Merged.DailyMean.24HR Pat4_C_B_1_DailyMean DMQaQc.Merged.AsStored.1 timeseries aggregated to daily means, reported from midnight to midnight.
DMQaQc.Merged.MonthlyMean.CalMonth Pat4_C_B_1_MonthlyMean DMQaQc.Merged.AsStored.1 timeseries aggregated to monthly means.
DMQaQc.Merged.YearlyMean.CalYear Pat4_C_B_1_YearlyMean DMQaQc.Merged.AsStored.1 timeseries aggregated to yearly means.
DMQaQc.Merged.HourlyMean.HR Pat6_C_B_1_HourlyMean or Pat7_C_B_1_HourlyMean DMQaQc.Merged.AsStored.1 timeseries aggregated to hourly means.
DMQaQc.Merged.DailyMean.24HR Pat6_C_B_1_DailyMean or Pat7_C_B_1_DailyMean DMQaQc.Merged.AsStored.1 timeseries aggregated to daily means, reported from midnight to midnight.
DMQaQc.Merged.DailyMax.24HR Pat6_C_B_1_DailyMax or Pat7_C_B_1_DailyMax Maximum of values in theDMQaQc.Merged.AsStored.1 timeseries - from midnight to midnight.
DMQaQc.Merged.DailyMin.24HR Pat6_C_B_1_DailyMin or Pat7_C_B_1_DailyMin Minimum of values in the DMQaQc.Merged.AsStored.1 timeseries - from midnight to midnight.
DMQaQc.Merged.MonthlyMean.CalMonth Pat6_C_B_1_MonthlyMean or Pat7_C_B_1_MonthlyMean DMQaQc.Merged.AsStored.1 timeseries aggregated to monthly means.
DMQaQc.Merged.YearlyMean.CalYear Pat6_C_B_1_YearlyMean or Pat7_C_B_1_YearlyMean DMQaQc.Merged.AsStored.1 timeseries aggregated to yearly means.

Task list


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 3 days ago

Total Commits: 95
Total Committers: 5
Avg Commits per committer: 19.0
Development Distribution Score (DDS): 0.126

Commits in past year: 6
Committers in past year: 3
Avg Commits per committer in past year: 2.0
Development Distribution Score (DDS) in past year: 0.667

Name Email Commits
Andrew Freebairn a****n@c****u 83
Julien Lerat j****t@c****u 6
dependabot[bot] 4****] 2
Leighton, Ben (Environment, Clayton) B****n@c****u 2
J-M j****d@c****u 2

Committer domains:


Dependencies

requirements.txt pypi
  • geojson *
  • iso8601 *
  • pytz *
  • requests *
  • shapely *
setup.py pypi
  • geojson *
  • iso8601 *
  • json5 *
  • pandas *
  • pytz *
  • requests *
  • shapely *
  • xmltodict *
.github/workflows/main.yml actions
  • abatilo/actions-poetry v2 composite
  • actions/cache v1 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/release.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • softprops/action-gh-release v1 composite
poetry.lock pypi
  • attrs 23.1.0
  • certifi 2023.7.22
  • cftime 1.6.3
  • charset-normalizer 3.3.0
  • click 8.1.7
  • click-plugins 1.1.1
  • cligj 0.7.2
  • codecov 2.1.13
  • colorama 0.4.6
  • coverage 7.3.2
  • exceptiongroup 1.1.3
  • fiona 1.9.5
  • geojson 3.0.1
  • geopandas 0.14.0
  • idna 3.4
  • iniconfig 2.0.0
  • iso8601 2.1.0
  • lxml 4.9.3
  • netcdf4 1.6.4
  • numpy 1.26.1
  • owslib 0.29.2
  • packaging 23.2
  • pandas 2.1.1
  • pluggy 1.3.0
  • pyproj 3.6.1
  • pytest 7.4.2
  • pytest-cov 4.1.0
  • python-dateutil 2.8.2
  • pytz 2023.3.post1
  • pyyaml 6.0.1
  • requests 2.31.0
  • scipy 1.11.3
  • setuptools 68.2.2
  • shapely 2.0.2
  • six 1.16.0
  • tomli 2.0.1
  • tzdata 2023.3
  • urllib3 2.0.7
  • xarray 2023.10.1
  • xmltodict 0.13.0
pyproject.toml pypi
  • codecov ^2.1.13
  • fiona ^1.9.4.post1
  • geojson ^3.0.1
  • geopandas ^0.14.0
  • iso8601 ^2.1.0
  • lxml ^4.9.3
  • netcdf4 ^1.6.4
  • owslib ^0.29.2
  • pandas ^2.1.1
  • pytest ^7.4.2
  • pytest-cov ^4.1.0
  • python >=3.10,<3.12
  • pytz ^2023.3.post1
  • requests ^2.31.0
  • scipy ^1.11.3
  • shapely ^2.0.1
  • xarray ^2023.9.0
  • xmltodict ^0.13.0
.github/workflows/release_test.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • softprops/action-gh-release v1 composite
environment.yml conda
  • codecov
  • geojson
  • iso8601
  • json5
  • pandas
  • pytest
  • pytest-cov
  • python
  • pytz
  • requests
  • shapely
  • xmltodict
requirements-notebooks.txt pypi
  • cftime >=1.6,<2
  • ipyfilechooser >=0.6,<1
  • ipykernel >=6,<7
  • ipyleaflet >=0.17,<1
  • ipywidgets >=8,<9
  • matplotlib >=3.6,<4
  • nbconvert >=7,<8
  • numpy >=1.26,<2
  • pint ==0.20
  • pint-xarray ==0.3
  • plotly >=5.18,<6
  • sidecar >=0.8,<1

Score: 5.164785973923514