-
Notifications
You must be signed in to change notification settings - Fork 52
Add waterdata infrastructure #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
1295e91
start adding functions
ehinman c4b0b9a
start adding documentation and going through functions
ehinman c32ded5
adjust date function
ehinman 99e949c
fix dates function
ehinman 1641e85
keep working out issues with api calls
ehinman 7bc6c6f
add documentation
ehinman 1b29d6a
adjust how response is handled and edit walk pages, fix API limit print
ehinman 3289982
add documentation
ehinman 867d728
add more documentation, correct waterdata module
ehinman 44213b5
allow post and get calls in recursive walk pages, fix typo where firs…
ehinman 4affa2f
add in all possible arguments
ehinman 21691d0
trying to get cql2 query correct, will keep at it
ehinman 4c2a3ee
correct cql2 queries
ehinman 14f2830
simplify syntax, remove unneeded dependencies
ehinman d25f854
start adding function documentation
ehinman 7fe486a
add link urls
ehinman fad9ce0
fix date formatting function
ehinman a33d201
make waterdata outputs geopandas if geometry included
ehinman bd82c49
make gpd an optional dependency and change returns accordingly
ehinman 06b0e69
incorporate geopandas boolean into function arguments and ensure user…
ehinman 253da79
clean up some documentation and comments
ehinman f5cca07
add optional dependency to pyproject.toml
ehinman 5c546e7
set convertType to default or user specification
ehinman e9221ac
start unit tests on new functions
ehinman b1436db
update README and add a NEWS markdown in which to place past updates
ehinman dc24658
make a few small changes to names and documentation
ehinman 89b960c
define max_results when it is an input
ehinman 1237777
comment out code that wasn't doing the correct thing with max_results
ehinman e84984a
Revert waterdata to requrests
thodson-usgs 4c84fc0
Review waterdata module
f4693b6
Update README.md
0d06672
Add deprecation warning for nwis
96a4356
Update dataretrieval/waterdata/api.py
ehinman 7f7f184
Update dataretrieval/waterdata/api.py
ehinman c14e00b
Update dataretrieval/waterdata/api.py
ehinman dcc7a1a
Apply suggestions from code review
ehinman 370f9a5
Merge pull request #5 from nodohs/waterdata
ehinman 4482751
add back in documentation and make formatting changes
ehinman 37063b9
add metadata to api.py and testing
ehinman 8bb2de8
small changes to remove unnecessary imports and add more documentation
ehinman 2f6af7d
remove some redundant testing, make next url be an info log, not debug
ehinman f0bef3e
same as previous commit message, was behind on what I was committing
ehinman 8605dea
convert failures counter to a stop that shows URL that failed
ehinman bd3f6ad
remove max_requests as this is confusing and should be better vetted …
ehinman 6a326ce
add new latest-daily service
ehinman ada9a41
correct example documentation and add info about logging
ehinman 4f73484
correct date, add nldi as module to init.py
ehinman da71b90
make error messages louder, clearer
ehinman e614d83
re-arrange README a little
ehinman 535b30f
try to fix ubuntu flake8 error
ehinman 1c56573
Adjust readme styling
ehinman 9e26096
will this appease flake8
ehinman c4a0591
move versioning to above imports
ehinman ed8fa23
add actual version to user agent
ehinman cb2976e
update waterdata test to skip on python 3.9 and older
ehinman 7927f1f
try new import to avoid errors
ehinman c575447
remove ubuntu 3.8 from github actions
ehinman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| **11/24/2025:** `dataretrieval` is pleased to offer a new module, `waterdata`, which gives users access USGS's modernized [Water Data APIs](https://api.waterdata.usgs.gov/). The Water Data API endpoints include daily values, instantaneous values, field measurements (modernized groundwater levels service), time series metadata, and discrete water quality data from the Samples database. Though there will be a period of overlap, the functions within `waterdata` will eventually replace the `nwis` module, which currently provides access to the legacy [NWIS Water Services](https://waterservices.usgs.gov/). More example workflows and functions coming soon. Check `help(waterdata)` for more information. | ||
|
|
||
| **09/03/2024:** The groundwater levels service has switched endpoints, and `dataretrieval` was updated accordingly in [`v1.0.10`](https://github.com/DOI-USGS/dataretrieval-python/releases/tag/v1.0.10). Older versions using the discontinued endpoint will return 503 errors for `nwis.get_gwlevels` or the `service='gwlevels'` argument. Visit [Water Data For the Nation](https://waterdata.usgs.gov/blog/wdfn-waterservices-2024/) for more information. | ||
|
|
||
| **03/01/2024:** USGS data availability and format have changed on Water Quality Portal (WQP). Since March 2024, data obtained from WQP legacy profiles will not include new USGS data or recent updates to existing data. All USGS data (up to and beyond March 2024) are available using the new WQP beta services. You can access the beta services by setting `legacy=False` in the functions in the `wqp` module. | ||
|
|
||
| To view the status of changes in data availability and code functionality, visit: https://doi-usgs.github.io/dataRetrieval/articles/Status.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,16 @@ | ||
| from importlib.metadata import PackageNotFoundError, version | ||
|
|
||
| try: | ||
| __version__ = version("dataretrieval") | ||
| except PackageNotFoundError: | ||
| __version__ = "version-unknown" | ||
|
|
||
| from dataretrieval.nadp import * | ||
| from dataretrieval.nldi import * | ||
| from dataretrieval.nwis import * | ||
| from dataretrieval.samples import * | ||
| from dataretrieval.streamstats import * | ||
| from dataretrieval.utils import * | ||
| from dataretrieval.waterdata import * | ||
| from dataretrieval.waterwatch import * | ||
| from dataretrieval.wqp import * | ||
|
|
||
| try: | ||
| __version__ = version("dataretrieval") | ||
| except PackageNotFoundError: | ||
| __version__ = "version-unknown" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.