Skip to main content

Unofficial Python package to ease access to groundwater data in South Australia

Project description

python-sa-gwdata

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. It also provides some help for getting related data from the Department for Energy and Mining's South Australian Resources Information Gateway (SARIG) website.

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

How to use

Check out the documentation, and some tutorial Jupyter Notebooks in the notebooks folder.

Define the wells you are interested in manually:

>>> import sa_gwdata
>>> wells = sa_gwdata.find_wells("5928-203", "ule 96")
>>> wells
["LKW042", "ULE096"]

(It has recognised automatically that 5928-203 is also known as LKW042).

Or search for wells by geographic area:

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

Then you can download data as pandas DataFrames:

>>> 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 which provide a variety of data in JSON format.

Start a session with Groundwater Data:

>>> session = sa_gwdata.WaterConnectSession()

On initialisation it downloads some summary information.

>>> 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:

>>> 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.6 or a more recent version.

$ pip install python-sa-gwdata

This installs the latest release of the Python package sa_gwdata.

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

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

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-sa-gwdata-0.9.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

python_sa_gwdata-0.9.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file python-sa-gwdata-0.9.0.tar.gz.

File metadata

  • Download URL: python-sa-gwdata-0.9.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1.post20191125 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.5

File hashes

Hashes for python-sa-gwdata-0.9.0.tar.gz
Algorithm Hash digest
SHA256 e30faf066ed6dcef71b0a69ec5738eb6dfa5588ee0d65a577e0a4edec7f8bc10
MD5 3876937d5e343a41a9d536ad0369f3b4
BLAKE2b-256 ab66e0cd55034355690c8cc42cde35cc1f9bf9b3e0546157ba498a852359f6c4

See more details on using hashes here.

File details

Details for the file python_sa_gwdata-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: python_sa_gwdata-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1.post20191125 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.5

File hashes

Hashes for python_sa_gwdata-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36ce94cec4a7699b24448d7f9caa1410bab34ea4b73c6042649a14421da5cdbe
MD5 0dd055698eead7fc7bb96f227b1bab75
BLAKE2b-256 0183e4486b8b5eac9dd4e8009313a5b5385101dc64f7b620838dbb55bc6af83f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page