
Generalized USGS Water Meta Data API retrieval function
Source:R/read_waterdata_metadata.R
read_waterdata_metadata.RdFunction to get metadata from Water Data API. These are useful to get the human readable words and other metadata associated with USGS codes.
Arguments
- collection
character, can be any existing collection such as "parameter-codes", "agency-codes", "altitude-datums", "aquifer-codes", "aquifer-types", "coordinate-accuracy-codes", "coordinate-datum-codes", "coordinate-method-codes", "hydrologic-unit-codes", "medium-codes", "national-aquifer-codes", "reliability-codes", "site-types", "statistic-codes", "topographic-codes", "time-zone-codes".
- limit
The optional limit parameter is used to control the subset of the selected features that should be returned in each page. The maximum allowable limit is 50000. It may be beneficial to set this number lower if your internet connection is spotty. The default (
NA) will set the limit to the maximum allowable limit for the service.
Examples
# \donttest{
agency_codes <- read_waterdata_metadata("agency-codes")
#> Remaining requests this hour:2305
altitude_datums <- read_waterdata_metadata("altitude-datums")
#> Remaining requests this hour:2305
aquifer_codes <- read_waterdata_metadata("aquifer-codes")
#> Remaining requests this hour:2305
aquifer_types <- read_waterdata_metadata("aquifer-types")
#> Remaining requests this hour:2302
coordinate_accuracy_codes <- read_waterdata_metadata("coordinate-accuracy-codes")
#> Remaining requests this hour:2302
coordinate_datum_codes <- read_waterdata_metadata("coordinate-datum-codes")
#> Remaining requests this hour:2302
coordinate_method_codes <- read_waterdata_metadata("coordinate-method-codes")
#> Remaining requests this hour:2302
huc_codes <- read_waterdata_metadata("hydrologic-unit-codes")
#> Remaining requests this hour:2302
#> Remaining requests this hour:2300
#> Remaining requests this hour:2299
#> Remaining requests this hour:2299
#> Remaining requests this hour:2296
#> Remaining requests this hour:2296
#> Remaining requests this hour:2293
#> Remaining requests this hour:2292
#> Remaining requests this hour:2290
#> Remaining requests this hour:2289
#> Remaining requests this hour:2289
#> Remaining requests this hour:2288
#> ⠙ iterating 13 done (6.1/s) | 2.1s
#> Remaining requests this hour:2288
national_aquifer_codes <- read_waterdata_metadata("national-aquifer-codes")
#> Remaining requests this hour:2285
parameter_codes <- read_waterdata_metadata("parameter-codes")
#> Remaining requests this hour:2285
#> Remaining requests this hour:2284
reliability_codes <- read_waterdata_metadata("reliability-codes")
#> Remaining requests this hour:2282
site_types <- read_waterdata_metadata("site-types")
#> Remaining requests this hour:2282
statistic_codes <- read_waterdata_metadata("statistic-codes")
#> Remaining requests this hour:2282
topographic_codes <- read_waterdata_metadata("topographic-codes")
#> Remaining requests this hour:2282
time_zone_codes <- read_waterdata_metadata("time-zone-codes")
#> Remaining requests this hour:2281
# }