Skip to content

Commit f4f9f93

Browse files
Merge pull request DOI-USGS#748 from ldecicco-USGS/develop
Develop
2 parents 39f307a + 5ffaac5 commit f4f9f93

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

vignettes/samples_data.Rmd

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ New functions will use a "snake case", such as "read_USGS_samples". Older functi
9595

9696
### Structure
9797

98-
Historically, we used 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.
98+
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.
9999

100100
### Dependencies
101101

@@ -162,9 +162,9 @@ phos_data <- read_USGS_samples(monitoringLocationIdentifier = site,
162162
characteristicUserSupplied = user_char)
163163
```
164164

165-
Inspecting phos_data, there are `r ncol(phos_data)` columns (!). That is all of the possible fields because the default dataProfile is "Full physical chemical".
165+
Inspecting phos_data, there are `r ncol(phos_data)` columns (!). That is because the default dataProfile is "Full physical chemical", which is designed to be comprehensive.
166166

167-
Instead of using the "Full physical chemical" profile, we could ask for the "Narrow" profile:
167+
Instead of using the "Full physical chemical" profile, we could ask for the "Narrow" profile, which contains fewer columns:
168168

169169
```{r}
170170
phos_narrow <- read_USGS_samples(monitoringLocationIdentifier = site,
@@ -213,7 +213,7 @@ The possibilities are (which match the documentation [here](https://api.waterdat
213213

214214
## Geographical filters
215215

216-
Let's say we don't know a USGS site number, but we do have an area of interest. Here are the different geographic filters available. We'll use characteristicUserSupplied == "Phosphorus as phosphorus, water, unfiltered" to limit the sites returned, and dataType = "locations" to limit the data returned. That means we'll just be asking for what sites measured "Phosphorus as phosphorus, water, unfiltered", but not actually getting those result values.
216+
Let's say we don't know a USGS site number, but we do have an area of interest. Here are the different geographic filters available. We'll use characteristicUserSupplied = "Phosphorus as phosphorus, water, unfiltered" to limit the sites returned, and dataType = "locations" to limit the data returned. That means we'll just be asking for what sites measured "Phosphorus as phosphorus, water, unfiltered", but not actually getting those result values.
217217

218218
### Bounding Box
219219

@@ -276,7 +276,7 @@ map_it(point_sites)
276276
### countyFips
277277

278278
County query parameter. To get a list of available counties,
279-
run `check_param("counties")`. The "Fips" can be created using the function `countyCdLookup`.
279+
run `check_param("counties")`. The "Fips" values can be created using the function `countyCdLookup`.
280280

281281
```{r}
282282
dane_county <- countyCdLookup("WI", "Dane",
@@ -296,8 +296,8 @@ map_it(county_sites)
296296

297297
### stateFips
298298

299-
State query parameter. To get a list of available state fips,
300-
run `check_param("states")`. The "fips" can be created using the function
299+
State query parameter. To get a list of available state fips values,
300+
run `check_param("states")`. The "fips" values can be created using the function
301301
`stateCdLookup`.
302302

303303
```{r}
@@ -347,7 +347,7 @@ media_info$activityMedia
347347

348348
### characteristicGroup
349349

350-
Characteristic group is a broad category describing the sample. The options for this parameter generally follow the values described in the Water Quality Portal [User Guide](https://www.waterqualitydata.us/portal_userguide), but not always.
350+
Characteristic group is a broad category describing the sample measurement. The options for this parameter generally follow the values described in the Water Quality Portal [User Guide](https://www.waterqualitydata.us/portal_userguide), but not always.
351351

352352
```{r}
353353
group_info <- check_param("characteristicgroup")
@@ -391,7 +391,7 @@ Record identifier, user supplied identifier. This information would be needed fr
391391

392392
### activityStartDate: Lower and Upper
393393

394-
Specify one or both of these fields to filter on the activity start date. The service will return records with dates earlier than the value entered for activityStartDateUpper and/or later than the value entered for activityStartDateLower. The logic is inclusive, i.e. it will also return records that match either date. Can be an R Date object, or a string with format YYYY-MM-DD.
394+
Specify one or both of these fields to filter on the activity start date. The service will return records with dates earlier than and including the value entered for activityStartDateUpper and later than and including the value entered for activityStartDateLower. Can be an R Date object, or a string with format YYYY-MM-DD.
395395

396396
For instance, let's grab Wisconsin sites that measured phosphorus in October or November of 2024:
397397

@@ -400,7 +400,7 @@ state_sites_recent <- read_USGS_samples(stateFips = state_fip,
400400
characteristicUserSupplied = user_char,
401401
dataType = "locations",
402402
activityStartDateLower = "2024-10-01",
403-
activityStartDateUpper = "2024-12-01",
403+
activityStartDateUpper = "2024-11-30",
404404
dataProfile = "site")
405405
406406
```

0 commit comments

Comments
 (0)