MDBA Gauge Getter
Description
MDBA Gauge Getter provides a unified and simple interface to collect surface water data from the following state water portals:
| State | Site | Source |
|---|---|---|
| NSW | realtimedata.waternsw.com.au | CP |
| QLD | water-monitoring.information.qld.gov.au | PUBLISH |
| VIC | data.water.vic.gov.au | AT |
| SA | bom.gov.au/waterdata/ | BOM Water Data Online |
The tool is configured to abstract away the details specific to each state water portal and return a consistent structure. By default it will return a daily mean of a flow in ML/day for a given gauge number, but storage level, storage volume, other intervals and aggregations are available.
Example of its use can be seen in Gauge_getter_example.ipynb notebook, contact ben.bradshaw@mdba.gov.au for more details.
Local Installation via git
- Clone the repo in your local folder: for example, inside
~./users/john.doegit clonehttps://github.com/MDBAuth/MDBA_Gauge_Getter.gitwhich will create a git tracked project repository inside~./users/john.doe/mdba_gauge_getter. - Create a virtual environment: for example,
conda create --name gauge_getter_env. - Activate the virtual environment:
conda activate gauge_getter_env. - Go inside the project folder i.e.,
cd ~./users/john.doe/mdba_gauge_getter. - Check
git statusandgit branch. - Install dependencies with
pip3 install -r requirements.txt - (Optionally) install dev dependencies with
pip3 install -r requirements-dev.txt - Run
python3 setup.py installto install the module
Quick Start
- Install via pip with the command:
pip install mdba-gauge-getter - After installation, import the package with the command:
import mdba_gauge_getter.gauge_getter as gg - Import datetime for converting your intervals into python datetime object:
import datetime as dt
Usage
There are several options to call Gauge Getter which are as follows:
gauge_numbersdenotes the gauge(s) for which the parameters such as flow, lake/storage level, storage volume etc. will be obtained. It takes a list of strings (gauge numbers) as input.start_time_userdenotes the start time of the userdefined interval. It takes a datetime python object as input.end_time_userdenotes the end time of the userdefined interval. It takes a datetime python object as input.data_sourcedenotes which state the gauge(s) belong(s) to which API to fetch the data from. Please note that SA does not currently have an API to obtain the data from; hence, the data is fetched from the BOM API. Different data_source options are:- i.e., 'NSW', 'VIC', 'QLD', 'SA'/'BOM'
- 'BOM'
vardenotes the parameter to retreieve such as flow, lake/storage level, storage volume etc. It takes a string indicating the parameter type as input. Different string notation for different var options are:- 'F' for flow (default).
- 'L' for water level used for flow calculation.
- 'LL'/'SL' for lake/storage level.
- 'SV' for storage volume. Please note that this is exclusively a BOM API parameter. Please specify the data source as 'BOM' if you would like to retrieve this parameter.
intervalindicates the duration the parameter data are collected for aggregation. Different interval options are:- 'day'. Alternate options for BOM API call is: 'd'.
- 'hour'. Alternate options for BOM API call is: 'h'.
- 'month'. Alternate options for BOM API call is: 'm'.
- 'year'. Alternate options for BOM API call is: 'y'.
data_typeinidcates the aggregation method. Different data_type options are:- 'mean' (default). Alternate options for BOM API call are: 'avg', 'average', 'av' and 'a'.
- 'min'. Alternate options for BOM API call is: 'minimum'. Only available when obtaining daily interval data.
- 'max'. Alternate options for BOM API call is: 'maximum'. Only available when obtaining daily interval data.
Support
For issues relating to the script, a tutorial, or feedback please contact Ben Bradshaw (ben.bradshaw@mdba.gov.au) or Ahsanul Habib (ahsanul.habib@mdba.gov.au).
For data issues please see the corresponding state water portals.
Metadata
Release files for mdba-gauge-getter 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mdba_gauge_getter-0.5.1.tar.gz | 515.8 kB | Without provenance | Details for mdba_gauge_getter-0.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mdba_gauge_getter-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for mdba_gauge_getter-0.5.1-py3-none-any.whl |
Total release size: 721.3 kB
Release files / mdba_gauge_getter-0.5.1.tar.gz
| Download URL | mdba_gauge_getter-0.5.1.tar.gz |
|---|---|
| Size | 515.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c03eda767e5af2fd3844456ab9d8e7ad8dc33b58e29d808a365064980d479a05
|
|
BLAKE2b-256 checksum How to use checksums |
42c12b61308ba0fcc7da2720969c98fec9ee205bc21722e343ea0ada3decf775
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / mdba_gauge_getter-0.5.1-py3-none-any.whl
| Download URL | mdba_gauge_getter-0.5.1-py3-none-any.whl |
|---|---|
| Size | 205.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
46bb141853c40b8c18d42dcb6a2df27110bea0385c4fbb0236570c7870ab48a6
|
|
BLAKE2b-256 checksum How to use checksums |
61dfc1ef14abc260fd6d9e857b803984037a672916292c998ff03efc181200f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Security for mdba-gauge-getter 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.