Skip to content

Commit 7aec473

Browse files
committed
Put mention of new API development in readme
1 parent 53157ce commit 7aec473

File tree

3 files changed

+95
-35
lines changed

3 files changed

+95
-35
lines changed

README.Rmd

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ For additional tutorials, see:
5353

5454
[Basic Tutorial](https://doi-usgs.github.io/dataRetrieval/articles/tutorial.html)
5555

56-
[dataRetrieval Introduction 1](https://rconnect.usgs.gov/NMC_dataRetrieval_1)
56+
[dataRetrieval Introduction 1](https://rconnect.usgs.gov/dataRetrieval_workshop)
5757

5858
[dataRetrieval Introduction 2](https://rconnect.usgs.gov/NMC_dataRetrieval_2)
5959

@@ -66,14 +66,40 @@ To install the `dataRetrieval` package, you must be using R 3.0 or greater and r
6666
install.packages("dataRetrieval")
6767
```
6868

69-
To get cutting-edge changes, install from GitHub using the `remotes` packages:
69+
# New USGS data access
70+
71+
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. To access these services on a web browser, go to <https://waterdata.usgs.gov/download-samples/>.
72+
73+
## New Features
74+
75+
### Style
76+
77+
New functions will use a "snake case", such as "read_USGS_samples". Older functions use camel case, such as "readNWISdv". The difference is the underscore between words. This should be a handy way to tell the difference between newer modern data access, and the older traditional functions.
78+
79+
### Structure
80+
81+
Historically, we allowed users to customize their queries via the `...` argument structure. With `...`, users needed to know the exact names of query parameters before using the function. Now, the new functions will include **ALL** possible arguments that the web service APIs support. This will allow users to use tab-autocompletes (available in RStudio and other IDEs). **Users will need to understand that it is not advisable to specify all of these parameters. The systems can get bogged down with redundant query parameters.** We expect this will be easier for users, but it might take some time to smooth out the documentation and test usability. There may be additional consequences, such as users won't be able to build up argument lists to pass into the function.
82+
83+
### Dependencies
84+
85+
Under the hood, `dataRetrieval` changed the dependency from `httr` to `httr2`. `httr2` is the modern R package for web requests that is actively developed/maintained. As we develop functions for the modern USGS web services, we'll continue to explore updating package dependencies.
86+
87+
### Developmental workflow
88+
89+
CRAN-stable documentation will be available on the GitHub pages:
90+
<https://doi-usgs.github.io/dataRetrieval/>
91+
92+
In-development documentation will be available on the USGS GitLab pages:
93+
<https://water.code-pages.usgs.gov/dataRetrieval>
94+
95+
Development of `dataRetrieval` will happen on a git branch called "develop". The "develop" branch will only move to the "main" branch when we submit to CRAN, unless there are bug fixes that pertain to the CRAN release. The "develop" branch WILL change frequently, and there are no promises of future behavior. Users must accept that they are using those functions at their own risk. If you willing to accept this risk, the installation instructions are:
7096

7197
```{r eval=FALSE}
7298
library(remotes)
99+
73100
install_github("DOI-USGS/dataRetrieval",
74-
build_vignettes = TRUE,
75-
build_opts = c("--no-resave-data",
76-
"--no-manual"))
101+
ref = "develop")
102+
77103
```
78104

79105

README.md

Lines changed: 62 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ For additional tutorials, see:
4848
Tutorial](https://doi-usgs.github.io/dataRetrieval/articles/tutorial.html)
4949

5050
[dataRetrieval Introduction
51-
1](https://rconnect.usgs.gov/NMC_dataRetrieval_1)
51+
1](https://rconnect.usgs.gov/dataRetrieval_workshop)
5252

5353
[dataRetrieval Introduction
5454
2](https://rconnect.usgs.gov/NMC_dataRetrieval_2)
@@ -62,15 +62,66 @@ greater and run the following command:
6262
install.packages("dataRetrieval")
6363
```
6464

65-
To get cutting-edge changes, install from GitHub using the `remotes`
66-
packages:
65+
# New USGS data access
66+
67+
The USGS is planning to modernize all web services in the near future.
68+
For each of these updates, `dataRetrieval` will create a new function to
69+
access the new services. To access these services on a web browser, go
70+
to <https://waterdata.usgs.gov/download-samples/>.
71+
72+
## New Features
73+
74+
### Style
75+
76+
New functions will use a “snake case”, such as “read_USGS_samples”.
77+
Older functions use camel case, such as “readNWISdv”. The difference is
78+
the underscore between words. This should be a handy way to tell the
79+
difference between newer modern data access, and the older traditional
80+
functions.
81+
82+
### Structure
83+
84+
Historically, we allowed users to customize their queries via the `...`
85+
argument structure. With `...`, users needed to know the exact names of
86+
query parameters before using the function. Now, the new functions will
87+
include **ALL** possible arguments that the web service APIs support.
88+
This will allow users to use tab-autocompletes (available in RStudio and
89+
other IDEs). **Users will need to understand that it is not advisable to
90+
specify all of these parameters. The systems can get bogged down with
91+
redundant query parameters.** We expect this will be easier for users,
92+
but it might take some time to smooth out the documentation and test
93+
usability. There may be additional consequences, such as users won’t be
94+
able to build up argument lists to pass into the function.
95+
96+
### Dependencies
97+
98+
Under the hood, `dataRetrieval` changed the dependency from `httr` to
99+
`httr2`. `httr2` is the modern R package for web requests that is
100+
actively developed/maintained. As we develop functions for the modern
101+
USGS web services, we’ll continue to explore updating package
102+
dependencies.
103+
104+
### Developmental workflow
105+
106+
CRAN-stable documentation will be available on the GitHub pages:
107+
<https://doi-usgs.github.io/dataRetrieval/>
108+
109+
In-development documentation will be available on the USGS GitLab pages:
110+
<https://water.code-pages.usgs.gov/dataRetrieval>
111+
112+
Development of `dataRetrieval` will happen on a git branch called
113+
“develop”. The “develop” branch will only move to the “main” branch when
114+
we submit to CRAN, unless there are bug fixes that pertain to the CRAN
115+
release. The “develop” branch WILL change frequently, and there are no
116+
promises of future behavior. Users must accept that they are using those
117+
functions at their own risk. If you willing to accept this risk, the
118+
installation instructions are:
67119

68120
``` r
69121
library(remotes)
122+
70123
install_github("DOI-USGS/dataRetrieval",
71-
build_vignettes = TRUE,
72-
build_opts = c("--no-resave-data",
73-
"--no-manual"))
124+
ref = "develop")
74125
```
75126

76127
# Reporting bugs
@@ -123,15 +174,15 @@ NWIScitation <- create_NWIS_bib(dv)
123174
NWIScitation
124175
#> U.S. Geological Survey (2025). _National Water Information System data
125176
#> available on the World Wide Web (USGS Water Data for the Nation)_.
126-
#> doi:10.5066/F7P55KJN <https://doi.org/10.5066/F7P55KJN>, Accessed Feb
127-
#> 25, 2025,
177+
#> doi:10.5066/F7P55KJN <https://doi.org/10.5066/F7P55KJN>, Accessed Mar
178+
#> 24, 2025,
128179
#> <https://waterservices.usgs.gov/nwis/dv/?site=09010500&format=waterml%2C1.1&ParameterCd=00060&StatCd=00003&startDT=1851-01-01>.
129180
print(NWIScitation, style = "Bibtex")
130181
#> @Manual{,
131182
#> title = {National Water Information System data available on the World Wide Web (USGS Water Data for the Nation)},
132183
#> author = {{U.S. Geological Survey}},
133184
#> doi = {10.5066/F7P55KJN},
134-
#> note = {Accessed Feb 25, 2025},
185+
#> note = {Accessed Mar 24, 2025},
135186
#> year = {2025},
136187
#> url = {https://waterservices.usgs.gov/nwis/dv/?site=09010500&format=waterml%2C1.1&ParameterCd=00060&StatCd=00003&startDT=1851-01-01},
137188
#> }
@@ -155,14 +206,14 @@ WQPcitation <- create_WQP_bib(SC)
155206
WQPcitation
156207
#> National Water Quality Monitoring Council (2025). _Water Quality
157208
#> Portal_. doi:10.5066/P9QRKUVJ <https://doi.org/10.5066/P9QRKUVJ>,
158-
#> Accessed Feb 25, 2025,
209+
#> Accessed Mar 24, 2025,
159210
#> <https://www.waterqualitydata.us/data/Result/search?siteid=USGS-05288705&count=no&pCode=00300&mimeType=csv>.
160211
print(WQPcitation, style = "Bibtex")
161212
#> @Manual{,
162213
#> title = {Water Quality Portal},
163214
#> author = {{National Water Quality Monitoring Council}},
164215
#> doi = {10.5066/P9QRKUVJ},
165-
#> note = {Accessed Feb 25, 2025},
216+
#> note = {Accessed Mar 24, 2025},
166217
#> year = {2025},
167218
#> url = {https://www.waterqualitydata.us/data/Result/search?siteid=USGS-05288705&count=no&pCode=00300&mimeType=csv},
168219
#> }

vignettes/samples_data.Rmd

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -101,31 +101,14 @@ Historically, we allowed users to customize their queries via the `...` argument
101101

102102
Under the hood, `dataRetrieval` changed the dependency from `httr` to `httr2`. `httr2` is the modern R package for web requests that is actively developed/maintained. As we develop functions for the modern USGS web services, we'll continue to explore updating package dependencies.
103103

104-
### Developmental workflow
105-
106-
CRAN-stable documentation will be available on the GitHub pages:
107-
<https://doi-usgs.github.io/dataRetrieval/>
108-
109-
Development documentation will be available on GitLab pages:
110-
<https://water.code-pages.usgs.gov/dataRetrieval>
111-
112-
Development of `dataRetrieval` will happen on a git branch called "develop" on GitHub. The "develop" branch will only move to the "main" branch when we submit to CRAN, unless there are bug fixes that pertain to the CRAN release. The "develop" branch WILL change frequently, and there are no promises of future behavior. Users must accept that they are using those functions at their own risk. If you willing to accept this risk, the installation instructions are:
113-
114-
```{r eval=FALSE}
115-
library(remotes)
116-
117-
install_github("DOI-USGS/dataRetrieval",
118-
ref = "develop")
119-
120-
```
121104

122105
# Discrete USGS data workflow
123106

124107
Alright, let's test out this new service! Here is a link to the user interface:
125-
<https://waterdata.usgs.gov/download-samples/>.
108+
<https://waterdata.usgs.gov/download-samples>.
126109

127110
And here is a link to the web service documentation:
128-
<https://api.waterdata.usgs.gov/samples-data/docs\>
111+
<https://api.waterdata.usgs.gov/samples-data/docs>
129112

130113
## Retrieving data from a known site
131114

0 commit comments

Comments
 (0)