Skip to content

Commit e5d4da4

Browse files
committed
move samples function to waterdata.py
1 parent 0e58bb2 commit e5d4da4

10 files changed

Lines changed: 487 additions & 23 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ Water quality data are available from:
5353
- [Samples](https://waterdata.usgs.gov/download-samples/#dataProfile=site) - Discrete USGS water quality data only
5454
- [Water Quality Portal](https://www.waterqualitydata.us/) - Discrete water quality data from USGS and EPA. Older data are available in the legacy WQX version 2 format; all data are available in the beta WQX3.0 format.
5555

56-
To access the full functionality available from NWIS web services, nwis.get record appends any additional kwargs into the REST request. For example
56+
To access the full functionality available from NWIS web services, nwis.get record appends any additional kwargs into the REST request. For example:
5757
```python
5858
nwis.get_record(sites='03339000', service='dv', start='2017-12-31', parameterCd='00060')
5959
```
60-
will download daily data with the parameter code 00060 (discharge).
60+
...will download daily data with the parameter code 00060 (discharge).
6161

6262
## Accessing the "Internal" NWIS
6363
If you're connected to the USGS network, dataretrieval call pull from the internal (non-public) NWIS interface.

dataretrieval/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from dataretrieval.samples import *
66
from dataretrieval.streamstats import *
77
from dataretrieval.utils import *
8+
from dataretrieval.waterdata import *
89
from dataretrieval.waterwatch import *
910
from dataretrieval.wqp import *
1011

dataretrieval/nwis.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ def get_qwdata(
134134
**kwargs,
135135
) -> Tuple[pd.DataFrame, BaseMetadata]:
136136
"""
137-
Get water sample data from qwdata service - deprecated, use `get_usgs_samples()`
138-
in the samples module.
137+
Get water sample data from qwdata service - deprecated, use `get_samples()`
138+
in the waterdata module.
139139
140140
"""
141141
return print("This function is deprecated and has been " \
142-
"replaced with `get_usgs_samples() in the " \
143-
"samples module. If you have questions, " \
142+
"replaced with `get_samples() in the " \
143+
"waterdata module. If you have questions, " \
144144
"please reach out to comptools@usgs.gov")
145145

146146

dataretrieval/samples.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,21 +272,21 @@ def get_usgs_samples(
272272
.. code::
273273
274274
>>> # Get PFAS results within a bounding box
275-
>>> df, md = dataretrieval.samples.get_usgs_samples(
275+
>>> df, md = dataretrieval.samples.get_samples(
276276
... boundingBox=[-90.2,42.6,-88.7,43.2],
277277
... characteristicGroup="Organics, PFAS"
278278
... )
279279
280280
>>> # Get all activities for the Commonwealth of Virginia over a date range
281-
>>> df, md = dataretrieval.samples.get_usgs_samples(
281+
>>> df, md = dataretrieval.samples.get_samples(
282282
... service="activities",
283283
... profile="sampact",
284284
... activityStartDateLower="2023-10-01",
285285
... activityStartDateUpper="2024-01-01",
286286
... stateFips="US:51")
287287
288288
>>> # Get all pH samples for two sites in Utah
289-
>>> df, md = dataretrieval.samples.get_usgs_samples(
289+
>>> df, md = dataretrieval.samples.get_samples(
290290
... monitoringLocationIdentifier=['USGS-393147111462301', 'USGS-393343111454101'],
291291
... usgsPCode='00400')
292292

0 commit comments

Comments
 (0)