Skip to content

Commit fb6521a

Browse files
Add warning message to WQP functions and README (#132)
Add warning about legacy WQP profiles --------- Co-authored-by: Timothy Hodson <34148978+thodson-usgs@users.noreply.github.com>
1 parent 0296432 commit fb6521a

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# dataretrieval: Download hydrologic data
22

3+
:warning: USGS data availability and format are changing on Water Quality Portal (WQP). Beginning in February 2024 data obtained from WQP legacy profiles will not include new USGS data or recent updates to existing data.
4+
To view the status of changes in data availability and code functionality, visit: https://doi-usgs.github.io/dataRetrieval/articles/Status.html
5+
36
## What is dataretrieval?
47
`dataretrieval` was created to simplify the process of loading hydrologic data into the Python environment.
58
Like the original R version [`dataRetrieval`](https://github.com/DOI-USGS/dataRetrieval),

dataretrieval/wqp.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ def get_results(ssl_check=True, **kwargs):
8282
>>> df, md = dataretrieval.wqp.get_results(bBox='-92.8,44.2,-88.9,46.0')
8383
8484
"""
85+
_warn_v3_profiles_outage()
86+
8587
kwargs = _alter_kwargs(kwargs)
8688
response = query(wqp_url('Result'), kwargs, delimiter=';', ssl_check=ssl_check)
8789

@@ -117,6 +119,8 @@ def what_sites(ssl_check=True, **kwargs):
117119
... )
118120
119121
"""
122+
_warn_v3_profiles_outage()
123+
120124
kwargs = _alter_kwargs(kwargs)
121125

122126
url = wqp_url('Station')
@@ -153,6 +157,8 @@ def what_organizations(ssl_check=True, **kwargs):
153157
>>> df, md = dataretrieval.wqp.what_organizations()
154158
155159
"""
160+
_warn_v3_profiles_outage()
161+
156162
kwargs = _alter_kwargs(kwargs)
157163

158164
url = wqp_url('Organization')
@@ -189,6 +195,8 @@ def what_projects(ssl_check=True, **kwargs):
189195
>>> df, md = dataretrieval.wqp.what_projects(huc='19')
190196
191197
"""
198+
_warn_v3_profiles_outage()
199+
192200
kwargs = _alter_kwargs(kwargs)
193201

194202
url = wqp_url('Project')
@@ -228,6 +236,8 @@ def what_activities(ssl_check=True, **kwargs):
228236
... )
229237
230238
"""
239+
_warn_v3_profiles_outage()
240+
231241
kwargs = _alter_kwargs(kwargs)
232242

233243
url = wqp_url('Activity')
@@ -271,6 +281,8 @@ def what_detection_limits(ssl_check=True, **kwargs):
271281
... )
272282
273283
"""
284+
_warn_v3_profiles_outage()
285+
274286
kwargs = _alter_kwargs(kwargs)
275287

276288
url = wqp_url('ResultDetectionQuantitationLimit')
@@ -307,6 +319,8 @@ def what_habitat_metrics(ssl_check=True, **kwargs):
307319
>>> df, md = dataretrieval.wqp.what_habitat_metrics(statecode='US:44')
308320
309321
"""
322+
_warn_v3_profiles_outage()
323+
310324
kwargs = _alter_kwargs(kwargs)
311325

312326
url = wqp_url('BiologicalMetric')
@@ -346,6 +360,8 @@ def what_project_weights(ssl_check=True, **kwargs):
346360
... )
347361
348362
"""
363+
_warn_v3_profiles_outage()
364+
349365
kwargs = _alter_kwargs(kwargs)
350366

351367
url = wqp_url('ProjectMonitoringLocationWeighting')
@@ -385,6 +401,8 @@ def what_activity_metrics(ssl_check=True, **kwargs):
385401
... )
386402
387403
"""
404+
_warn_v3_profiles_outage()
405+
388406
kwargs = _alter_kwargs(kwargs)
389407

390408
url = wqp_url('ActivityMetric')
@@ -468,3 +486,17 @@ def _alter_kwargs(kwargs):
468486
kwargs['mimeType'] = 'csv'
469487

470488
return kwargs
489+
490+
def _warn_v3_profiles_outage():
491+
"""Private function for warning message about WQX 3.0 profiles
492+
"""
493+
494+
warnings.warn(('NEWS: USGS discrete water quality data availability '
495+
'and format are changing. Beginning in February 2024 '
496+
'the data obtained from legacy profiles will not '
497+
'include new USGS data or recent updates to existing '
498+
'data. To view the status of changes in data '
499+
'availability and code functionality, visit: '
500+
'https://doi-usgs.github.io/dataRetrieval/articles/Status.html. '
501+
'If you have additional questions about these changes, '
502+
'email CompTools@usgs.gov.'))

0 commit comments

Comments
 (0)