python-sa-gwdata


Namepython-sa-gwdata JSON
Version 0.14 PyPI version JSON
download
home_pagehttps://github.com/kinverarity1/python-sa-gwdata
SummaryUnofficial Python package to ease access to groundwater data in South Australia
upload_time2024-03-29 07:21:19
maintainerNone
docs_urlNone
authorKent Inverarity
requires_python>=3.6
licenseMIT
keywords groundwater data
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage
            # python-sa-gwdata

[![License](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/kinverarity1/aseg_gdf2/blob/master/LICENSE)

Python code to get groundwater data for South Australia

This code provides the Python package ``sa_gwdata`` to make it easier to download and access groundwater data from the South Australian Department for Environment and Water's [Groundwater Data website](https://www.waterconnect.sa.gov.au/Systems/GD/Pages/Default.aspx). It also provides some help for getting related data from the Department for Energy and Mining's [South Australian Resources Information Gateway (SARIG) website](https://minerals.sarig.sa.gov.au/QuickSearch.aspx).

This is an unofficial side-project done in my spare time.

## How to use

Check out the [complete package documentation](https://python-sa-gwdata.readthedocs.io/en/latest/index.html), and
some tutorial Jupyter Notebooks in the [notebooks](notebooks) folder.

Define the wells you are interested in manually:

```python
>>> import sa_gwdata
>>> wells = sa_gwdata.find_wells("5928-203 and also ULE 96")
>>> wells
["LKW042", "ULE096"]
```

(It has recognised automatically that [5928-203](https://www.waterconnect.sa.gov.au/Systems/GD/Pages/Details.aspx?DHNO=7207&PN=1421712654109#Summary) is also known as LKW042).

Or search for wells by geographic area:

```python
>>> wells = sa_gwdata.find_wells_in_lat_lon([-34.65, -34.62], [135.47, 135.51])
```

Then you can download data as pandas DataFrames:

```python
>>> wls = sa_gwdata.water_levels(wells)
>>> tds = sa_gwdata.salinities(wells)
>>> dlogs = sa_gwdata.drillers_logs(wells)
```

There is also full access to the underlying [set of web services](https://python-sa-gwdata.readthedocs.io/en/latest/webservices.html) which provide a variety of data in JSON format.

Start a session with Groundwater Data:

```python
>>> session = sa_gwdata.WaterConnectSession()
```

On initialisation it downloads some summary information.

```python
>>> session.networks
{'ANGBRM': 'Angas Bremer PWA',
 'AW_NP': 'Alinytjara Wilurara Non-Prescribed Area',
 'BAROOTA': 'Baroota PWRA',
 'BAROSSA': 'Barossa PWRA',
 'BAROSS_IRR': 'Barossa irrigation wells salinity monitoring',
 'BERI_REN': 'Berri and Renmark Irrigation Areas',
 'BOT_GDNS': 'Botanic Gardens wetlands',
 'CENT_ADEL': 'Central Adelaide PWA',
 'CHOWILLA': 'Chowilla Floodplain',
 ...
}
```

With this information we can make some direct REST calls:

```python
>>> r = session.get("GetObswellNetworkData", params={"Network": "CENT_ADEL"})
>>> r.df.head(5)
```

```
	aq_mon	chem	class	dhno	drill_date	lat	latest_open_date	latest_open_depth	latest_sal_date	latest_swl_date	...	pwa	replaceunitnum	sal	salstatus	stat_desc	swl	swlstatus	tds	water	yield
0	Tomw(T2)	Y	WW	27382	1968-02-07	-34.764662	1992-02-20	225.00	2013-09-02	2018-09-18	...	Central Adelaide	NaN	Y	C	OPR	3.47	C	3620.0	Y	2.00
1	Qhcks	N	WW	27437	1963-01-01	-34.800905	1963-01-01	6.40	1984-02-01	1986-03-05	...	Central Adelaide	NaN	Y	H	NaN	5.86	H	1121.0	Y	NaN
2	Tomw(T1)	Y	WW	27443	1972-04-20	-34.811124	2014-04-01	0.00	1991-10-09	2003-07-04	...	Central Adelaide	NaN	Y	H	BKF	NaN	H	2030.0	Y	5.00
3	Tomw(T1)	Y	WW	27504	1978-02-28	-34.779893	1978-02-28	144.50	2016-04-06	2011-09-18	...	Central Adelaide	NaN	Y	H	OPR	11.21	H	2738.0	Y	0.00
4	Tomw(T1)	Y	WW	27569	1975-01-01	-34.891250	1975-07-09	131.10	1986-11-13	1988-09-21	...	Central Adelaide	NaN	Y	H	BKF	9.90	H	42070.0	Y	12.50
```

## Install

You will need Python 3.8 or a more recent version.

```bash
$ pip install -U python-sa-gwdata
```

This installs the latest [release](https://github.com/kinverarity1/python-sa-gwdata/releases) of the Python package ``sa_gwdata``.

To install the latest code from GitHub, make sure you the dependencies ``pandas`` and ``requests`` installed, then use:

```bash
$ pip install https://github.com/kinverarity1/python-sa-gwdata/archive/master.zip
```

## License

MIT

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kinverarity1/python-sa-gwdata",
    "name": "python-sa-gwdata",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "groundwater data",
    "author": "Kent Inverarity",
    "author_email": "kinverarity@hotmail.com",
    "download_url": "https://files.pythonhosted.org/packages/4c/db/55dfadbba21be2ccd8960d57cc7c5fceef705d75fdd3575b4b0479c95581/python-sa-gwdata-0.14.tar.gz",
    "platform": null,
    "description": "# python-sa-gwdata\r\n\r\n[![License](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/kinverarity1/aseg_gdf2/blob/master/LICENSE)\r\n\r\nPython code to get groundwater data for South Australia\r\n\r\nThis code provides the Python package ``sa_gwdata`` to make it easier to download and access groundwater data from the South Australian Department for Environment and Water's [Groundwater Data website](https://www.waterconnect.sa.gov.au/Systems/GD/Pages/Default.aspx). It also provides some help for getting related data from the Department for Energy and Mining's [South Australian Resources Information Gateway (SARIG) website](https://minerals.sarig.sa.gov.au/QuickSearch.aspx).\r\n\r\nThis is an unofficial side-project done in my spare time.\r\n\r\n## How to use\r\n\r\nCheck out the [complete package documentation](https://python-sa-gwdata.readthedocs.io/en/latest/index.html), and\r\nsome tutorial Jupyter Notebooks in the [notebooks](notebooks) folder.\r\n\r\nDefine the wells you are interested in manually:\r\n\r\n```python\r\n>>> import sa_gwdata\r\n>>> wells = sa_gwdata.find_wells(\"5928-203 and also ULE 96\")\r\n>>> wells\r\n[\"LKW042\", \"ULE096\"]\r\n```\r\n\r\n(It has recognised automatically that [5928-203](https://www.waterconnect.sa.gov.au/Systems/GD/Pages/Details.aspx?DHNO=7207&PN=1421712654109#Summary) is also known as LKW042).\r\n\r\nOr search for wells by geographic area:\r\n\r\n```python\r\n>>> wells = sa_gwdata.find_wells_in_lat_lon([-34.65, -34.62], [135.47, 135.51])\r\n```\r\n\r\nThen you can download data as pandas DataFrames:\r\n\r\n```python\r\n>>> wls = sa_gwdata.water_levels(wells)\r\n>>> tds = sa_gwdata.salinities(wells)\r\n>>> dlogs = sa_gwdata.drillers_logs(wells)\r\n```\r\n\r\nThere is also full access to the underlying [set of web services](https://python-sa-gwdata.readthedocs.io/en/latest/webservices.html) which provide a variety of data in JSON format.\r\n\r\nStart a session with Groundwater Data:\r\n\r\n```python\r\n>>> session = sa_gwdata.WaterConnectSession()\r\n```\r\n\r\nOn initialisation it downloads some summary information.\r\n\r\n```python\r\n>>> session.networks\r\n{'ANGBRM': 'Angas Bremer PWA',\r\n 'AW_NP': 'Alinytjara Wilurara Non-Prescribed Area',\r\n 'BAROOTA': 'Baroota PWRA',\r\n 'BAROSSA': 'Barossa PWRA',\r\n 'BAROSS_IRR': 'Barossa irrigation wells salinity monitoring',\r\n 'BERI_REN': 'Berri and Renmark Irrigation Areas',\r\n 'BOT_GDNS': 'Botanic Gardens wetlands',\r\n 'CENT_ADEL': 'Central Adelaide PWA',\r\n 'CHOWILLA': 'Chowilla Floodplain',\r\n ...\r\n}\r\n```\r\n\r\nWith this information we can make some direct REST calls:\r\n\r\n```python\r\n>>> r = session.get(\"GetObswellNetworkData\", params={\"Network\": \"CENT_ADEL\"})\r\n>>> r.df.head(5)\r\n```\r\n\r\n```\r\n\taq_mon\tchem\tclass\tdhno\tdrill_date\tlat\tlatest_open_date\tlatest_open_depth\tlatest_sal_date\tlatest_swl_date\t...\tpwa\treplaceunitnum\tsal\tsalstatus\tstat_desc\tswl\tswlstatus\ttds\twater\tyield\r\n0\tTomw(T2)\tY\tWW\t27382\t1968-02-07\t-34.764662\t1992-02-20\t225.00\t2013-09-02\t2018-09-18\t...\tCentral Adelaide\tNaN\tY\tC\tOPR\t3.47\tC\t3620.0\tY\t2.00\r\n1\tQhcks\tN\tWW\t27437\t1963-01-01\t-34.800905\t1963-01-01\t6.40\t1984-02-01\t1986-03-05\t...\tCentral Adelaide\tNaN\tY\tH\tNaN\t5.86\tH\t1121.0\tY\tNaN\r\n2\tTomw(T1)\tY\tWW\t27443\t1972-04-20\t-34.811124\t2014-04-01\t0.00\t1991-10-09\t2003-07-04\t...\tCentral Adelaide\tNaN\tY\tH\tBKF\tNaN\tH\t2030.0\tY\t5.00\r\n3\tTomw(T1)\tY\tWW\t27504\t1978-02-28\t-34.779893\t1978-02-28\t144.50\t2016-04-06\t2011-09-18\t...\tCentral Adelaide\tNaN\tY\tH\tOPR\t11.21\tH\t2738.0\tY\t0.00\r\n4\tTomw(T1)\tY\tWW\t27569\t1975-01-01\t-34.891250\t1975-07-09\t131.10\t1986-11-13\t1988-09-21\t...\tCentral Adelaide\tNaN\tY\tH\tBKF\t9.90\tH\t42070.0\tY\t12.50\r\n```\r\n\r\n## Install\r\n\r\nYou will need Python 3.8 or a more recent version.\r\n\r\n```bash\r\n$ pip install -U python-sa-gwdata\r\n```\r\n\r\nThis installs the latest [release](https://github.com/kinverarity1/python-sa-gwdata/releases) of the Python package ``sa_gwdata``.\r\n\r\nTo install the latest code from GitHub, make sure you the dependencies ``pandas`` and ``requests`` installed, then use:\r\n\r\n```bash\r\n$ pip install https://github.com/kinverarity1/python-sa-gwdata/archive/master.zip\r\n```\r\n\r\n## License\r\n\r\nMIT\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Unofficial Python package to ease access to groundwater data in South Australia",
    "version": "0.14",
    "project_urls": {
        "Homepage": "https://github.com/kinverarity1/python-sa-gwdata"
    },
    "split_keywords": [
        "groundwater",
        "data"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c9676e4a621e8ae509afa6e1920c0d4878e499f534781199d24d5192f799b139",
                "md5": "ed0a39a969c152f775313fd4272c88bb",
                "sha256": "0a0e7003410a4fed3fa1da95565682293fc4e8dbba5f5de35b61f161faa1e3a6"
            },
            "downloads": -1,
            "filename": "python_sa_gwdata-0.14-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ed0a39a969c152f775313fd4272c88bb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 21275,
            "upload_time": "2024-03-29T07:21:17",
            "upload_time_iso_8601": "2024-03-29T07:21:17.125525Z",
            "url": "https://files.pythonhosted.org/packages/c9/67/6e4a621e8ae509afa6e1920c0d4878e499f534781199d24d5192f799b139/python_sa_gwdata-0.14-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4cdb55dfadbba21be2ccd8960d57cc7c5fceef705d75fdd3575b4b0479c95581",
                "md5": "92c7f2ffb4734b1c695e1780d87bdc46",
                "sha256": "23331b3bff7eaf7fd13f456a125c2351f9bf59c9622c4df79ee7b407510988b8"
            },
            "downloads": -1,
            "filename": "python-sa-gwdata-0.14.tar.gz",
            "has_sig": false,
            "md5_digest": "92c7f2ffb4734b1c695e1780d87bdc46",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4395132,
            "upload_time": "2024-03-29T07:21:19",
            "upload_time_iso_8601": "2024-03-29T07:21:19.531458Z",
            "url": "https://files.pythonhosted.org/packages/4c/db/55dfadbba21be2ccd8960d57cc7c5fceef705d75fdd3575b4b0479c95581/python-sa-gwdata-0.14.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-29 07:21:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kinverarity1",
    "github_project": "python-sa-gwdata",
    "travis_ci": true,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "python-sa-gwdata"
}
        
Elapsed time: 0.21812s