-
Notifications
You must be signed in to change notification settings - Fork 90
Update vignette #779
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
ldecicco-USGS
merged 26 commits into
DOI-USGS:develop
from
ldecicco-USGS:update_vignette
Jun 4, 2025
Merged
Update vignette #779
Changes from 23 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
eb3e372
Update readme with new flow
ldecicco-USGS ce5a007
Merge branch 'add_docs' into 'develop'
ldecicco-USGS 9c1db9b
Merge branch 'add_docs' into 'develop'
ldecicco-USGS 8150512
make sure this works on gitlab
ldecicco-USGS eab31be
Remove bbox from daily
ldecicco-USGS a5394a7
Merge branch 'develop' of github.com:DOI-USGS/dataRetrieval into upda…
ldecicco-USGS 5b011c8
Add API key info to readme
ldecicco-USGS 7871762
add discrete stuff
ldecicco-USGS b16744d
Merge branch 'develop' of https://code.usgs.gov/water/dataRetrieval i…
ldecicco-USGS 3bf91ce
put bbox back in daily
ldecicco-USGS 6eb3ca0
Vignette updates
ldecicco-USGS 70c3719
Merge branch 'develop' of github.com:DOI-USGS/dataRetrieval into upda…
ldecicco-USGS 77b5c23
Add help section
ldecicco-USGS aaffa73
Update vignettes/read_USGS_functions.Rmd
ldecicco-USGS 2b0ea51
Update vignettes/read_USGS_functions.Rmd
ldecicco-USGS 69b5d04
Update vignettes/read_USGS_functions.Rmd
ldecicco-USGS 095c5d5
Update vignettes/read_USGS_functions.Rmd
ldecicco-USGS da75aec
Update vignettes/read_USGS_functions.Rmd
ldecicco-USGS f478f2f
Update vignettes/read_USGS_functions.Rmd
ldecicco-USGS 7bb6683
Update vignettes/read_USGS_functions.Rmd
ldecicco-USGS 8943ec3
Update README.Rmd
ldecicco-USGS 4c090c0
Update vignettes/read_USGS_functions.Rmd
ldecicco-USGS 35c918e
Update vignettes/read_USGS_functions.Rmd
ldecicco-USGS 69c7d1b
some updates from reviewers
ldecicco-USGS 1c16310
pull from PR
ldecicco-USGS 4972ee0
vignette updates
ldecicco-USGS 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
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 |
---|---|---|
|
@@ -27,7 +27,7 @@ library(dataRetrieval) | |
[](https://cran.r-project.org/package=dataRetrieval) | ||
[](https://cran.r-project.org/package=dataRetrieval) | ||
|
||
The `dataRetrieval` package was created to simplify the process of loading hydrologic data into the R environment. It is designed to retrieve the major data types of U.S. Geological Survey (USGS) hydrology data that are available on the Web, as well as data from the Water Quality Portal (WQP), which currently houses water quality data from the Environmental Protection Agency (EPA), U.S. Department of Agriculture (USDA), and USGS. Direct USGS data is obtained from a service called the National Water Information System (NWIS). | ||
The `dataRetrieval` package was created to simplify the process of loading hydrologic data into the R environment. It is designed to retrieve the major data types of U.S. Geological Survey (USGS) hydrology data that are available on the Web, as well as data from the Water Quality Portal (WQP), which currently houses water quality data from the Environmental Protection Agency (EPA), U.S. Department of Agriculture (USDA), and USGS. | ||
|
||
# Introduction | ||
|
||
|
@@ -37,17 +37,19 @@ If you have additional questions about these changes, email CompTools@usgs.gov. | |
|
||
# What would you like to do? | ||
|
||
1. Get instantaneous USGS discharge data. Start here: `?readNWISuv` | ||
1. Get instantaneous USGS data (for example, discharge sensor data). Start here: `?readNWISuv` | ||
|
||
2. Get daily USGS discharge data. Start here: `?readNWISdv` | ||
2. Get daily USGS data (for example, mean daily discharge). Start here: `?read_USGS_daily` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❤️ |
||
|
||
3. Get USGS groundwater data. Start here: `?readNWISgwl` | ||
|
||
4. Get discrete water quality data. Start here: `?readWQPdata` | ||
4. Get discrete water quality data from a cooperative service that integrates publicly available water-quality data from the USGS, EPA, and over 400 state, federal, tribal, and local agencies. Start here: `?readWQPdata` | ||
|
||
4. Discover USGS data (not including discrete water quality data). Start here: `?whatNWISdata` | ||
5. Get USGS discrete water quality data. Start here: `?read_USGS_samples` | ||
|
||
6. Find Hydro Network-Linked Data Index (NLDI) data. Start here: `?findNLDI` | ||
6. Discover USGS time series metadata. Start here: `?read_USGS_ts_meta` | ||
|
||
7. Find Hydro Network-Linked Data Index (NLDI) data. Start here: `?findNLDI` | ||
|
||
For additional tutorials, see: | ||
|
||
|
@@ -70,6 +72,18 @@ install.packages("dataRetrieval") | |
|
||
The USGS is planning to modernize all web services in the near future. For each of these updates, `dataRetrieval` will create a new function to access the new services. | ||
|
||
## API Token | ||
|
||
You can register an API key for use with USGS water data APIs. There are now limits on how many queries can be requested per IP address per hour. If you find yourself running into limits, you can request an API token here: <https://api.waterdata.usgs.gov/signup/> | ||
|
||
Then save your token in your .Renviron file like this: | ||
|
||
``` | ||
API_USGS_PAT = "my_super_secret_token" | ||
``` | ||
|
||
You can use `usethis::edit_r_environ()` to edit find and open your .Renviron file. You will need to restart R for that variable to be recognized. | ||
|
||
## New Features | ||
|
||
### Style | ||
|
@@ -160,7 +174,7 @@ Water Quality Portal. Washington (DC): National Water Quality Monitoring Council | |
|
||
# Package Support | ||
|
||
The Water Mission Area of the USGS supports the development and maintenance of `dataRetrieval`, and most likely further into the future. Resources are available primarily for maintenance and responding to user questions. Priorities on the development of new features are determined by the `dataRetrieval` development team. This software was last released with USGS record: IP-147158. | ||
The Water Mission Area of the USGS supports the development and maintenance of `dataRetrieval`, and most likely further into the future. Resources are available primarily for maintenance and responding to user questions. Priorities on the development of new features are determined by the `dataRetrieval` development team. | ||
|
||
```{r disclaimer, child="DISCLAIMER.md", eval=TRUE} | ||
``` | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No opinion on whether this sentence is kept or removed, but the new APIs are still part of NWIS -- alongside the rest of the apis on api.waterdata.usgs.gov . We need to think through the branding better, frankly.