-
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
Update vignette #779
Changes from 13 commits
eb3e372
ce5a007
9c1db9b
8150512
eab31be
a5394a7
5b011c8
7871762
b16744d
3bf91ce
6eb3ca0
70c3719
77b5c23
aaffa73
2b0ea51
69b5d04
095c5d5
da75aec
f478f2f
7bb6683
8943ec3
4c090c0
35c918e
69c7d1b
1c16310
4972ee0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 data. Start here: `?read_USGS_ts_meta` | ||
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. This might make more sense as
ldecicco-USGS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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} | ||
``` | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.