Tools for downloading hydrologic and climate data.
Project description
dataretrieval: Download hydrologic data
=============================================
What is dataretrieval?
-----------------------
dataretrieval is a python alternative to USGS-R's dataRetrieval package for
obtaining USGS or EPA water quality data, streamflow data, and metadata
directly from web services. Note that dataretrieval is an **alternantive** to the
R package, not a port, in that it reproduces and expands upon the functionality
of the R package but the organization and functionality often differs.
Here's an example of how to use dataretrievel to retrieve data from the National Water Information System (NWIS).
```python
# first import the functions for downloading data from NWIS
import dataretrieval.nwis as nwis
# specify the USGS site code for which we want data.
site = '03339000'
# get instantaneous values (iv)
df = nwis.get_record(site=site, service='iv', start='2017-12-31', end='2018-01-01')
# get water quality samples (qwdata)
df2 = nwis.get_record(site=site, service='qwdata', start='2017-12-31', end='2018-01-01')
# get basic info about the site
df3 = nwis.get_record(site=site, service='site')
```
Services available from NWIS include:
- instantaneous values (iv)
- daily values (dv)
- statistics (stat)
- site info (site)
- discharge peaks (peaks)
- discharge measurements (measurements)
* water quality samples (qwdata)
To access the full functionality available from NWIS web services, nwis.get record appends any additional kwargs into the REST request. For example
```python
nwis.get_record(site='03339000', service='dv', start='2017-12-31', parameterCd='00060')
```
will download daily data with the parameter code 00060 (discharge).
More services and documentation to come!
Quick start
-----------
dataretrieval can be installed using pip:
$ python3 -m pip install -U dataretrieval
If you want to run the latest version of the code, you can install from git:
$ python3 -m pip install -U git+git://github.com/USGS-python/dataretrieval.git
Issue tracker
-------------
Please report any bugs and enhancement ideas using the dataretrieval issue
tracker:
https://github.com/USGS-python/dataretrieval/issues
Feel free to also ask questions on the tracker.
Help wanted
-----------
Any help in testing, development, documentation and other tasks is
highly appreciated and useful to the project.
For more details, see the file [CONTRIBUTING.md](CONTRIBUTING.md).
[](https://coveralls.io/github/thodson-usgs/data_retrieval?branch=master)
=============================================
What is dataretrieval?
-----------------------
dataretrieval is a python alternative to USGS-R's dataRetrieval package for
obtaining USGS or EPA water quality data, streamflow data, and metadata
directly from web services. Note that dataretrieval is an **alternantive** to the
R package, not a port, in that it reproduces and expands upon the functionality
of the R package but the organization and functionality often differs.
Here's an example of how to use dataretrievel to retrieve data from the National Water Information System (NWIS).
```python
# first import the functions for downloading data from NWIS
import dataretrieval.nwis as nwis
# specify the USGS site code for which we want data.
site = '03339000'
# get instantaneous values (iv)
df = nwis.get_record(site=site, service='iv', start='2017-12-31', end='2018-01-01')
# get water quality samples (qwdata)
df2 = nwis.get_record(site=site, service='qwdata', start='2017-12-31', end='2018-01-01')
# get basic info about the site
df3 = nwis.get_record(site=site, service='site')
```
Services available from NWIS include:
- instantaneous values (iv)
- daily values (dv)
- statistics (stat)
- site info (site)
- discharge peaks (peaks)
- discharge measurements (measurements)
* water quality samples (qwdata)
To access the full functionality available from NWIS web services, nwis.get record appends any additional kwargs into the REST request. For example
```python
nwis.get_record(site='03339000', service='dv', start='2017-12-31', parameterCd='00060')
```
will download daily data with the parameter code 00060 (discharge).
More services and documentation to come!
Quick start
-----------
dataretrieval can be installed using pip:
$ python3 -m pip install -U dataretrieval
If you want to run the latest version of the code, you can install from git:
$ python3 -m pip install -U git+git://github.com/USGS-python/dataretrieval.git
Issue tracker
-------------
Please report any bugs and enhancement ideas using the dataretrieval issue
tracker:
https://github.com/USGS-python/dataretrieval/issues
Feel free to also ask questions on the tracker.
Help wanted
-----------
Any help in testing, development, documentation and other tasks is
highly appreciated and useful to the project.
For more details, see the file [CONTRIBUTING.md](CONTRIBUTING.md).
[](https://coveralls.io/github/thodson-usgs/data_retrieval?branch=master)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dataretrieval-0.1.tar.gz
(12.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dataretrieval-0.1.tar.gz.
File metadata
- Download URL: dataretrieval-0.1.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dc59d8c681a9eb84bf786a7ac50650855d285cbe8f945983128b4c0348e8ef6
|
|
| MD5 |
5bb65341dfbee753371bea070f77e18c
|
|
| BLAKE2b-256 |
e1f39b69301341a55208555876d66c6ec735ec864c1c8aed4a0355f3eb42a733
|
File details
Details for the file dataretrieval-0.1-py3-none-any.whl.
File metadata
- Download URL: dataretrieval-0.1-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebb6b66172b6e9d06fb827863eefc9420920224aa709fb207a9d9cc7100f3b09
|
|
| MD5 |
ac0e58445dbc3ae0c3a6665135251ac6
|
|
| BLAKE2b-256 |
32984bfb8d7e05d7d3c63279046992eb788fe7b24c449138fd4c52aa21720432
|