diff --git a/.Rbuildignore b/.Rbuildignore index 9067d8c2ebe9519ea1ea77cdb90134cdf7739e20..10b9107fe28126808f57bc8181b670f1d196710b 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -26,3 +26,4 @@ ^validate$ ^renv.lock$ ^vignettes$ +^.*\.tar.gz diff --git a/.gitattributes b/.gitattributes index ebb685802522a33050c7614dbb2e5f033a7d4999..d39fbb151b8290898c10d97ce38f99805ceb6332 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18,3 +18,5 @@ data-raw/qwdata/commands.txt text eol=lf *.ico binary *.png binary *.rda binary +*.zip binary +*.7z binary diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b48db46c3bc6ea551e48ed2ebba171118a719219..74d7a96af3a23fd660a5360609ad4ab3a60fb054 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,29 +1,39 @@ image: artifactory.wma.chs.usgs.gov/docker-official-mirror/rocker/geospatial:latest variables: - _R_CHECK_CRAN_INCOMING_: "false" _R_CHECK_FORCE_SUGGESTS_: "true" - _R_CHECK_DONTTEST_EXAMPLES_: "false" - NOT_CRAN: "true" + _R_CHECK_PKG_SIZES_THRESHOLD_: 10 R_REMOTES_NO_ERRORS_FROM_WARNINGS: "false" R_PROFILE: "${R_HOME}/etc/Rprofile.site" R_LIBS_USER: "${CI_PROJECT_DIR}/ci/lib" R_LIBS: "${CI_PROJECT_DIR}/ci/lib" CRAN: "https://cloud.r-project.org" APT_CACHE: "${CI_PROJECT_DIR}/ci/apt-cache" + CACHE_DIR: "${CI_PROJECT_DIR}/ci/cache-dir" APP_GROUP: "INLPO" APP_NAME: "${APP_GROUP}-${CI_PROJECT_NAME}-${CI_COMMIT_REF_NAME}" APP_URL: "/${APP_GROUP}/${CI_PROJECT_NAME}-${CI_COMMIT_REF_NAME}" MP_DIR: "${CI_PROJECT_DIR}/ci/mp" MP_URL: "https://geology.usgs.gov/tools/metadata/bin_lnx.tar.gz" - CACHE_DIR: "${CI_PROJECT_DIR}/ci/cache" + +.default-cache: &default-cache + key: "default-cache-${CI_COMMIT_REF_SLUG}" + paths: + - $APT_CACHE + - $MP_DIR + - $R_LIBS_USER + +.content-cache: &content-cache + key: "content-cache-${CI_COMMIT_REF_SLUG}" + paths: + - $CACHE_DIR default: before_script: - mkdir -p "${APT_CACHE}" - > apt-get update && apt-get -o dir::cache::archives=${APT_CACHE} install --yes --no-install-recommends - qpdf libxml2-dev pandoc pandoc-citeproc libcurl4-openssl-dev p7zip-full wget grep libv8-dev zip + libcurl4-openssl-dev pandoc libarchive-dev libv8-dev - > if [ ! -d "${MP_DIR}" ]; then mkdir -p "${MP_DIR}"; @@ -37,31 +47,55 @@ default: remotes::install_deps(dependencies = TRUE, upgrade = FALSE, quiet = TRUE) " cache: + - <<: *default-cache + +lockfile: + stage: build + script: + - > + Rscript -e " + sf::sf_extSoftVersion() |> as.data.frame() |> print() + " + - > + Rscript -e " + renv::lockfile_create() |> renv::lockfile_write(file = 'renv.lock') |> invisible() + " + artifacts: paths: - - $APT_CACHE - - $MP_DIR - - $R_LIBS_USER + - "renv.lock" + expire_in: 1 day content: stage: build + rules: + - if: $CI_PROJECT_NAMESPACE == "inl" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH != "main" script: + - mkdir -p "${CACHE_DIR}" + - Rscript --no-save --no-restore --verbose data-raw/make-datasets.R + - Rscript --no-save --no-restore --verbose data-raw/make-erd.R - > Rscript -e " - renv::lockfile_create() |> renv::lockfile_write(file = 'renv.lock') + roxygen2::roxygenize() " - > Rscript -e " - sf::sf_extSoftVersion() |> as.data.frame() |> print() + rmarkdown::render('README.Rmd') " - - Rscript --no-save --no-restore --verbose data-raw/make-erd.R artifacts: paths: - - "renv.lock" + - "data/*.rda" - "man/figures/erd.svg" + - "man/*.Rd" + - "README.md" expire_in: 1 day + cache: + - <<: *default-cache + - <<: *content-cache -check: +package: stage: test + dependencies: + - content script: - > Rscript -e " @@ -81,11 +115,11 @@ check: - "*.Rcheck" expire_in: 1 day coverage: '/Coverage: \d+.\d+\%/' - dependencies: - - content website: - stage: test + stage: deploy + dependencies: + - content script: - > Rscript -e " @@ -95,25 +129,51 @@ website: Rscript -e " rsconnect::writeManifest(appDir = './docs') " + - > + Rscript -e " + library(connectapi); + connect() |> + deploy(bundle_dir('./docs'), name = '${APP_NAME}') |> + set_vanity_url('${APP_URL}') |> + content_add_group(with(get_groups(connect()), guid[name == '${APP_GROUP}'])) + " artifacts: paths: - - docs + - "docs" expire_in: 1 day + when: manual + +data_release: + stage: deploy dependencies: - content + script: + - Rscript --no-save --no-restore --verbose data-raw/make-data-release.R + artifacts: + paths: + - "data-release" + expire_in: 1 day + when: manual -deploy-website: +cran: stage: deploy - rules: - - if: $CONNECT_SERVER != null && $CONNECT_API_KEY != null + dependencies: + - content script: - > Rscript -e " - library(connectapi); - connect() |> - deploy(bundle_dir('./docs'), name = '${APP_NAME}') |> - set_vanity_url('${APP_URL}') |> - content_add_group(with(get_groups(connect()), guid[name == '${APP_GROUP}'])) + pkgbuild::build( + dest_path = '${CI_PROJECT_DIR}', + vignettes = FALSE + ) |> + rcmdcheck::rcmdcheck( + args = c('--no-manual', '--as-cran'), + timeout = 600, + error_on = 'warning' + ) " - dependencies: - - website + artifacts: + paths: + - "*.tar.gz" + expire_in: 1 day + when: manual diff --git a/DESCRIPTION b/DESCRIPTION index 2d705288c4e65bbd2a354f929c62d9d56413cb0e..6657ab3efb8fbce8772c42add6e5d877f9c84075 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: inldata Title: Collection of Datasets for the USGS-INL Monitoring Networks -Version: 1.1.5 +Version: 1.2.0 Authors@R: c( person(given = c("Jason", "C."), family = "Fisher", role = c("aut", "cre"), @@ -25,7 +25,7 @@ Description: A collection of analysis-ready datasets for the eastern Snake River Plain aquifer, located in the southeastern part of Idaho, and the availability of water for long-term consumptive and industrial use. The package includes long-term monitoring records dating - back to measurements from 1949. Geospatial data describing the areas from + back to measurements from 1922. Geospatial data describing the areas from which samples were collected or observations were made are also included in the package. Bundling this data into a single package significantly reduces the magnitude of data processing for researchers and provides a way to @@ -43,6 +43,7 @@ Imports: tools, utils Suggests: + archive, arrow, connectapi, covr, @@ -62,6 +63,7 @@ Suggests: pkgdown, plotrix, rappdirs, + rcmdcheck, reactable, renv, rmarkdown, @@ -81,6 +83,7 @@ Copyright: This software is in the public domain because it contains materials see the official USGS copyright policy at https://www.usgs.gov/information-policies-and-instructions/copyrights-and-credits Encoding: UTF-8 +SystemRequirements: libcurl4-openssl-dev pandoc libarchive-dev libv8-dev (deb) LazyData: true LazyDataCompression: xz Roxygen: list(markdown = TRUE) diff --git a/Makefile b/Makefile index e17f8f902118ceb4148aad88421adf67d33a4a50..46bd62ad85ba0449f43da303b27c360fa86ef09a 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,15 @@ cran-check: install R CMD check --no-build-vignettes --as-cran $(PKGNAME)_$(PKGVERS).tar.gz .PHONY: cran-check +coverage: + R -q -e "covr::package_coverage(type = 'all')" +.PHONY: coverage + +coverage-report: + mkdir -p ../inldata-coverage + R -q -e "covr::package_coverage(type = 'all') |> covr::report(file = '../inldata-coverage/index.html')" +.PHONY: coverage-report + lockfile: R -q -e "renv::lockfile_create() |> renv::lockfile_write(file = 'renv.lock')" .PHONY: lockfile @@ -63,16 +72,8 @@ website: R -q -e "pkgdown::build_site()" .PHONY: website -data-release: install - rm -f -r data-release - R -q -e "inldata::make_data_release( \ - metadata = 'inst/extdata/metadata.json', \ - package = 'inldata', \ - destdir = 'data-release', \ - bounding = inldata::dem, \ - rngdates = c(inldata::samples[['sample_dt']], inldata::gwl[['lev_dt']], inldata::swm[['stage_dt']]), \ - validate = TRUE \ - )" +data-release: + Rscript --no-save --no-restore --verbose data-raw/make-data-release.R .PHONY: data-release erd: @@ -83,5 +84,5 @@ clear-cache: R -q -e "inldata::clear_cache_dir('inldata')" .PHONY: clear-cache -everything: datasets erd install readme check data-release website lockfile clean +everything: datasets erd install readme check coverage data-release website lockfile clean .PHONY: everything diff --git a/NAMESPACE b/NAMESPACE index fc7699c66e00caa992edd47ca08aaceceb71c09b..8755e954cb3a2271a8d8db57a777af78f973db16 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,9 +1,14 @@ # Generated by roxygen2: do not edit by hand +export(as_posix_ct) export(assert_url) export(check_package) +export(clean_sf) export(clear_cache_dir) +export(download_file) +export(extract_archive) export(get_cache_dir) +export(get_file_ext) export(get_file_size) export(make_data_release) export(make_datasets) @@ -13,9 +18,12 @@ export(make_shade) export(parse_rd_db) export(parse_station_nm) export(paste_strings) -export(round_usgs) +export(read_rdb) +export(round_numbers) +export(test_pkg_dir) export(trim_station_nm) export(validate_metadata) export(write_datasets) +export(write_lines) importFrom(sf,st_crs) importFrom(terra,ext) diff --git a/NEWS.md b/NEWS.md index acbb1d05bdd0b9e6682b45a168a549aecad06df7..9debd910e063ff3564b0dcb956861b5fcbce0343 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,16 @@ +# inldata 1.2.0 + +- In the `dl` dataset, `sdate` field renamed to `min_dt`. +- The `iwd` dataset has been geocorrected by shifting it to the east. +- In the `percopnds` dataset, fields `status`, `min_dt`, and `max_dt` have been added, + along with more percolation ponds. +- Substitute 7-zip system dependency with the 'archive' R-package, which necessitates 'libarchive-dev' on Linux. +- In the `samples` dataset, replace the empty-character string (`""`) values + in the `remark_cd` and `rpt_lev_cd` fields with missing values (`NA`). +- In `units`, `samples`, and `parameters` datasets, rename field form `parm_unit` to `unit_cd`. +- In `backgroud`, `benchmarks`, and `dl` datasets, + substitute `srsname` and `parm_unit` fields with `parm_nm` field. + # inldata 1.1.5 - Revise datasets to incorporate data from the 2023 U.S. Census, which was previously based on the 2022 data. diff --git a/R/assert_url.R b/R/assert_url.R index a8af68f66cdda36785a637c189b39e23e00f0186..8cc4f3667cd77f5b8c779afd4dcddb8114c95f6f 100644 --- a/R/assert_url.R +++ b/R/assert_url.R @@ -33,6 +33,7 @@ assert_url <- function(url, ...) { f <- safely(httr::HEAD) res <- f(url, ...) + if (is.null(res$result) || ((httr::status_code(res$result) %/% 200) != 1)) { f <- safely(httr::GET) res <- f(url, ...) @@ -40,6 +41,7 @@ assert_url <- function(url, ...) { sprintf("Assertion on '%s' failed: hard error with no response.", url) |> stop(call. = FALSE) } + if (((httr::status_code(res$result) %/% 200) != 1)) { sprintf("Assertion on '%s' failed: responded but without an HTTP status code in the 200-299 range.", url) |> stop(call. = FALSE) @@ -52,13 +54,17 @@ assert_url <- function(url, ...) { safely <- function(f) { checkmate::assert_function(f) function(...) { - capture_error(f(...)) + capture_error( + f(...) + ) } } capture_error <- function(code) { tryCatch( - list(result = code, error = NULL), + expr = { + list(result = code, error = NULL) + }, error = function(e) { list(result = NULL, error = e) }, diff --git a/R/background.R b/R/background.R index 4403bc058428144886b36d44b7d906639750b9fa..f6437c9865075944f209098a2d06892a918f5e08 100644 --- a/R/background.R +++ b/R/background.R @@ -12,12 +12,10 @@ #' #' @format A data frame with columns: #' \describe{ -#' \item{`srsname`}{Substance Registry Services -#' ([SRS](https://sor.epa.gov/sor_internet/registry/substreg/home/overview/home.do)) -#' name for constituents, such as "Strontium-90".} +#' \item{`parm_nm`}{Long parameter name, +#' such as "Strontium-90, water, unfiltered, picocuries per liter".} #' \item{`pcode`}{U.S. Geological Survey 5-digit parameter code used to identify the constituent measured, #' see [`parameters`] dataset for details. For example, the parameter code for Tritium is "07000".} -#' \item{`parm_unit`}{Parameter units of measure, see [`units`] dataset for unit descriptions.} #' \item{`bkgrd_min`}{Minimum limit of background concentration.} #' \item{`bkgrd_max`}{Maximum limit of background concentration.} #' \item{`reference`}{Source of background concentration limits. diff --git a/R/benchmarks.R b/R/benchmarks.R index 30f0f5ed984602ac751b02347e9c1941a4482d45..dc0fc9c0068fce2a05d013e4f4773779bb16d06d 100644 --- a/R/benchmarks.R +++ b/R/benchmarks.R @@ -11,12 +11,10 @@ #' #' @format A data frame with columns: #' \describe{ -#' \item{`srsname`}{Substance Registry Services -#' ([SRS](https://sor.epa.gov/sor_internet/registry/substreg/home/overview/home.do)) name for constituents, -#' such as "Strontium-90".} +#' \item{`parm_nm`}{Long parameter name, +#' such as "Strontium-90, water, unfiltered, picocuries per liter".} #' \item{`pcode`}{U.S. Geological Survey 5-digit parameter code used to identify the constituent measured, #' see [`parameters`] dataset for details. For example, the parameter code for Tritium is "07000".} -#' \item{`parm_unit`}{Parameter units of measure, see [`units`] dataset for unit descriptions.} #' \item{`mcl`}{Maximum Contaminant Levels (MCLs), #' a standard set by the EPA for drinking water quality. #' An MCL is the legal threshold limit on the amount of a substance that is allowed diff --git a/R/clean_sf.R b/R/clean_sf.R new file mode 100644 index 0000000000000000000000000000000000000000..d6d7ae2a524996836d2dc55201e4c0668dd87764 --- /dev/null +++ b/R/clean_sf.R @@ -0,0 +1,107 @@ +#' Clean a Simple Feature +#' +#' @description Subset columns, transform coordinates, +#' and (or) crop the spatial extent of a simple feature. +#' +#' @param x 'sf' object. +#' Simple feature. +#' @param cols 'character' vector. +#' Names indicating the columns to keep. +#' Vector names are optional and used to rename columns. +#' @param agr 'character' vector. +#' Attribute geometry relationship, +#' specifies for each non-geometry attribute column how it relates to the geometry, +#' and can have one of following values: "constant", "aggregate", "identity". +#' Where "constant" is used for attributes that are constant throughout the geometry, +#' "aggregate" where the attribute is an aggregate value over the geometry, +#' "identity" when the attributes uniquely identifies the geometry of particular thing. +#' The default value assumes you don't know. +#' If named, vector names should correspond to the non-geometry list-column columns of `x`. +#' @param crs 'crs' object. +#' Target coordinate reference system. +#' @param extent 'bbox' object. +#' Spatial extent (aka bounding box) used to crop the simple feature. +#' +#' @return Returns an object of class 'sf'. +#' +#' @author J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center +#' +#' @export +#' +#' @keywords internal +#' +#' @examples +#' sp <- system.file("shape/nc.shp", package = "sf") |> +#' sf::st_read(quiet = TRUE) |> +#' clean_sf(cols = "geometry", crs = sf::st_crs(3857)) + +clean_sf <- function(x, + cols = NULL, + agr = NULL, + crs = NULL, + extent = NULL) { + + # check arguments + checkmate::assert_multi_class(x, classes = c("sf", "data.frame")) + checkmate::assert_character(cols, + any.missing = FALSE, + min.len = 1, + max.len = ncol(x), + null.ok = TRUE + ) + checkmate::assert_character(agr, + any.missing = FALSE, + min.len = 1, + max.len = ncol(x) - 1L, + null.ok = TRUE + ) + checkmate::assert_class(crs, classes = "crs", null.ok = TRUE) + checkmate::assert_class(extent, classes = "bbox", null.ok = TRUE) + + # make valid + sp <- sf::st_make_valid(x) + + # transform coordinates + if (!is.null(crs)) { + sp <- sf::st_transform(sp, crs = crs, check = TRUE) + } + + # subset columns + if (!is.null(cols)) { + checkmate::assert_subset(cols, choices = colnames(sp)) + sp <- sp[, cols] + + # rename columns + if (!is.null(names(cols))) { + names(sp) <- names(cols) + } + } + + # set relation to geometry attribute + if (!is.null(agr)) { + checkmate::assert_subset(agr, + choices = c("constant", "aggregate", "identity") + ) + if (!is.null(names(agr))) { + checkmate::assert_subset(names(agr), choices = colnames(sp)) + } + sf::st_agr(sp) <- agr + } + + # crop to extent + if (!is.null(extent)) { + bb <- sf::st_as_sfc(extent) |> + sf::st_transform(crs = sf::st_crs(sp)) |> + sf::st_bbox() + sp <- sf::st_crop(sp, bb) + } + + # check validity + sf::st_is_valid(sp) |> + stopifnot() + + # clear row names + rownames(sp) <- NULL + + sp +} diff --git a/R/dem.R b/R/dem.R index 383c92c781a3fb578f6fc466d3d7e141cdd0fd3e..f39f2c9ac04f360f7b0a6d1b8184f0e8f9753885 100644 --- a/R/dem.R +++ b/R/dem.R @@ -3,10 +3,6 @@ #' @description The digital elevation model (DEM) for the Idaho National Laboratory and its vicinity in eastern Idaho. #' A DEM is a representation of the land surface that uses a digital grid #' to describe the elevation values of the terrain. -#' The spatial grid is composed of -#' \Sexpr{terra::unwrap(inldata::dem) |> nrow() |> format(big.mark = ",")} rows and -#' \Sexpr{terra::unwrap(inldata::dem) |> ncol() |> format(big.mark = ",")} columns, and -#' has cell sizes that are constant at 100 meters by 100 meters. #' #' @format A compressed [`SpatRaster`][terra::SpatRaster] class object with layer: #' \describe{ diff --git a/R/dl.R b/R/dl.R index c632ef289ea9ba1ffb830bf8bf1fdfc9c02dd0b4..f60dec440b29e0e38eee4b9328af6b1024568990 100644 --- a/R/dl.R +++ b/R/dl.R @@ -4,14 +4,12 @@ #' #' @format A data frame with columns: #' \describe{ -#' \item{`srsname`}{Substance Registry Services -#' ([SRS](https://sor.epa.gov/sor_internet/registry/substreg/home/overview/home.do)) -#' name for constituents, such as "Strontium-90".} +#' \item{`parm_nm`}{Long parameter name, +#' such as "Strontium-90, water, unfiltered, picocuries per liter".} #' \item{`pcode`}{U.S. Geological Survey 5-digit parameter code used to identify the constituent measured, #' see [`parameters`] dataset for details. For example, the parameter code for Tritium is "07000".} -#' \item{`parm_unit`}{Parameter units of measure, see [`units`] dataset for unit descriptions.} #' \item{`lab_det_lim_va`}{Laboratory detection limit concentration.} -#' \item{`sdate`}{Date that the detection limit went into effect.} +#' \item{`min_dt`}{Date that the detection limit went into effect.} #' \item{`reference`}{Source of detection limit. #' Reference citations are as follows: #' "Bartholomay and others (2003, table 9)", diff --git a/R/download_file.R b/R/download_file.R new file mode 100644 index 0000000000000000000000000000000000000000..5c007df4475808b28f4fe6b9844b96f8cfd29649 --- /dev/null +++ b/R/download_file.R @@ -0,0 +1,53 @@ +#' Download File from the Internet +#' +#' @description Download a file from the Internet and save to a cache directory. +#' +#' @param url 'character' string. +#' URL of a resource to be downloaded. +#' @param cachedir 'character' string. +#' Path to the cache directory, see [`get_cache_dir`] function for the default value. +#' The file will not be downloaded if the file exists in the cache directory. +#' @param ... +#' Additioanl arguments to be passed to the [`download.file`][utils::download.file] function. +#' The destination of the downloaded file may not be specified. +#' @param quiet 'logical' flag. +#' Whether to supress status messages (if any), and the progress bar. +#' @param mode 'character' string. +#' Mode with which to write the file. Useful values are "w", "wb" (binary), "a" (append) and "ab". +#' +#' @return Returns the path to the downloaded file, or extracted files when decompression occurs. +#' +#' @author J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center +#' +#' @export +#' +#' @keywords internal + +download_file <- function(url, + cachedir = get_cache_dir(), + ..., + quiet = FALSE, + mode = "wb") { + + # check arguments + checkmate::assert_string(url) + checkmate::assert_directory_exists(cachedir, access = "rw") + checkmate::assert_flag(quiet) + checkmate::assert_string(mode) + + # download file + file <- file.path(cachedir, basename(url)) + is <- checkmate::test_file_exists(file, access = "r") + if (!is) { + assert_url(url) + utils::download.file( + url = url, + destfile = file, + ..., + quiet = quiet, + mode = mode + ) + } + + file +} diff --git a/R/get_cache_dir.R b/R/get_cache_dir.R index 3077bf7e5c76d87e3a1e7ccfa8fd26be03c305b9..24777133dcb8063eec024e5b4945c11c23afad72 100644 --- a/R/get_cache_dir.R +++ b/R/get_cache_dir.R @@ -16,25 +16,36 @@ #' @keywords internal #' #' @examples -#' get_cache_dir("test") +#' dir <- get_cache_dir("test") #' #' clear_cache_dir("test") get_cache_dir <- function(name = "inldata") { + + # check arguments checkmate::assert_string(name) + # set directory dir <- Sys.getenv("CACHE_DIR") - - if (!checkmate::test_directory_exists(dir, access = "rw")) { - if (requireNamespace("rappdirs", quietly = TRUE)) { - dir <- rappdirs::user_cache_dir(name) |> - normalizePath(winslash = "/", mustWork = FALSE) - dir.create(dir, showWarnings = FALSE, recursive = TRUE) + if (identical(dir, "")) { + is <- requireNamespace("rappdirs", quietly = TRUE) + if (is) { + dir <- rappdirs::user_cache_dir(name) } else { - dir <- tempdir() + dir <- file.path(tempdir(), "cache", name) } } + # format path + dir <- path.expand(dir) |> + normalizePath(winslash = "/", mustWork = FALSE) + + # create directory + dir.create(dir, showWarnings = FALSE, recursive = TRUE) + + # check directory + checkmate::assert_directory_exists(dir, access = "rw") + dir } diff --git a/R/make_data_release.R b/R/make_data_release.R index e12e8b5238579ce2ca0fbdb6d0a553eecb1e287d..e28783283be0aab03ae07e5c942acdb469a35915 100644 --- a/R/make_data_release.R +++ b/R/make_data_release.R @@ -90,9 +90,11 @@ make_data_release <- function(metadata, ds_files <- basename(ds_paths) ds_names <- tools::file_path_sans_ext(ds_files) + # check if working in package directory + is_pkg_dir <- test_pkg_dir(package) + # parse help documentation for package datasets - is <- checkmate::test_directory_exists("man", access = "rw") - if (is) { + if (is_pkg_dir) { rds <- parse_rd_db(dir = getwd(), stages = "install") } else { rds <- parse_rd_db(package = package) @@ -127,9 +129,23 @@ make_data_release <- function(metadata, d <- rd$format_table if (!is.null(d)) { - # get dataset object - text <- paste(package, ds_names[i], sep = "::") - ds <- parse(text = text) |> eval() + # get dataset + envir <- new.env() + if (is_pkg_dir) { + nm <- load( + file = sprintf("data/%s.rda", ds_names[i]), + envir = envir, + verbose = FALSE + ) + } else { + nm <- utils::data( + list = ds_names[i], + package = package, + envir = envir, + verbose = FALSE + ) + } + ds <- envir[[nm[1]]] # uncompress packed spatial raster objects if (inherits(ds, "PackedSpatRaster")) { @@ -235,7 +251,11 @@ make_data_release <- function(metadata, metadata[[1]]$dataqual$lineage$procstep$procdate <- Sys.Date() |> format(format = "%Y") |> list() # get package citations - citations <- utils::citation(package = package) + if (is_pkg_dir) { + citations <- utils::readCitationFile("inst/CITATION") + } else { + citations <- utils::citation(package = package) + } # set URL data is available online url <- paste0("https://doi.org/", citations[[2]]$doi) @@ -280,8 +300,12 @@ make_data_release <- function(metadata, } # get package URLs - urls <- utils::packageDescription(pkg = package)$URL - urls <- gsub("[\r\n]", "", urls) |> strsplit(split = ",") |> unlist() + if (is_pkg_dir) { + urls <- read.dcf("DESCRIPTION", fields = "URL") |> as.character() + } else { + urls <- utils::packageDescription(pkg = package)$URL + } + urls <- gsub("[\r\n]|[ ]", "", urls) |> strsplit(split = ",") |> unlist() # add cross-reference info metadata[[1]]$idinfo$crossref <- parse_citeinfo( diff --git a/R/make_datasets.R b/R/make_datasets.R index 8e6a82c664967cbc8c8573700883eb6da20cd50d..85feff549621b2d4423d5523dbeeeb40093681a0 100644 --- a/R/make_datasets.R +++ b/R/make_datasets.R @@ -24,8 +24,10 @@ #' United States census year. #' @param buffer_dist 'numeric' number. #' Buffer distance for the study area defined by the bounding of the sample [`sites`] dataset. -#' The buffer distance is measured in units of the coordinate reference system -#' ([`crs$units`][sf::st_crs]). +#' Specified in units of the coordinate reference system (`crs$units`). +#' @param resolution 'numeric' number. +#' Spatial resolution of the raster grid, in meters. +#' Specify in units of the coordinate reference system (`crs$units`). #' @param warn 'integer' value. #' Sets the handling of warning messages. #' Choose value of less than 0 to show no warnings, 1 to print warnings (default), @@ -39,7 +41,8 @@ #' See the [`save`] function for details on compression types. #' @param seed 'integer' count. #' Random number generator state, used to create reproducible results. -#' +#' @param quiet 'logical' flag. +#' Whether to suppress printing of debugging information. #' @details This function retrieves and parses datasets from local and remote sources. #' Access to the internet is required to download data from the following remote sources: #' - National Elevation Dataset ([NED](https://www.usgs.gov/publications/national-elevation-dataset)) @@ -83,29 +86,37 @@ make_datasets <- function(path = getwd(), tz = "America/Denver", census_yr = 2023, buffer_dist = 1000, + resolution = 100, warn = 1, timeout = 10, compress = "xz", - seed = 0L) { + seed = 0L, + quiet = FALSE) { # track computation time dt <- Sys.time() - message("TIMESTAMP: ", format(dt, usetz = TRUE)) + message("TIMESTAMP: ", format(dt, usetz = TRUE), "\n") # check arguments - path <- path.expand(path) |> normalizePath(winslash = "/", mustWork = FALSE) + path <- path.expand(path) |> + normalizePath(winslash = "/", mustWork = FALSE) checkmate::assert_directory_exists(path, access = "rw") - sprintf("%s/data-raw", path) |> checkmate::assert_directory_exists(access = "r") - destdir <- path.expand(destdir) |> normalizePath(winslash = "/", mustWork = FALSE) + destdir <- path.expand(destdir) |> + normalizePath(winslash = "/", mustWork = FALSE) checkmate::assert_flag(clean) checkmate::assert_choice(tz, choices = OlsonNames()) checkmate::assert_int(census_yr, lower = 2000) + checkmate::assert_number(buffer_dist, lower = 0, finite = TRUE) + checkmate::assert_number(resolution, lower = 1, finite = TRUE) checkmate::assert_int(warn) checkmate::assert_number(timeout, lower = 1, finite = TRUE) if (!is.logical(compress)) { - checkmate::assert_choice(compress, choices = c("auto", "gzip", "bzip2", "xz")) + checkmate::assert_choice(compress, + choices = c("auto", "gzip", "bzip2", "xz") + ) } checkmate::assert_count(seed, null.ok = TRUE) + checkmate::assert_flag(quiet) # check packages for (pkg in c("dataRetrieval", "stats", "stringi")) { @@ -113,50 +124,78 @@ make_datasets <- function(path = getwd(), } # check system dependencies - Sys.which("7z") |> checkmate::assert_file_exists(access = "x") if (!capabilities("libcurl")) { stop("libcurl is unavailable", call. = FALSE) } # set global options op <- options(warn = warn, timeout = timeout * 60, useFancyQuotes = FALSE) - on.exit(options(op)) + on.exit(expr = options(op)) + + # set terra-package options + local({ + terra::terraOptions(progress = 0L, verbose = !quiet) + }) # make temporary directory tmpdir <- tempfile("") dir.create(tmpdir, showWarnings = FALSE) + on.exit( + expr = unlink(tmpdir, recursive = TRUE), + add = TRUE + ) + + # set U.S. Census URL + census_url <- paste0("https://www2.census.gov/geo/tiger/TIGER", census_yr) + assert_url(census_url) - # set census url - census_url <- sprintf("ftp://ftp2.census.gov/geo/tiger/TIGER%s", census_yr) + # set National Hydrography Dataset (NHD) URL + nhd_url <- "https://dmap-data-commons-ow.s3.amazonaws.com" + assert_url(nhd_url) - # get cache directory - cachedir <- get_cache_dir() + # set The National Map (TNM) URL + tnm_url <- "https://prd-tnm.s3.amazonaws.com" + assert_url(tnm_url) + + # test data-raw folder exists + paste0(path, "/data-raw") |> + checkmate::assert_directory_exists(access = "r") # make coordinate reference system dataset (crs) message("STATUS: making 'crs' dataset ...") file <- file.path(path, "data-raw/misc/projection.txt") - crs <- mds_crs(file) + checkmate::assert_file_exists(file, access = "r") + crs <- readLines(con = file, encoding = "UTF-8") |> + sf::st_crs() save(crs, file = file.path(tmpdir, "crs.rda"), compress = FALSE) + # make parameter dataset (parameters) + message("STATUS: making 'parameters' dataset ...") + file <- file.path(path, "data-raw/qwdata/pcodes.txt") + checkmate::assert_file_exists(file, access = "r") + pcodes <- utils::read.delim(file = file, header = FALSE, colClasses = "character")[[1]] + parameters <- mds_parameters(pcodes = pcodes) + # make laboratory detection limits dataset (dl) message("STATUS: making 'dl' dataset ...") file <- file.path(path, "data-raw/misc/detection-limits.tsv") - dl <- mds_dl(file) + checkmate::assert_file_exists(file, access = "r") + data <- utils::read.delim(file, comment.char = "#", colClasses = "character") + dl <- mds_dl(data, parameters) save(dl, file = file.path(tmpdir, "dl.rda"), compress = FALSE) - # make parameter dataset (parameters) - message("STATUS: making 'parameters' dataset ...") - file <- file.path(path, "data-raw/qwdata/pcodes.txt") - parameters <- mds_parameters(file) - # make water-quality samples dataset (samples) message("STATUS: making 'samples' dataset ...") - files <- file.path(path, c( - "data-raw/qwdata/output.rdb", - "data-raw/misc/translate-codes.tsv", - "data-raw/misc/counting-error.tsv" - )) - samples <- mds_samples(files, tz, dl, parameters, seed) + file <- file.path(path, "data-raw/qwdata/output.rdb") + checkmate::assert_file_exists(file, access = "r") + data <- read_rdb(file) + file <- file.path(path, "data-raw/misc/alpha-codes.tsv") + checkmate::assert_file_exists(file, access = "r") + alpha_codes <- utils::read.delim(file, colClasses = "character") + file <- file.path(path, "data-raw/misc/counting-error.tsv") + checkmate::assert_file_exists(file, access = "r") + cnt_error <- utils::read.delim(file, colClasses = "character") + samples <- mds_samples(data, alpha_codes, cnt_error, tz, dl, parameters, seed) save(samples, file = file.path(tmpdir, "samples.rda"), compress = FALSE) # continue making parameter dataset (parameters) @@ -166,29 +205,43 @@ make_datasets <- function(path = getwd(), # make benchmark concentrations dataset (benchmarks) message("STATUS: making 'benchmarks' dataset ...") - files <- file.path(path, c( - "data-raw/misc/benchmarks.csv", - "data-raw/misc/benchmarks-extras.tsv" - )) - benchmarks <- mds_benchmarks(files, parameters) + file <- file.path(path, "data-raw/misc/benchmarks.csv") + checkmate::assert_file_exists(file, access = "r") + bm <- utils::read.csv(file, + na.strings = c("NA", ""), + strip.white = TRUE, + colClasses = "character", + check.names = FALSE + ) + file <- file.path(path, "data-raw/misc/benchmarks-extras.tsv") + checkmate::assert_file_exists(file, access = "r") + mcl_extras <- utils::read.delim(file, + strip.white = TRUE, + colClasses = "character" + ) + benchmarks <- mds_benchmarks(bm, mcl_extras, parameters) save(benchmarks, file = file.path(tmpdir, "benchmarks.rda"), compress = FALSE) # make site information dataset (sites) message("STATUS: making 'sites' dataset ...") file <- file.path(path, "data-raw/qwdata/siteids.txt") - sites <- mds_sites(file, crs) + checkmate::assert_file_exists(file, access = "r") + data <- utils::read.delim(file = file, header = FALSE, colClasses = "character") + colnames(data) <- c("agency_cd", "site_no", "station_nm", "network_cd", "pos") + sites <- mds_sites(data, crs) # set spatial extent - sp_extent <- sf::st_buffer(sites, dist = buffer_dist) |> sf::st_bbox() + extent <- sf::st_buffer(sites, dist = buffer_dist) |> + sf::st_bbox() # make surface-water measurements dataset (swm) message("STATUS: making 'swm' dataset ...") - swm <- mds_swm(tz, sites) + swm <- mds_swm(sites, tz) save(swm, file = file.path(tmpdir, "swm.rda"), compress = FALSE) # make groundwater levels dataset (gwl) message("STATUS: making 'gwl' dataset ...") - gwl <- mds_gwl(tz, sites) + gwl <- mds_gwl(sites, tz) save(gwl, file = file.path(tmpdir, "gwl.rda"), compress = FALSE) # continue making site information dataset (sites) @@ -196,93 +249,146 @@ make_datasets <- function(path = getwd(), sites <- merge(sites, d, by = "site_no", sort = FALSE) save(sites, file = file.path(tmpdir, "sites.rda"), compress = FALSE) - # make parameter units dataset (units) + # make units of measurment dataset (units) message("STATUS: making 'units' dataset ...") file <- file.path(path, "data-raw/misc/units.tsv") - units <- mds_units(file) + checkmate::assert_file_exists(file, access = "r") + data <- utils::read.delim(file, + comment.char = "#", + na.strings = "", + colClasses = "character" + ) + units <- mds_units(data) save(units, file = file.path(tmpdir, "units.rda"), compress = FALSE) # make background concentrations dataset (background) message("STATUS: making 'background' dataset ...") file <- file.path(path, "data-raw/misc/background.tsv") - background <- mds_background(file) + checkmate::assert_file_exists(file, access = "r") + data <- utils::read.delim(file, + strip.white = TRUE, + colClasses = "character" + ) + background <- mds_background(data, parameters) save(background, file = file.path(tmpdir, "background.rda"), compress = FALSE) # make eastern Snake River Plain boundary dataset (esrp) message("STATUS: making 'esrp' dataset ...") file <- file.path(path, "data-raw/misc/esrp.geojson") - esrp <- mds_esrp(file, crs) + checkmate::assert_file_exists(file, access = "r") + data <- sf::st_read(dsn = file, quiet = quiet) + esrp <- clean_sf(data, cols = "geometry", crs = crs) save(esrp, file = file.path(tmpdir, "esrp.rda"), compress = FALSE) # make Idaho National Laboratory boundary dataset (inl) message("STATUS: making 'inl' dataset ...") file <- file.path(path, "data-raw/misc/inl.geojson") - inl <- mds_inl(file, crs) + checkmate::assert_file_exists(file, access = "r") + data <- sf::st_read(dsn = file, quiet = quiet) + inl <- clean_sf(data, cols = "geometry", crs = crs) save(inl, file = file.path(tmpdir, "inl.rda"), compress = FALSE) # make industrial waste ditch dataset (iwd) message("STATUS: making 'iwd' dataset ...") file <- file.path(path, "data-raw/misc/nrfiwd.geojson") - iwd <- mds_iwd(file, crs) + checkmate::assert_file_exists(file, access = "r") + data <- sf::st_read(dsn = file, quiet = quiet) + iwd <- clean_sf(data, cols = "geometry", crs = crs) save(iwd, file = file.path(tmpdir, "iwd.rda"), compress = FALSE) # make Idaho National Laboratory facilities dataset (facilities) message("STATUS: making 'facilities' dataset ...") file <- file.path(path, "data-raw/misc/facilities.geojson") - facilities <- mds_facilities(file, crs) + checkmate::assert_file_exists(file, access = "r") + data <- sf::st_read(dsn = file, quiet = quiet) + facilities <- mds_facilities(data, crs = crs) save(facilities, file = file.path(tmpdir, "facilities.rda"), compress = FALSE) # make percolation ponds dataset (percponds) message("STATUS: making 'percponds' dataset ...") file <- file.path(path, "data-raw/misc/percponds.geojson") - percponds <- mds_percponds(file, crs) + checkmate::assert_file_exists(file, access = "r") + data <- sf::st_read(dsn = file, quiet = quiet) + percponds <- mds_percponds(data, crs = crs) save(percponds, file = file.path(tmpdir, "percponds.rda"), compress = FALSE) # make state of Idaho boundary dataset (idaho) message("STATUS: making 'idaho' dataset ...") url <- sprintf("%s/STATE/tl_%s_us_state.zip", census_url, census_yr) - idaho <- mds_idaho(url, cachedir, crs) + files <- download_file(url, quiet = quiet) |> extract_archive() + file <- grep(".shp$", files, value = TRUE) + data <- sf::st_read(dsn = file, quiet = quiet) + idaho <- mds_idaho(data, crs) save(idaho, file = file.path(tmpdir, "idaho.rda"), compress = FALSE) # make cities and towns dataset (cities) message("STATUS: making 'cities' dataset ...") url <- sprintf("%s/PLACE/tl_%s_16_place.zip", census_url, census_yr) - cities <- mds_cities(url, cachedir, crs, sp_extent) + files <- download_file(url, quiet = quiet) |> extract_archive() + file <- grep(".shp$", files, value = TRUE) + data <- sf::st_read(dsn = file, quiet = quiet) + cities <- mds_cities(data, crs, extent) save(cities, file = file.path(tmpdir, "cities.rda"), compress = FALSE) # make county boundaries dataset (counties) message("STATUS: making 'counties' dataset ...") url <- sprintf("%s/COUNTY/tl_%s_us_county.zip", census_url, census_yr) - counties <- mds_counties(url, cachedir, crs, sp_extent) + files <- download_file(url, quiet = quiet) |> extract_archive() + file <- grep(".shp$", files, value = TRUE) + data <- sf::st_read(dsn = file, quiet = quiet) + counties <- mds_counties(data, crs, extent) save(counties, file = file.path(tmpdir, "counties.rda"), compress = FALSE) # make road netowrk dataset (roads) message("STATUS: making 'roads' dataset ...") - prisec_url <- sprintf("%s/PRISECROADS/tl_%s_16_prisecroads.zip", census_url, census_yr) - all_urls <- sprintf("%s/ROADS/tl_%s_%s_roads.zip", census_url, census_yr, counties$id) - roads <- mds_roads(prisec_url, all_urls, cachedir, crs, sp_extent) + urls <- sprintf("%s/ROADS/tl_%s_%s_roads.zip", census_url, census_yr, counties$id) + all_data <- do.call(rbind, + lapply(urls, function(url) { + files <- download_file(url, quiet = quiet) |> extract_archive() + file <- grep(".shp$", files, value = TRUE) + sf::st_read(dsn = file, quiet = quiet) + }) + ) + url <- sprintf("%s/PRISECROADS/tl_%s_16_prisecroads.zip", census_url, census_yr) + files <- download_file(url, quiet = quiet) |> extract_archive() + file <- grep(".shp$", files, value = TRUE) + prisec_data <- sf::st_read(dsn = file, quiet = quiet) + roads <- mds_roads(all_data, prisec_data, crs, extent) save(roads, file = file.path(tmpdir, "roads.rda"), compress = FALSE) # make lakes and ponds dataset (lakes) message("STATUS: making 'lakes' dataset ...") - url <- "https://dmap-data-commons-ow.s3.amazonaws.com/NHDPlusV21/Data/NHDPlusPN/NHDPlusV21_PN_17_NHDSnapshot_08.7z" - lakes <- mds_lakes(url, cachedir, crs, sp_extent) + url <- paste0(nhd_url, "/NHDPlusV21/Data/NHDPlusPN/NHDPlusV21_PN_17_NHDSnapshot_08.7z") + files <- download_file(url, quiet = quiet) |> extract_archive() + file <- grep("NHDWaterbody.shp$", files, value = TRUE) + data <- sf::st_read(dsn = file, quiet = quiet) + lakes <- mds_lakes(data, crs, extent) save(lakes, file = file.path(tmpdir, "lakes.rda"), compress = FALSE) # make rivers and streams dataset (streams) message("STATUS: making 'streams' dataset ...") - url <- "https://dmap-data-commons-ow.s3.amazonaws.com/NHDPlusV21/Data/NHDPlusPN/NHDPlusV21_PN_17_NHDSnapshot_08.7z" - streams <- mds_streams(url, cachedir, crs, sp_extent) + url <- paste0(nhd_url, "/NHDPlusV21/Data/NHDPlusPN/NHDPlusV21_PN_17_NHDSnapshot_08.7z") + files <- download_file(url, quiet = quiet) |> extract_archive() + file <- grep("NHDFlowline.shp$", files, value = TRUE) + data <- sf::st_read(dsn = file, quiet = quiet) + streams <- mds_streams(data, crs, extent) save(streams, file = file.path(tmpdir, "streams.rda"), compress = FALSE) # make digital elevation model dataset (dem) message("STATUS: making 'dem' dataset ...") ids <- c("n44w113", "n44w114", "n45w113", "n45w114") - urls <- sprintf( - fmt = "https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/TIFF/current/%s/USGS_13_%s.tif", - ids, ids + urls <- sprintf("%s/StagedProducts/Elevation/13/TIFF/current/%s/USGS_13_%s.tif", + tnm_url, ids, ids + ) + data <- do.call(terra::merge, + lapply(urls, + FUN = function(url) { + file <- download_file(url, quiet = quiet) + terra::rast(file) + } + ) ) - dem <- mds_dem(urls, cachedir, crs, sp_extent) + dem <- mds_dem(data, crs, extent, resolution) save(dem, file = file.path(tmpdir, "dem.rda"), compress = FALSE) # compress temporary files @@ -299,71 +405,32 @@ make_datasets <- function(path = getwd(), } files <- list.files(path = tmpdir, full.names = TRUE) file.copy(from = files, to = destdir, overwrite = TRUE) - unlink(tmpdir, recursive = TRUE) # get paths to files in destination directory paths <- file.path(destdir, basename(files), fsep = "/") # print computation time - message("DURATION: ", format(Sys.time() - dt, usetz = TRUE)) + message("\n", "DURATION: ", format(Sys.time() - dt, usetz = TRUE)) invisible(paths) } -# Coordinate Reference System (crs) ---- - -mds_crs <- function(file) { - checkmate::assert_file_exists(file, access = "r") - x <- readLines(con = file, encoding = "UTF-8") - sf::st_crs(x) -} - - -# Laboratory Detection Limits (dl) ----- - -mds_dl <- function(file) { - - # check arguments - checkmate::assert_file_exists(file, access = "r") - - # read file - d <- utils::read.delim(file, comment.char = "#", colClasses = "character") - - # convert column class - d$parm_unit <- as.factor(d$parm_unit) - d$lab_det_lim_va <- as.numeric(d$lab_det_lim_va) - d$sdate <- as.Date(d$sdate) - d$reference <- as.factor(d$reference) - - # order and remove row names - idxs <- tolower(d$srsname) |> stringi::stri_order(numeric = TRUE) - d <- d[idxs, ] - rownames(d) <- NULL - - d -} - - # Parameter Information for Analytes (parameters) ----- -mds_parameters <- function(file) { +mds_parameters <- function(pcodes) { # check arguments - checkmate::assert_file_exists(file, access = "r") - - # read metadata file - meta <- utils::read.delim(file = file, header = FALSE, colClasses = "character") - colnames(meta) <- c("pcode", "parm_nm") + checkmate::assert_character(pcodes, any.missing = FALSE, min.len = 1) # check for duplicated values - if (any(is <- duplicated(meta$pcode))) { - txt <- sQuote(meta$pcode[is]) |> paste(collapse = ", ") + if (any(is <- duplicated(pcodes))) { + txt <- pcodes[is] |> sQuote() |> paste(collapse = ", ") stop("Duplicated parameter codes: ", txt, call. = FALSE) } # download data - d <- dataRetrieval::readNWISpCode(meta$pcode) + d <- dataRetrieval::readNWISpCode(pcodes) cols <- c( "parm_nm" = "parameter_nm", @@ -371,7 +438,7 @@ mds_parameters <- function(file) { "parm_group_nm" = "parameter_group_nm", "casrn" = "casrn", "srsname" = "srsname", - "parm_unit" = "parameter_units" + "unit_cd" = "parameter_units" ) d <- d[, cols] colnames(d) <- names(cols) @@ -383,7 +450,7 @@ mds_parameters <- function(file) { d$srsname[d$srsname == "Trihalomethanes (four), total, from SDWA NPDWR"] <- "TTHM4" d$srsname[d$srsname == ""] <- NA_character_ - d$parm_unit <- trimws(d$parm_unit) + d$unit_cd <- trimws(d$unit_cd) subs <- c( "mg/L" = "^mg/l$", "mg/L as CaCO3" = "^mg/l CaCO3$", @@ -392,13 +459,17 @@ mds_parameters <- function(file) { "ug/L " = "^ug/l " ) for (i in seq_along(subs)) { - d$parm_unit <- sub(pattern = subs[i], replacement = names(subs)[i], x = d$parm_unit) + d$unit_cd <- sub( + pattern = subs[i], + replacement = names(subs)[i], + x = d$unit_cd + ) } - d$parm_unit[d$parm_unit == ""] <- NA_character_ + d$unit_cd[d$unit_cd == ""] <- NA_character_ # convert classes d$parm_group_nm <- as.factor(d$parm_group_nm) - d$parm_unit <- as.factor(d$parm_unit) + d$unit_cd <- as.factor(d$unit_cd) idxs <- tolower(d$parm_nm) |> stringi::stri_order(numeric = TRUE) d <- d[idxs, ] @@ -408,47 +479,70 @@ mds_parameters <- function(file) { } +# Laboratory Detection Limits (dl) ----- + +mds_dl <- function(data, parameters) { + + # check arguments + checkmate::assert_data_frame(data, types = "character", min.rows = 1, col.names = "named") + checkmate::assert_data_frame(parameters, min.rows = 1, col.names = "named") + + # merge in parameter name + d <- merge(x = data, y = parameters[, c("pcode", "parm_nm")], by = "pcode") + + # convert column class + d$unit_cd <- as.factor(d$unit_cd) + d$lab_det_lim_va <- as.numeric(d$lab_det_lim_va) + d$min_dt <- as.Date(d$min_dt) + d$reference <- as.factor(d$reference) + + # unit conversion + conversion <- convert_units(d, parameters) + d$lab_det_lim_va <- d$lab_det_lim_va * conversion$mult + + # order and remove row names + cols <- c("parm_nm", "pcode", "lab_det_lim_va", "min_dt", "reference") + idxs <- tolower(d$srsname) |> + stringi::stri_order(numeric = TRUE) + d <- d[idxs, cols] + rownames(d) <- NULL + + d +} + + # Water-Quality Data Records (samples) ----- -mds_samples <- function(files, tz, dl, parameters, seed) { +mds_samples <- function(d, alpha_codes, cnt_error, tz, dl, parameters, seed) { # check arguments - checkmate::assert_character(files, len = 3, any.missing = FALSE) - for (file in files) checkmate::assert_file_exists(file, access = "r") + checkmate::assert_data_frame(d, + types = "character", + min.rows = 1, + col.names = "named" + ) + checkmate::assert_data_frame(alpha_codes, + types = "character", + min.rows = 1, + col.names = "named" + ) + checkmate::assert_data_frame(cnt_error, + types = "character", + min.rows = 1, + col.names = "named" + ) checkmate::assert_string(tz) checkmate::assert_data_frame(dl, min.rows = 1, col.names = "named") checkmate::assert_data_frame(parameters, min.rows = 1, col.names = "named") checkmate::assert_count(seed, null.ok = TRUE) - # read sample records file - v <- readLines(files[1]) - i <- 0L - repeat { - ss <- v[i + 1L] |> substr(start = 1, stop = 1) - if (ss != "#") break - i <- i + 1L - } - d <- utils::read.table( - file = files[1], - sep = "\t", - quote = "", - na.strings = "NA", - skip = i + 2L, - strip.white = TRUE, - colClasses = "character" - ) - hdr <- v[i + 1L] |> strsplit(split = "\t") |> unlist() - colnames(d) <- hdr - remark <- v[seq_len(i)] - - # read translate codes file - codes <- utils::read.delim(file = files[2], colClasses = "character") - dic <- codes$nwis_cd - names(dic) <- codes$alpha_cd - colnames(d) <- dic[hdr] - idxs <- which(dic[hdr] == "") + # translate alpha codes + dic <- alpha_codes$nwis_cd + names(dic) <- alpha_codes$alpha_cd + colnames(d) <- dic[colnames(d)] + idxs <- which(dic[colnames(d)] == "") if (length(idxs) > 0) { - txt <- hdr[idxs] |> sQuote() |> paste(collapse = ", ") + txt <- colnames(d)[idxs] |> sQuote() |> paste(collapse = ", ") warning("Missing database names for ALPHA codes:\n ", txt, call. = FALSE, immediate. = TRUE) d <- d[, -idxs] } @@ -456,23 +550,25 @@ mds_samples <- function(files, tz, dl, parameters, seed) { # set result units idxs <- match(d$pcode, parameters$pcode) if (any(is <- is.na(idxs))) { - txt <- sQuote(d$pcode[idxs][is]) |> paste(collapse = ", ") + txt <- d$pcode[idxs][is] |> sQuote() |> paste(collapse = ", ") stop("Samples contains unrecognized parameter codes: ", txt, call. = FALSE) } - d$parm_unit <- parameters$parm_unit[idxs] + d$unit_cd <- parameters$unit_cd[idxs] # set site name site_nm <- parse_station_nm(d$station_nm) d <- data.frame(site_nm, d) # account for missing time - d$sample_tm[d$sample_tm == ""] <- "1200" + is <- d$sample_tm %in% c("", NA) + d$sample_tm[is] <- "1200" d$sample_dt <- paste(d$sample_dt, d$sample_tm) |> as.POSIXct(tz = tz, format = "%Y%m%d %H%M") d$sample_tm <- NULL # get the number of digits to the right of the decimal point in a number - d$result_scale_va <- sub("\\d+\\.?(.*)$", "\\1", d$result_va) |> nchar() + d$result_scale_va <- sub("\\d+\\.?(.*)$", "\\1", d$result_va) |> + nchar() d$result_va <- as.numeric(d$result_va) d$anl_stat_cd <- NULL @@ -483,25 +579,27 @@ mds_samples <- function(files, tz, dl, parameters, seed) { # remove unnecessary columns cols <- c("station_nm", "parm_nm") - idxs <- match(cols, colnames(d)) |> stats::na.omit() + idxs <- match(cols, colnames(d)) |> + stats::na.omit() if (length(idxs) > 0) { d <- d[, -idxs] } # remove records that are duplicated in the NWIS and QWDATA databases idxs <- which(colnames(d) %in% c("db_no", "dqi_cd")) - is <- d[, -idxs] |> duplicated() + is <- duplicated(d[, -idxs]) d <- d[!is, ] # remove contaminated results - d <- d[d$remark_cd != "V", ] + is <- d$remark_cd %in% "V" + d <- d[!is, ] # initialize remark d$remark <- nrow(d) |> character() # report zero and negative results as nondetects - is <- d$remark_cd == "<" & !is.na(d$result_va) & d$result_va <= 0 - d$remark_cd[is] <- character(1) + is <- d$remark_cd %in% "<" & !is.na(d$result_va) & d$result_va <= 0 + d$remark_cd[is] <- NA_character_ txt <- "Change remark code from '<' (nondetect) to '' because result value is less than or equal to 0" d$remark[is] <- paste_strings(d$remark[is], txt, collapse = "; ", recycle0 = TRUE) @@ -510,7 +608,7 @@ mds_samples <- function(files, tz, dl, parameters, seed) { radchem_pcode <- parameters$pcode[is] # report radiochemical nondetects as less than the reporting level - is <- d$remark_cd == "R" & d$pcode %in% radchem_pcode + is <- d$remark_cd %in% "R" & d$pcode %in% radchem_pcode d$result_va[is] <- d$rpt_lev_va[is] d$remark_cd[is] <- "<" txt <- "Substitute result value with reporting level value and change remark code from 'R' to '<'" @@ -530,7 +628,7 @@ mds_samples <- function(files, tz, dl, parameters, seed) { checkmate::assert_subset(choices = choices, empty.ok = FALSE) # assume unrecorded sample types are regular environmental samples - is <- d$sample_type_cd == "A" + is <- d$sample_type_cd %in% "A" d$sample_type_cd[is] <- "9" txt <- "Change sample type code from 'A' (not recorded) to '9' (regular sample)" d$remark[is] <- paste_strings(d$remark[is], txt, collapse = "; ", recycle0 = TRUE) @@ -542,14 +640,11 @@ mds_samples <- function(files, tz, dl, parameters, seed) { format(d$sample_dt, format = "%Y%m%d%H%M", tz = "GMT") ) - # read counting error file - counting_error <- utils::read.delim(file = files[3], colClasses = "character") - # convert counting error to standard deviaiton is_lt_1989 <- d$sample_dt < as.POSIXct("2008-01-01") - for (i in seq_len(nrow(counting_error))) { - cd <- counting_error$pcode[i] - ce <- counting_error$pcode_ce[i] + for (i in seq_len(nrow(cnt_error))) { + cd <- cnt_error$pcode[i] + ce <- cnt_error$pcode_ce[i] is_cd <- d$pcode == cd & is.na(d$lab_sd_va) is_ce <- d$pcode == ce @@ -575,8 +670,8 @@ mds_samples <- function(files, tz, dl, parameters, seed) { d$id <- seq_len(nrow(d)) # subset replicate samples - env_samp <- d[d$sample_type_cd == "9", ] - rep_samp <- d[d$sample_type_cd == "7", ] + env_samp <- d[d$sample_type_cd %in% "9", ] + rep_samp <- d[d$sample_type_cd %in% "7", ] # convert to day env_day <- as.Date(env_samp$sample_dt) |> as.integer() @@ -619,9 +714,12 @@ mds_samples <- function(files, tz, dl, parameters, seed) { is <- orphans$pcode %in% ignore_pcode orphans <- orphans[!is, ] if (nrow(orphans) > 0) { - txt <- sprintf(" %s %s (%s)", orphans$sample_dt, orphans$site_no, orphans$site_nm) |> - unique() |> sort() - sprintf("Unable to pair %d replicate samples:", length(txt)) |> + txt <- sprintf(" %s '%s' %s %s", + orphans$site_no, orphans$site_nm, orphans$pcode, orphans$sample_dt + ) |> + unique() |> + sort() + sprintf("Unable to pair %d replicate records:", length(txt)) |> warning(call. = FALSE, immediate. = TRUE) paste(txt, collapse = "\n") |> message() } @@ -637,7 +735,7 @@ mds_samples <- function(files, tz, dl, parameters, seed) { # set laboratory detection limits d$lab_det_lim_va <- NA_real_ for (i in seq_len(nrow(dl))) { - is <- d$pcode == dl$pcode[i] & as.Date(d$sample_dt) >= dl$sdate[i] + is <- d$pcode == dl$pcode[i] & as.Date(d$sample_dt) >= dl$min_dt[i] d$lab_det_lim_va[is] <- dl$lab_det_lim_va[i] } @@ -658,13 +756,13 @@ mds_samples <- function(files, tz, dl, parameters, seed) { is <- is.finite(ui) & ui < 0 li[is] <- 0 ui[is] <- 0 - li <- round_usgs(li, digits = d$result_scale_va) - ui <- round_usgs(ui, digits = d$result_scale_va) + li <- round_numbers(li, digits = d$result_scale_va) + ui <- round_numbers(ui, digits = d$result_scale_va) d$lab_li_va <- li d$lab_ui_va <- ui # represent nondetect result value using confidence interval - is <- d$remark_cd == "<" + is <- d$remark_cd %in% "<" d$lab_li_va[is] <- 0 d$lab_ui_va[is] <- d$result_va[is] @@ -679,7 +777,7 @@ mds_samples <- function(files, tz, dl, parameters, seed) { "dqi_cd", "rpt_lev_cd", "sample_type_cd", - "parm_unit" + "unit_cd" ) for (col in cols) { d[[col]] <- as.factor(d[[col]]) @@ -695,7 +793,7 @@ mds_samples <- function(files, tz, dl, parameters, seed) { "site_nm", "sample_dt", "parm_short_nm", - "parm_unit", + "unit_cd", "remark_cd", "result_va", "lab_sd_va", @@ -726,22 +824,25 @@ mds_samples <- function(files, tz, dl, parameters, seed) { # Benchmark Concentrations (benchmarks) ----- -mds_benchmarks <- function(files, parameters) { +mds_benchmarks <- function(bm, mcl_extras, parameters) { # check arguments - checkmate::assert_character(files, len = 2, any.missing = FALSE) - for (file in files) checkmate::assert_file_exists(file, access = "r") - checkmate::assert_data_frame(parameters, min.rows = 1, col.names = "named") - - # read benchmarks file - d <- utils::read.csv( - file = files[1], - na.strings = c("NA", ""), - strip.white = TRUE, - colClasses = "character", - check.names = FALSE + checkmate::assert_data_frame(bm, + types = "character", + min.rows = 1, + col.names = "named" + ) + checkmate::assert_data_frame(mcl_extras, + types = "character", + min.rows = 1, + col.names = "named" + ) + checkmate::assert_data_frame(parameters, + min.rows = 1, + col.names = "named" ) + # set column names cols <- c( "srsname" = "Chemical Name", "casrn" = "CAS Registry Number", @@ -754,7 +855,7 @@ mds_benchmarks <- function(files, parameters) { "hbsl_cancer" = "Cancer HBSL (micrograms/L)", "remark" = "Benchmark Remarks" ) - d <- d[, cols] + d <- bm[, cols] colnames(d) <- names(cols) d$srsname <- NULL @@ -762,74 +863,60 @@ mds_benchmarks <- function(files, parameters) { d$hhbp_noncancer <- as.numeric(d$hhbp_noncancer) d$hbsl_noncancer <- as.numeric(d$hbsl_noncancer) FUN <- function(x, idx) { - vapply(strsplit(x, split = "-"), function(y) as.numeric(y[idx]), numeric(1)) + vapply(strsplit(x, split = "-"), + FUN = function(y) { + as.numeric(y[idx]) + }, + FUN.VALUE = numeric(1) + ) } d$hhbp_cancer_min <- FUN(d$hhbp_cancer, 1) d$hhbp_cancer_max <- FUN(d$hhbp_cancer, 2) d$hbsl_cancer_min <- FUN(d$hbsl_cancer, 1) d$hbsl_cancer_max <- FUN(d$hbsl_cancer, 2) - is <- grepl("^mg/L", parameters$parm_unit) - is <- d$casrn %in% parameters$casrn[is] - bm <- c( - "mcl", - "hhbp_noncancer", - "hhbp_cancer_min", - "hhbp_cancer_max", - "hbsl_noncancer", - "hbsl_cancer_min", - "hbsl_cancer_max" - ) - d[is, bm] <- d[is, bm] * 0.001 - is <- grepl("^mrem/yr", d$remark) d$mcl[is] <- 50 # screening level l <- strsplit(d$pcode, split = ", ") - idxs <- lapply(seq_along(l), function(i) { - rep(i, length(l[[i]])) - }) |> unlist() + idxs <- lapply(seq_along(l), + FUN = function(i) { + rep(i, length(l[[i]])) + } + ) |> + unlist() d <- d[idxs, ] d$pcode <- unlist(l) - d$parm_unit <- "ug/L" + d$unit_cd <- "ug/L" - p <- parameters[, c("pcode", "srsname")] + p <- parameters[, c("pcode", "parm_nm")] d <- merge(p, d, by = "pcode", all.x = TRUE, sort = FALSE) - # read maximum contaminant level extras file - mcl_extras <- utils::read.delim( - file = files[2], - strip.white = TRUE, - colClasses = "character" - ) mcl_extras$mcl <- as.numeric(mcl_extras$mcl) - idxs <- match(mcl_extras$pcode, d$pcode) d[idxs, colnames(mcl_extras)] <- mcl_extras[] - d$mcl[idxs] <- mcl_extras$mcl |> as.numeric() - d$parm_unit[idxs] <- mcl_extras$parm_unit - - is <- apply(is.na(d[, bm]), 1, all) - d <- d[!is, ] + d$unit_cd[idxs] <- mcl_extras$unit_cd - d$parm_unit <- as.factor(d$parm_unit) - - idxs <- tolower(d$srsname) |> stringi::stri_order(numeric = TRUE) cols <- c( - "srsname", - "pcode", - "parm_unit", "mcl", "hhbp_noncancer", "hhbp_cancer_min", "hhbp_cancer_max", "hbsl_noncancer", "hbsl_cancer_min", - "hbsl_cancer_max", - "remark" + "hbsl_cancer_max" ) + is <- is.na(d[, cols]) |> + apply(MARGIN = 1, FUN = all) + d <- d[!is, ] + conversion <- convert_units(d, parameters) + d[, cols] <- d[, cols] * conversion$mult + + idxs <- tolower(d$parm_nm) |> + stringi::stri_order(numeric = TRUE) + cols <- c("parm_nm", "pcode", cols, "remark") d <- d[idxs, cols] rownames(d) <- NULL @@ -839,31 +926,30 @@ mds_benchmarks <- function(files, parameters) { # Site Information (sites) ----- -mds_sites <- function(file, crs) { +mds_sites <- function(data, crs) { # check arguments - checkmate::assert_string(file) - checkmate::assert_file_exists(file, access = "r") + checkmate::assert_data_frame(data, + types = "character", + min.rows = 1, + col.names = "named" + ) checkmate::assert_class(crs, "crs") - # read metadata file - meta <- utils::read.delim(file = file, header = FALSE, colClasses = "character") - colnames(meta) <- c("agency_cd", "site_no", "station_nm", "network_cd", "pos") - # check for duplicated values - if (any(is <- duplicated(meta$site_no))) { - txt <- sQuote(meta$site_no[is]) |> paste(collapse = ", ") + if (any(is <- duplicated(data$site_no))) { + txt <- sQuote(data$site_no[is]) |> paste(collapse = ", ") stop("Duplicated site numbers: ", txt, call. = FALSE) } # download data from NWIS - d <- dataRetrieval::readNWISsite(siteNumbers = unique(meta$site_no)) + d <- dataRetrieval::readNWISsite(siteNumbers = unique(data$site_no)) # change class - meta$pos <- as.integer(meta$pos) + data$pos <- as.integer(data$pos) # merge in metadata - d <- merge(d, meta[, c("site_no", "network_cd", "pos")], by = "site_no") + d <- merge(d, data[, c("site_no", "network_cd", "pos")], by = "site_no") # check altitude datum is <- !(d$alt_datum_cd %in% "NAVD88") @@ -873,7 +959,9 @@ mds_sites <- function(file, crs) { call. = FALSE, immediate. = TRUE ) - sprintf(" %s (%s) datum '%s'", d$site_no[is], d$station_nm[is], d$alt_datum_cd[is]) |> + sprintf(" %s '%s' datum '%s'", + d$site_no[is], d$station_nm[is], d$alt_datum_cd[is] + ) |> paste(collapse = "\n") |> message() d$alt_datum_cd[is] <- "NAVD88" } @@ -902,7 +990,9 @@ mds_sites <- function(file, crs) { "R" = 3, "F" = 5 ) - checkmate::assert_subset(d$coord_acy_cd, choices = names(coord_accuracies)) + checkmate::assert_subset(d$coord_acy_cd, + choices = names(coord_accuracies) + ) d$coord_acy_va <- coord_accuracies[d$coord_acy_cd] cols <- c( @@ -969,38 +1059,45 @@ mds_sites <- function(file, crs) { # Surface-Water Measurements (swm) ----- -mds_swm <- function(tz, sites) { +mds_swm <- function(sites, tz) { # check arguments - checkmate::assert_string(tz) checkmate::assert_class(sites, classes = "sf") + checkmate::assert_string(tz) # download data from NWIS d <- dataRetrieval::readNWISmeas( siteNumbers = sites$site_no, - convertType = TRUE, - tz = tz + tz = tz, + convertType = TRUE ) + # set measurement date-time value + d$stage_dt <- d$measurement_dateTime + if (anyNA(d$stage_dt)) { + stop("Missing timestamp", call. = FALSE) + } + # add local site names idxs <- match(d$site_no, sites$site_no) d$site_nm <- sites$site_nm[idxs] - # set measurement timestamp - if (anyNA(d$measurement_dateTime)) { - stop("Missing timestamp", call. = FALSE) - } - d$stage_dt <- d$measurement_dateTime - # remove duplicated timestamp records is <- duplicated(d[, c("site_no", "stage_dt")]) if (any(is)) { warning("Removed duplicated timestamp records:", call. = FALSE, immediate. = TRUE) - sprintf(" %s (%s) at %s", d$site_no[is], d$site_nm[is], d$stage_dt[is]) |> - paste(collapse = "\n") |> message() + sprintf(" %s '%s' %s", + d$site_no[is], d$site_nm[is], d$stage_dt[is] + ) |> + paste(collapse = "\n") |> + message() d <- d[!is, ] } + # add local site names + idxs <- match(d$site_no, sites$site_no) + d$site_nm <- sites$site_nm[idxs] + # set measurement values d$stage_va <- as.numeric(d$gage_height_va) d$disch_va <- as.numeric(d$discharge_va) @@ -1019,15 +1116,13 @@ mds_swm <- function(tz, sites) { ) idxs <- match(qual, names(per_unc)) d$frac_unc <- per_unc[idxs] / 100 - d$stage_acy_va <- (d$stage_va * d$frac_unc) |> round_usgs(digits = 2) - d$disch_acy_va <- (d$disch_va * d$frac_unc) |> round_usgs(digits = 2) + d$stage_acy_va <- (d$stage_va * d$frac_unc) |> round_numbers(digits = 2) + d$disch_acy_va <- (d$disch_va * d$frac_unc) |> round_numbers(digits = 2) # sort records - idxs <- order( - stringi::stri_rank(tolower(d$site_nm), numeric = TRUE), - d$site_no, - d$stage_dt - ) + idxs <- tolower(d$site_nm) |> + stringi::stri_rank(numeric = TRUE) |> + order(d$site_no, d$stage_dt) cols <- c( "site_nm", "site_no", @@ -1046,11 +1141,11 @@ mds_swm <- function(tz, sites) { # Groundwater Levels (gwl) ----- -mds_gwl <- function(tz, sites) { +mds_gwl <- function(sites, tz) { # check arguments - checkmate::assert_string(tz) checkmate::assert_class(sites, classes = "sf") + checkmate::assert_string(tz) # download data from NWIS d <- dataRetrieval::readNWISgwl( @@ -1059,26 +1154,25 @@ mds_gwl <- function(tz, sites) { "72019", # depth to water level, in feet below land surface. "62611" # groundwater level above NAVD 88, in feet ), - convertType = TRUE, - tz = tz + convertType = FALSE ) # add local site names idxs <- match(d$site_no, sites$site_no) d$site_nm <- sites$site_nm[idxs] - # set measurement data-time - ct <- d$lev_dateTime - is <- is.na(ct) - ct[is] <- paste(d$lev_dt[is], "12:00") |> - as.POSIXct(tz = tz, format = "%Y-%m-%d %H:%M") - d$lev_dt <- ct - is <- is.na(d$lev_dt) + # set measurement date-time value + datetime <- as_posix_ct(dt = d$lev_dt, tm = d$lev_tm, tz = tz) + is <- is.na(datetime) if (any(is)) { - warning("Unknown time formats, removed records:", call. = FALSE, immediate. = TRUE) - sprintf(" %s (%s) format '%s'", d$site_no[is], d$site_nm[is], d$lev_dateTime[is]) |> - paste(collapse = "\n") |> message() + warning("Unknown date-time format, removed records:", call. = FALSE, immediate. = TRUE) + sprintf(" %s '%s' date '%s' time '%s'", + d$site_no[is], d$site_nm[is], d$lev_dt[is], d$lev_tm[is] + ) |> + paste(collapse = "\n") |> + message() } + d$lev_dt <- datetime d <- d[!is, ] # set measurement values @@ -1140,113 +1234,59 @@ mds_gwl <- function(tz, sites) { } -# Parameter Units (units) ----- +# Units of Measurment (units) ----- -mds_units <- function(file) { +mds_units <- function(data) { # check arguments - checkmate::assert_file_exists(file, access = "r") + checkmate::assert_data_frame(data, min.rows = 1, col.names = "named") - # read file - d <- utils::read.delim(file, comment.char = "#", na.strings = "", colClasses = "character") + idxs <- tolower(data$unit_cd) |> order() + data <- data[idxs, ] + rownames(data) <- NULL - idxs <- tolower(d$parm_unit) |> order() - d <- d[idxs, ] - rownames(d) <- NULL - - d + data } # Background Concentrations (background) ----- -mds_background <- function(file) { +mds_background <- function(data, parameters) { # check arguments - checkmate::assert_file_exists(file, access = "r") + checkmate::assert_data_frame(data, min.rows = 1, col.names = "named") + checkmate::assert_data_frame(parameters, min.rows = 1, col.names = "named") - d <- utils::read.delim(file, strip.white = TRUE, colClasses = "character") + # merge in parameters + d <- merge(x = data, y = parameters[, c("pcode", "parm_nm")], by = "pcode") d$bkgrd_min <- as.numeric(d$bkgrd_min) d$bkgrd_max <- as.numeric(d$bkgrd_max) d$reference <- as.factor(d$reference) - d$parm_unit <- as.factor(d$parm_unit) + d$unit_cd <- as.factor(d$unit_cd) - idxs <- tolower(d$srsname) |> stringi::stri_order(numeric = TRUE) - d <- d[idxs, ] + # unit conversion + conversion <- convert_units(d, parameters) + cols <- c("bkgrd_min", "bkgrd_max") + d[, cols] <- d[, cols] * conversion$mult + + cols <- c("parm_nm", "pcode", "bkgrd_min", "bkgrd_max", "reference") + idxs <- tolower(d$parm_nm) |> stringi::stri_order(numeric = TRUE) + d <- d[idxs, cols] rownames(d) <- NULL d } -# Eastern Snake River Plain Boundary (esrp) ----- - -mds_esrp <- function(file, crs) { - - # check arguments - checkmate::assert_file_exists(file, access = "r") - checkmate::assert_class(crs, classes = "crs") - - sp <- sf::st_read(dsn = file) |> - sf::st_make_valid() |> - sf::st_transform(crs = crs, check = TRUE) - geometry <- sf::st_sfc(sp$geometry) - sp <- sf::st_sf(geometry) - - sp -} - - -# Idaho National Laboratory Boundary (inl) ----- - -mds_inl <- function(file, crs) { - - # check arguments - checkmate::assert_file_exists(file, access = "r") - checkmate::assert_class(crs, classes = "crs") - - sp <- sf::st_read(dsn = file) |> - sf::st_make_valid() |> - sf::st_transform(crs = crs, check = TRUE) - geometry <- sf::st_sfc(sp$geometry) - sp <- sf::st_sf(geometry) - - sp -} - - -# Industrial Waste Ditch (iwd) ----- - -mds_iwd <- function(file, crs) { - - # check arguments - checkmate::assert_file_exists(file, access = "r") - checkmate::assert_class(crs, classes = "crs") - - sp <- sf::st_read(dsn = file) |> - sf::st_make_valid() |> - sf::st_transform(crs = crs) - geometry <- sf::st_sfc(sp$geometry) - sp <- sf::st_sf(geometry) - - sp -} - - # Idaho National Laboratory Facilities (facilities) ----- -mds_facilities <- function(file, crs) { +mds_facilities <- function(data, crs) { # check arguments - checkmate::assert_file_exists(file, access = "r") + checkmate::assert_multi_class(data, classes = c("sf", "data.frame")) checkmate::assert_class(crs, classes = "crs") - sp <- sf::st_read(dsn = file, agr = "identity") |> - sf::st_make_valid() |> - sf::st_transform(crs = crs, check = TRUE) - names(sp) <- c("id", "geometry") - features <- c( "ATRC" = "Advanced Test Reactor Complex", "CFA" = "Central Facilities Area", @@ -1256,365 +1296,318 @@ mds_facilities <- function(file, crs) { "RWMC" = "Radioactive Waste Management Complex", "TAN" = "Test Area North " ) - sp$name <- features[match(sp$id, names(features))] + idxs <- match(data[["NAME"]], names(features)) + data$name <- features[idxs] + + data <- clean_sf(data, + cols = c( + "name" = "name", + "id" = "NAME", + "geometry" = "geometry" + ), + agr = "identity", + crs = crs + ) - idxs <- tolower(sp$name) |> stringi::stri_order(numeric = TRUE) - cols <- c("name", "id", "geometry") - sp <- sp[idxs, cols] - rownames(sp) <- NULL + idxs <- tolower(data$name) |> + stringi::stri_order(numeric = TRUE) + data <- data[idxs, ] + rownames(data) <- NULL - sp + data } # Percolation Ponds (percponds) ----- -mds_percponds <- function(file, crs) { +mds_percponds <- function(data, crs) { # check arguments - checkmate::assert_file_exists(file, access = "r") + checkmate::assert_multi_class(data, classes = c("sf", "data.frame")) checkmate::assert_class(crs, classes = "crs") - sp <- sf::st_read(dsn = file, agr = "identity") |> - sf::st_make_valid() |> - sf::st_transform(crs = crs, check = TRUE) - - cols <- c("name" = "Name", "facility_id" = "Pond_loc") - sp <- sp[, cols] - names(sp) <- c(names(cols), "geometry") + data <- clean_sf(data, + cols = c( + "name" = "Name", + "facility_id" = "Pond_loc", + "min_dt" = "Start_date", + "max_dt" = "End_date", + "geometry" = "geometry" + ), + agr = "identity", + crs = crs + ) - sp$facility_id <- as.factor(sp$facility_id) + data$facility_id <- as.factor(data$facility_id) + data$min_dt <- as.integer(data$min_dt) + data$max_dt <- as.integer(data$max_dt) idxs <- order( - stringi::stri_rank(tolower(sp$name), numeric = TRUE), - stringi::stri_rank(tolower(sp$facility_id), numeric = TRUE) + stringi::stri_rank(tolower(data$name), numeric = TRUE), + stringi::stri_rank(tolower(data$facility_id), numeric = TRUE) ) - sp <- sp[idxs, ] - rownames(sp) <- NULL + data <- data[idxs, ] + rownames(data) <- NULL - sp + data } # State of Idaho Boundary (idaho) ----- -mds_idaho <- function(url, cachedir, crs) { +mds_idaho <- function(data, crs) { # check arguments - checkmate::assert_string(url) - checkmate::assert_directory_exists(cachedir, access = "rw") + checkmate::assert_multi_class(data, classes = c("sf", "data.frame")) checkmate::assert_class(crs, classes = "crs") - file <- file.path(cachedir, basename(url)) - if (!checkmate::test_file_exists(file)) { - assert_url(url) - utils::download.file(url = url, destfile = file, mode = "wb") - } - files <- utils::unzip(file, exdir = tempdir()) - sp <- grep(".shp$", files, value = TRUE) |> - sf::st_read() |> - sf::st_make_valid() |> - sf::st_transform(crs = crs, check = TRUE) |> - sf::st_simplify(preserveTopology = TRUE, dTolerance = 100) + is <- data[["NAME"]] == "Idaho" + data <- data[is, ] - is <- sp[["NAME"]] == "Idaho" - geometry <- sf::st_sfc(sp[is, ]$geometry) - sp <- sf::st_sf(geometry) + data <- clean_sf(data, cols = "geometry", crs = crs) - sp + data <- sf::st_simplify(data, + preserveTopology = TRUE, + dTolerance = 100 + ) + + data } # Cities and Towns (cities) ----- -mds_cities <- function(url, cachedir, crs, sp_extent) { +mds_cities <- function(data, crs, extent) { # check arguments - checkmate::assert_string(url) - checkmate::assert_directory_exists(cachedir, access = "rw") + checkmate::assert_multi_class(data, classes = c("sf", "data.frame")) checkmate::assert_class(crs, classes = "crs") - checkmate::assert_class(sp_extent, "bbox") - - file <- file.path(cachedir, basename(url)) - if (!checkmate::test_file_exists(file)) { - assert_url(url) - utils::download.file(url = url, destfile = file, mode = "wb") - } - files <- utils::unzip(file, exdir = tempdir()) - sp <- grep(".shp$", files, value = TRUE) |> - sf::st_read(agr = "constant") |> - sf::st_make_valid() |> - sf::st_centroid() |> - sf::st_transform(crs = crs) |> - sf::st_crop(sp_extent) + checkmate::assert_class(extent, "bbox") - cols <- c("name" = "NAME", "id" = "GEOID") - sp <- sp[, cols] - names(sp) <- c(names(cols), "geometry") + data <- clean_sf(data, + cols = c( + "name" = "NAME", + "id" = "GEOID", + "geometry" = "geometry" + ), + agr = "identity", + crs = crs, + extent = extent + ) - sf::st_agr(sp) <- c("name" = "identity", "id" = "identity") + data <- sf::st_centroid(data) - idxs <- tolower(sp$name) |> stringi::stri_order(numeric = TRUE) - sp <- sp[idxs, ] - rownames(sp) <- NULL + idxs <- tolower(data$name) |> + stringi::stri_order(numeric = TRUE) + data <- data[idxs, ] + rownames(data) <- NULL - sp + data } # County Boundaries (counties) ----- -mds_counties <- function(url, cachedir, crs, sp_extent) { +mds_counties <- function(data, crs, extent) { # check arguments - checkmate::assert_string(url) - checkmate::assert_directory_exists(cachedir, access = "rw") + checkmate::assert_multi_class(data, classes = c("sf", "data.frame")) checkmate::assert_class(crs, classes = "crs") - checkmate::assert_class(sp_extent, "bbox") - - file <- file.path(cachedir, basename(url)) - if (!checkmate::test_file_exists(file)) { - assert_url(url) - utils::download.file(url = url, destfile = file, mode = "wb") - } - files <- utils::unzip(file, exdir = tempdir()) - sp <- grep(".shp$", files, value = TRUE) |> - sf::st_read(agr = "constant") |> - sf::st_make_valid() |> - sf::st_transform(crs = crs, check = TRUE) |> - sf::st_crop(sp_extent) - - cols <- c("name" = "NAME", "id" = "GEOID") - sp <- sp[, cols] - names(sp) <- c(names(cols), "geometry") + checkmate::assert_class(extent, "bbox") - sf::st_agr(sp) <- c("name" = "identity", "id" = "identity") + data <- clean_sf(data, + cols = c( + "name" = "NAME", + "id" = "GEOID", + "geometry" = "geometry" + ), + agr = "identity", + crs = crs, + extent = extent + ) - idxs <- tolower(sp$name) |> stringi::stri_order(numeric = TRUE) - sp <- sp[idxs, ] - rownames(sp) <- NULL + idxs <- tolower(data$name) |> + stringi::stri_order(numeric = TRUE) + data <- data[idxs, ] + rownames(data) <- NULL - sp + data } # Road Netowrk (roads) ----- -mds_roads <- function(prisec_url, all_urls, cachedir, crs, sp_extent) { +mds_roads <- function(all_data, prisec_data, crs, extent) { # check arguments - checkmate::assert_string(prisec_url) - checkmate::assert_character(all_urls, min.len = 1, any.missing = FALSE) - checkmate::assert_directory_exists(cachedir, access = "rw") + checkmate::assert_multi_class(all_data, classes = c("sf", "data.frame")) + checkmate::assert_multi_class(prisec_data, classes = c("sf", "data.frame")) checkmate::assert_class(crs, classes = "crs") - checkmate::assert_class(sp_extent, "bbox") + checkmate::assert_class(extent, "bbox") - # read primary and secondary roads file - file <- file.path(cachedir, basename(prisec_url)) - if (!checkmate::test_file_exists(file)) { - assert_url(prisec_url) - utils::download.file(url = prisec_url, destfile = file, mode = "wb") - } - files <- utils::unzip(file, exdir = tempdir()) - prisec_roads <- grep(".shp$", files, value = TRUE) |> sf::st_read() |> sf::st_make_valid() - - # read county road files - all_roads <- NULL - for (url in all_urls) { - file <- file.path(cachedir, basename(url)) - if (!checkmate::test_file_exists(file)) { - assert_url(url) - utils::download.file(url = url, destfile = file, mode = "wb") - } - files <- utils::unzip(file, exdir = tempdir()) - spdf <- grep(".shp$", files, value = TRUE) |> - sf::st_read() |> - sf::st_make_valid() - all_roads <- rbind(all_roads, spdf) - } + cols <- c( + "name" = "FULLNAME", + "id" = "LINEARID", + "geometry" = "geometry" + ) + all_data <- clean_sf(all_data, + cols = cols, + agr = "identity", + crs = crs, + extent = extent + ) + prisec_data <- clean_sf(prisec_data, + cols = cols, + agr = "identity", + crs = crs, + extent = extent + ) - spdf <- all_roads |> - sf::st_make_valid() |> - sf::st_transform(crs = crs) |> - sf::st_crop(sp_extent) - rownames(spdf) <- NULL - spdf <- spdf[, "LINEARID"] - spdf <- stats::aggregate( - spdf[, "geometry"], - by = list(spdf[["LINEARID"]]), + data <- stats::aggregate( + all_data[, "geometry"], + by = list(all_data$id), FUN = mean ) - colnames(spdf) <- c("id", "geometry") - - idxs <- match(spdf$id, all_roads[["LINEARID"]]) - spdf$name <- all_roads[["FULLNAME"]][idxs] + colnames(data) <- c("id", "geometry") + idxs <- match(data$id, all_data$id) + data$name <- all_data$name[idxs] + data$prisec_fl <- data$id %in% prisec_data$id - spdf$prisec_fl <- spdf$id %in% prisec_roads[["LINEARID"]] + idxs <- tolower(data$name) |> + stringi::stri_rank(numeric = TRUE) |> + order(data$id) + cols <- c("name", "id", "prisec_fl", "geometry") + data <- data[idxs, cols] + rownames(data) <- NULL - spdf <- spdf[, c("name", "id", "prisec_fl", "geometry")] - idxs <- spdf$name |> tolower() |> stringi::stri_rank(numeric = TRUE) |> order(spdf$id) - spdf <- spdf[idxs, ] - rownames(spdf) <- NULL - spdf <- sf::st_make_valid(spdf) + data <- sf::st_make_valid(data) - spdf + data } # Lakes and Ponds (lakes) ----- -mds_lakes <- function(url, cachedir, crs, sp_extent) { +mds_lakes <- function(data, crs, extent) { # check arguments - checkmate::assert_string(url) - checkmate::assert_directory_exists(cachedir, access = "rw") + checkmate::assert_multi_class(data, classes = c("sf", "data.frame")) checkmate::assert_class(crs, classes = "crs") - checkmate::assert_class(sp_extent, "bbox") - - file <- file.path(cachedir, basename(url)) - if (!checkmate::test_file_exists(file)) { - assert_url(url) - utils::download.file(url = url, destfile = file, mode = "wb") - } - sprintf("7z e -aoa -bd -o\"%s\" \"%s\"", tempdir(), file) |> system() - sp <- file.path(tempdir(), "NHDWaterbody.shp") |> - sf::st_read(agr = "constant") |> - sf::st_make_valid() |> - sf::st_transform(crs = crs, check = TRUE) |> - sf::st_crop(sp_extent) - - cols <- c( - "gnis_nm" = "GNIS_NAME", - "id" = "COMID", - "reach_cd" = "REACHCODE", - "gnis_id" = "GNIS_ID", - "feature_tp" = "FTYPE" - ) - sp <- sp[, cols] - names(sp) <- c(names(cols), "geometry") - - sf::st_agr(sp) <- c( - "gnis_nm" = "identity", - "id" = "identity", - "reach_cd" = "identity", - "gnis_id" = "identity", - "feature_tp" = "constant" + checkmate::assert_class(extent, "bbox") + + data <- clean_sf(data, + cols = c( + "gnis_nm" = "GNIS_NAME", + "id" = "COMID", + "reach_cd" = "REACHCODE", + "gnis_id" = "GNIS_ID", + "feature_tp" = "FTYPE", + "geometry" = "geometry" + ), + agr = c( + "gnis_nm" = "identity", + "id" = "identity", + "reach_cd" = "identity", + "gnis_id" = "identity", + "feature_tp" = "constant" + ), + crs = crs, + extent = extent ) - sp$id <- as.character(sp$id) - sp$feature_tp <- as.factor(sp$feature_tp) + data$id <- as.character(data$id) + data$feature_tp <- as.factor(data$feature_tp) - idxs <- order( - stringi::stri_rank(tolower(sp$gnis_nm), numeric = TRUE), - sp$id - ) - sp <- sp[idxs, ] - rownames(sp) <- NULL + idxs <- tolower(data$gnis_nm) |> + stringi::stri_rank(numeric = TRUE) |> + order(data$id) + data <- data[idxs, ] + rownames(data) <- NULL - sp + data } # Rivers and Streams (streams) ----- -mds_streams <- function(url, cachedir, crs, sp_extent) { +mds_streams <- function(data, crs, extent) { # check arguments - checkmate::assert_string(url) - checkmate::assert_directory_exists(cachedir, access = "rw") + checkmate::assert_multi_class(data, classes = c("sf", "data.frame")) checkmate::assert_class(crs, classes = "crs") - checkmate::assert_class(sp_extent, "bbox") - - file <- file.path(cachedir, basename(url)) - if (!checkmate::test_file_exists(file)) { - assert_url(url) - utils::download.file(url = url, destfile = file, mode = "wb") - } - sprintf("7z e -aoa -bd -o\"%s\" \"%s\"", tempdir(), file) |> system() - spdf <- file.path(tempdir(), "NHDFlowline.shp") |> - sf::st_read(agr = "constant") |> - sf::st_make_valid() |> - sf::st_transform(crs = crs) |> - sf::st_crop(sp_extent) - - cols <- c( - "gnis_nm" = "GNIS_NAME", - "id" = "COMID", - "reach_cd" = "REACHCODE", - "gnis_id" = "GNIS_ID", - "feature_tp" = "FTYPE" - ) - spdf <- spdf[, cols] - names(spdf) <- c(names(cols), "geometry") - - sf::st_agr(spdf) <- c( - "gnis_nm" = "identity", - "id" = "identity", - "reach_cd" = "identity", - "gnis_id" = "identity", - "feature_tp" = "constant" + checkmate::assert_class(extent, "bbox") + + data <- clean_sf(data, + cols = c( + "gnis_nm" = "GNIS_NAME", + "id" = "COMID", + "reach_cd" = "REACHCODE", + "gnis_id" = "GNIS_ID", + "feature_tp" = "FTYPE", + "geometry" = "geometry" + ), + agr = c( + "gnis_nm" = "identity", + "id" = "identity", + "reach_cd" = "identity", + "gnis_id" = "identity", + "feature_tp" = "constant" + ), + crs = crs, + extent = extent ) - is <- !is.na(spdf$gnis_id) - spdf <- spdf[is, ] + is <- is.na(data$gnis_id) + data <- data[!is, ] - spdf$id <- as.character(spdf$id) - spdf$feature_tp <- as.factor(spdf$feature_tp) + data$id <- as.character(data$id) + data$feature_tp <- as.factor(data$feature_tp) - idxs <- spdf$gnis_nm |> tolower() |> stringi::stri_rank() |> order(spdf$id) - spdf <- spdf[idxs, ] - rownames(spdf) <- NULL + idxs <- tolower(data$gnis_nm) |> + stringi::stri_rank(numeric = TRUE) |> + order(data$id) + data <- data[idxs, ] + rownames(data) <- NULL - spdf + data } # Digital Elevation Model (dem) ----- -mds_dem <- function(urls, cachedir, crs, sp_extent) { +mds_dem <- function(data, crs, extent, resolution) { # check arguments - checkmate::assert_character(urls, min.len = 1, any.missing = FALSE) - checkmate::assert_directory_exists(cachedir, access = "rw") + checkmate::assert_class(data, classes = "SpatRaster") checkmate::assert_class(crs, classes = "crs") - checkmate::assert_class(sp_extent, "bbox") - - files <- file.path(cachedir, basename(urls)) - - is <- !vapply( - files, - FUN = checkmate::test_file_exists, - FUN.VALUE = logical(1), - access = "r" - ) - if (any(is)) { - for (url in urls[is]) assert_url(url) - utils::download.file( - url = urls[is], - destfile = files[is], - method = "libcurl", - mode = "wb" - ) - } + checkmate::assert_class(extent, "bbox") + checkmate::assert_number(resolution, lower = 1, finite = TRUE) + # make raster grid grd <- terra::rast( crs = crs$input, - extent = terra::ext(sp_extent), - resolution = 100 + extent = terra::ext(extent), + resolution = resolution ) - grd_disagg <- terra::disagg(grd, fact = 5L) - args <- lapply(files, FUN = terra::rast) - dem <- do.call(terra::merge, args) + # set aggregation factor + fact <- 5L + + # disaggregate raster cells + grd <- terra::disagg(grd, fact = fact) + + # project data into raster grid + r <- terra::project(data, grd) - sr <- dem |> - terra::project(grd_disagg) |> - terra::aggregate(fact = 5L, fun = stats::median) - sr[] <- sr[] * 3.2808399 # convert meters to feet - sr[] <- round_usgs(sr[], digits = 0) - names(sr) <- "elevation" + # aggregate raster cells + r <- terra::aggregate(r, fact = fact, fun = stats::median) - terra::wrap(sr) + # convert elevation from meters to feet + r[] <- r[] * 3.2808399 + r[] <- round_numbers(r[], digits = 0) + + names(r) <- "elevation" + terra::wrap(r) } @@ -1652,7 +1645,8 @@ tabulate_parm_data <- function(parameters, samples) { FUN.VALUE = integer(1) ) - ranks <- tolower(tbl$parm_nm) |> stringi::stri_rank(numeric = TRUE) + ranks <- tolower(tbl$parm_nm) |> + stringi::stri_rank(numeric = TRUE) idxs <- order(tbl$parm_group_nm, ranks) cols <- c( "pcode", @@ -1685,11 +1679,11 @@ tabulate_site_data <- function(sites, samples, gwl, swm) { d <- stats::aggregate(x, by = by, FUN = min) names(d)[2] <- "min_dt" - dat <- merge(dat, d, by = "site_no", all = TRUE) + dat <- merge(dat, d, by = "site_no", all.x = TRUE) d <- stats::aggregate(x, by = by, FUN = max) names(d)[2] <- "max_dt" - dat <- merge(dat, d, by = "site_no", all = TRUE) + dat <- merge(dat, d, by = "site_no", all.x = TRUE) dat$min_dt <- as.Date(dat$min_dt) dat$max_dt <- as.Date(dat$max_dt) @@ -1708,7 +1702,7 @@ tabulate_site_data <- function(sites, samples, gwl, swm) { dat$nsamples[is.na(dat$nsamples)] <- 0L is <- !is.na(samples$rep_pair_id) & - samples$sample_type_cd == "7" + samples$sample_type_cd %in% "7" x <- table(samples$site_no[is]) |> as.array() dat$nreps <- x[match(dat$site_no, names(x))] |> as.integer() dat$nreps[is.na(dat$nreps)] <- 0L @@ -1728,3 +1722,45 @@ tabulate_site_data <- function(sites, samples, gwl, swm) { dat } + + +# Convert Units ---- + +convert_units <- function(data, parameters) { + + # define possible conversions (add values as necessary) + conversions <- c( + "ug/L to mg/L" = 0.001, + "ug/L to mg/L as N" = 0.001, + "ug/L to mg/L as P" = 0.001 + ) + + # check arguments + checkmate::assert_data_frame(data, min.cols = 2, col.names = "named") + cols <- c("pcode", "unit_cd") + checkmate::assert_subset(cols, choices = colnames(data)) + checkmate::assert_vector(data$pcode, any.missing = FALSE) + checkmate::assert_vector(data$unit_cd, any.missing = FALSE) + checkmate::assert_data_frame(parameters, min.rows = 1, col.names = "named") + + # set to and from + d <- data[, cols] + colnames(d) <- c("pcode", "from") + d$from <- as.character(d$from) + idxs <- match(d$pcode, parameters$pcode) + d$to <- parameters$unit_cd[idxs] |> as.character() + + # initialize multiplier + d$mult <- NA_real_ + d$mult[d$from == d$to] <- 1 + + # get conversion multipliers + types <- paste(d$from, d$to, sep = " to ") + convert <- types[d$from != d$to] |> unique() + checkmate::assert_subset(convert, choices = names(conversions)) + for (type in convert) { + d$mult[types == type] <- conversions[type] + } + + d +} diff --git a/R/make_dm.R b/R/make_dm.R index 4e05e47ee0490142226676df72012defbdc6a12a..6d07ecf718143accbc00e02840c3780933925a77 100644 --- a/R/make_dm.R +++ b/R/make_dm.R @@ -33,7 +33,7 @@ make_dm <- function() { dm::dm_add_pk(table = "benchmarks", columns = "pcode", check = TRUE) |> dm::dm_add_pk(table = "cities", columns = "id", check = TRUE) |> dm::dm_add_pk(table = "counties", columns = "id", check = TRUE) |> - dm::dm_add_pk(table = "dl", columns = c("pcode", "sdate"), check = TRUE) |> + dm::dm_add_pk(table = "dl", columns = c("pcode", "min_dt"), check = TRUE) |> dm::dm_add_pk(table = "facilities", columns = "id", check = TRUE) |> dm::dm_add_pk(table = "gwl", columns = c("site_no", "lev_dt", "lev_meth_cd"), check = TRUE) |> dm::dm_add_pk(table = "lakes", columns = "id", check = TRUE) |> @@ -43,21 +43,18 @@ make_dm <- function() { dm::dm_add_pk(table = "sites", columns = "site_no", check = TRUE) |> dm::dm_add_pk(table = "streams", columns = "id", check = TRUE) |> dm::dm_add_pk(table = "swm", columns = c("site_no", "stage_dt"), check = TRUE) |> - dm::dm_add_pk(table = "units", columns = "parm_unit", check = TRUE) |> + dm::dm_add_pk(table = "units", columns = "unit_cd", check = TRUE) |> # add secondary keys dm::dm_add_fk(table = "background", columns = "pcode", ref_table = "parameters", check = TRUE) |> - dm::dm_add_fk(table = "background", columns = "parm_unit", ref_table = "units", check = TRUE) |> dm::dm_add_fk(table = "benchmarks", columns = "pcode", ref_table = "parameters", check = TRUE) |> - dm::dm_add_fk(table = "benchmarks", columns = "parm_unit", ref_table = "units", check = TRUE) |> dm::dm_add_fk(table = "dl", columns = "pcode", ref_table = "parameters", check = TRUE) |> - dm::dm_add_fk(table = "dl", columns = "parm_unit", ref_table = "units", check = TRUE) |> dm::dm_add_fk(table = "gwl", columns = "site_no", ref_table = "sites", check = TRUE) |> - dm::dm_add_fk(table = "parameters", columns = "parm_unit", ref_table = "units", check = TRUE) |> + dm::dm_add_fk(table = "parameters", columns = "unit_cd", ref_table = "units", check = TRUE) |> dm::dm_add_fk(table = "percponds", columns = "facility_id", ref_table = "facilities", check = TRUE) |> dm::dm_add_fk(table = "samples", columns = "site_no", ref_table = "sites", check = TRUE) |> dm::dm_add_fk(table = "samples", columns = "pcode", ref_table = "parameters", check = TRUE) |> - dm::dm_add_fk(table = "samples", columns = "parm_unit", ref_table = "units", check = TRUE) |> + dm::dm_add_fk(table = "samples", columns = "unit_cd", ref_table = "units", check = TRUE) |> dm::dm_add_fk(table = "swm", columns = "site_no", ref_table = "sites", check = TRUE) |> # validate data model @@ -73,30 +70,25 @@ combine_tables <- function(package) { checkmate::assert_string(package) # combine tables sourced from Rdata files - if (checkmate::test_file_exists("DESCRIPTION", access = "r")) { - pkg <- read.dcf("DESCRIPTION", fields = "Package") |> as.character() - if (pkg == package) { - files <- list.files("data", pattern = "*.rda", full.names = TRUE) - if (length(files) > 0) { - ds_names <- basename(files) |> tools::file_path_sans_ext() - l <- lapply(files, - function(x) { - env <- environment() - nm <- load(file = x, envir = env) - tryCatch( - { - env[[nm]] |> as.data.frame() - }, - error = function(e) { - return(NULL) - } - ) + if (test_pkg_dir(package)) { + ds_paths <- list.files("data", pattern = "*.rda", full.names = TRUE) + ds_names <- basename(ds_paths) |> tools::file_path_sans_ext() + l <- lapply(ds_paths, + function(x) { + env <- environment() + nm <- load(file = x, envir = env) + tryCatch( + { + env[[nm]] |> as.data.frame() + }, + error = function(e) { + return(NULL) } ) - names(l) <- ds_names - return(ccp(l)) } - } + ) + names(l) <- ds_names + return(ccp(l)) } # combine tables sourced from package datasets diff --git a/R/parameters.R b/R/parameters.R index 0d4bc02e0cb7e245a619869a0ec2ad04b7d8a32e..3f8fdac702862ea542fc07d85620733d698d2748 100644 --- a/R/parameters.R +++ b/R/parameters.R @@ -32,7 +32,7 @@ #' \item{`srsname`}{Substance Registry Services #' ([SRS](https://sor.epa.gov/sor_internet/registry/substreg/home/overview/home.do)) name, #' such as "Strontium-90".} -#' \item{`parm_unit`}{Parameter units of measure, see [`units`] dataset for unit descriptions.} +#' \item{`unit_cd`}{Units of measurement, see [`units`] dataset for unit descriptions.} #' \item{`min_dt`}{Collection date of first sample analyzed for the parameter.} #' \item{`max_dt`}{Collection date of last sample analyzed for the parameter.} #' \item{`nrecords`}{Number of records associated with the parameter.} diff --git a/R/parse_rd_db.R b/R/parse_rd_db.R index ff31086f89f4d3a54a06abb8b10d26656d966b0e..3aab9ef308a35951ca8f11d83c3bb74f7b60a834 100644 --- a/R/parse_rd_db.R +++ b/R/parse_rd_db.R @@ -113,25 +113,6 @@ find_rd_tags <- function(rd, tags) { } -# Function to drop tags from an Rd object, -# Code adapted from the tools:::.Rd_drop_nodes_with_tags function in R 4.3, -# released under the "GNU General Public License" version 2 license. -drop_rd_tags <- function(rd, tags) { - checkmate::assert_class(rd, classes = "Rd") - checkmate::assert_character(tags, any.missing = FALSE, min.len = 1) - recurse <- function(x) { - if (is.list(x)) { - attrs <- attributes(x) - is <- get_rd_tags(x) |> match(table = tags) |> is.na() - x <- lapply(x[is], recurse) - attributes(x) <- attrs - } - x - } - recurse(rd) -} - - # Function to get Rd tags get_rd_tags <- function(rd) { checkmate::assert_class(rd, classes = "Rd") diff --git a/R/percponds.R b/R/percponds.R index fcb882a763f037ab72cfdc41b162324ac2499ab3..51dacae0edc6b488100ccb5191a4cf6de13da105 100644 --- a/R/percponds.R +++ b/R/percponds.R @@ -10,17 +10,25 @@ #' \item{`facility_id`}{INL facility the percolation pond is located at. #' Abbreviations and descriptions are as follows: #' "ATRC" is the Advanced Test Reactor Complex, +#' "CFA" is the Central Facilites Area, #' "INTEC" is the Idaho Nuclear Technology and Engineering Center, #' "MFC" is the Materials and Fuels Complex, -#' "NRF" is the Nuclear Reactors Facility, and +#' "NRF" is the Nuclear Reactors Facility, +#' "RWMC" is the Radoiactive WAste Management Complex, and #' "TAN" is the Test Area North facility.} +#' \item{`min_dt`}{Approximate year when the percolation pond was activated, +#' with missing values indicating that the information is not available.} +#' \item{`max_dt`}{Approximate year when the percolation pond was decommissioned, +#' with missing values indicating that the pond is still in operation.} #' \item{`geometry`}{Polygon geometry with a positive area (two-dimensional); #' sequence of points that form a closed, non-self-intersecting ring; the first ring denotes the exterior ring, #' zero or more subsequent rings denote holes in this exterior ring.} #' } #' #' @source U.S. Geological Survey -#' [Idaho National Laboratory Project Office](https://www.usgs.gov/centers/idaho-water-science-center/science/idaho-national-laboratory-project-office) +#' [Idaho National Laboratory Project Office](https://www.usgs.gov/centers/idaho-water-science-center/science/idaho-national-laboratory-project-office). +#' Polygons representing percolation ponds were digitized from historical Google Earth imagery, +#' dating as far back as 1985. #' #' @keywords datasets #' diff --git a/R/read_rdb.R b/R/read_rdb.R new file mode 100644 index 0000000000000000000000000000000000000000..d9030d36c2dd9617c243e2d4bf480db9e5e72e79 --- /dev/null +++ b/R/read_rdb.R @@ -0,0 +1,108 @@ +#' Read USGS RDB file +#' +#' @description Reads a RDB (Relational Database) file in table format and creates a data frame from it. +#' The USGS (U.S. Geological Survey) RDB file is a variant of a tab-delimited ASCII file structure. +#' +#' @param file 'character' string. +#' Path to file which the data are to be read from. +#' @param na_strings 'character' vector. +#' Strings which are interpreted as `NA` values. +#' +#' @return A data frame containing a representation of the data in the file. +#' +#' @author J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center +#' +#' @export +#' +#' @keywords internal +#' +#' @examples +#' file <- system.file("extdata", "test.rdb", package = "inldata") +#' d <- read_rdb(file) +#' str(d) + +read_rdb <- function(file, na_strings = "") { + + # check arguments + file <- path.expand(file) |> + normalizePath(winslash = "/", mustWork = FALSE) + checkmate::assert_file_exists(file, access = "r", extension = "rdb") + checkmate::assert_character(na_strings, any.missing = FALSE) + + # read text lines in file + x <- readLines(file, + n = 500L # maximal possible lines in any header section + ) + + # get the number of lines in the file's header section + i <- 0L + repeat { + is <- x[i + 1] |> + substr(start = 1, stop = 1) |> + identical("#") + if (is) { + i <- i + 1L + } else { + break + } + } + + # get header section + if (i > 0) { + hdr_sect <- gsub("^#", "", x[1:i]) |> + trimws() + } else { + hdr_sect <- NULL + } + + # get column names + col_names <- x[i + 1] |> + strsplit(split = "\t") |> + unlist() + + # get column definitions + col_defs <- x[i + 2] |> + strsplit(split = "\t") |> + unlist() + names(col_defs) <- col_names + + # read data section + d <- utils::read.table(file, + header = TRUE, + sep = "\t", + quote = "", + row.names = NULL, + col.names = col_names, + na.strings = na_strings, + colClasses = "character", + skip = i + 1L, + check.names = FALSE, + fill = TRUE, + strip.white = TRUE + ) + + # get column descriptions + col_desc <- vapply(col_names, + FUN = function(x) { + pattern <- sprintf("^%s ", x) + text <- grep(pattern, hdr_sect, value = TRUE) + if (length(text) > 0) { + sub(pattern, "", text) |> + trimws() + } else { + NA_character_ + } + }, + FUN.VALUE = character(1) + ) + if (all(is.na(col_desc))) { + col_desc <- NULL + } + + # set attribute + structure(d, + "header_section" = paste(hdr_sect, collapse = "\n"), + "column_definitions" = col_defs, + "column_descriptions" = col_desc + ) +} diff --git a/R/samples.R b/R/samples.R index 0348b9c1fc34319fcbb2ccc4225148b5b833db2c..28875afe08d9e343f3a23bd336ff900b9e6669a0 100644 --- a/R/samples.R +++ b/R/samples.R @@ -14,10 +14,10 @@ #' \item{`sample_dt`}{Date and time the sample was collected, in "America/Denver" time zone. #' Missing values of time were substituted with "12:00".} #' \item{`parm_short_nm`}{Parameter short name assigned by the USGS, such as "pH".} -#' \item{`parm_unit`}{Parameter units of measure, see [`units`] dataset for unit descriptions.} +#' \item{`unit_cd`}{Units of measurement, see [`units`] dataset for unit descriptions.} #' \item{`remark_cd`}{Remark code (result level) used to qualify the parameter value. #' The codes and their meanings are as follows: -#' "" is a quantified value; +#' [NA] (missing value) is a quantified value; #' "<" is where the actual value is known to be less than the value reported, #' that is, the measured concentration is below the reporting limit (RL) #' and represented as a censored (or nondetection) value. diff --git a/R/units.R b/R/units.R index 997e5c97b99e926efbdf172e8f8a563447a13c0c..2c3eed5e691b4bbba6dcabc8f9177e985283000d 100644 --- a/R/units.R +++ b/R/units.R @@ -1,12 +1,12 @@ -#' Parameter Units +#' Units of Measurement #' -#' @description Information describing the parameter units of measure. +#' @description Descriptive information about the measurement units. #' #' @format A data frame with columns: #' \describe{ -#' \item{`parm_unit`}{Parameter units abbreviation.} -#' \item{`desc`}{Parameter units description.} -#' \item{`siunitx`}{Parameter units formatted for LaTeX using the +#' \item{`unit_cd`}{Measurment abbreviation for units.} +#' \item{`unit_ds`}{Description for units of measurement.} +#' \item{`siunitx`}{Units formatted for LaTeX using the #' [siunitx](https://ctan.org/pkg/siunitx) package notation.} #' } #' diff --git a/R/utils.R b/R/utils.R index d96f6e769c1596a15d9d8ad0730367d82a1a83a0..219c07594bdfa945574c7c804dfc8f5359ebaa02 100644 --- a/R/utils.R +++ b/R/utils.R @@ -94,9 +94,9 @@ trim_station_nm <- function(x) { #' @keywords internal #' #' @examples -#' round_usgs(x = rep(pi, 3), digits = c(1, 2, 3)) +#' round_numbers(x = rep(pi, 3), digits = c(1, 2, 3)) -round_usgs <- function(x, digits = 0) { +round_numbers <- function(x, digits = 0) { checkmate::assert_numeric(x) checkmate::assert_integerish(digits, max.len = length(x)) z <- abs(x) * 10^digits + 0.5 + sqrt(.Machine$double.eps) @@ -132,7 +132,7 @@ round_usgs <- function(x, digits = 0) { paste_strings <- function(..., collapse = " ", recycle0 = FALSE) { check_package(pkg = "stringi", msg = "Concatenating character vectors") checkmate::assert_string(collapse) - checkmate::assert_logical(recycle0) + checkmate::assert_flag(recycle0) dots <- list(...) |> lapply(FUN = as.character) lens <- lengths(dots) if (recycle0 && 0L %in% lens) { @@ -236,3 +236,210 @@ get_file_size <- function(paths) { FUN.VALUE = character(1) ) } + + +#' Test Location is Package Directory +#' +#' @description Test whether the working directory is located at the top level directory of the package. +#' +#' @param pkg 'character' string. +#' Package name. +#' +#' @return Formatted file size(s). +#' +#' @author J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center +#' +#' @export +#' +#' @keywords internal +#' +#' @examples +#' test_pkg_dir("inldata") + +test_pkg_dir <- function(pkg) { + checkmate::assert_string(pkg) + if (checkmate::test_file_exists("DESCRIPTION", access = "rw")) { + package <- read.dcf("DESCRIPTION", fields = "Package") |> as.character() + if (identical(package, pkg)) { + if (checkmate::test_directory_exists("inst", access = "rw")) { + return(TRUE) + } + } + } + FALSE +} + + +#' Date-Time Conversion +#' +#' @description Convert calendar date and times. +#' +#' @param dt 'character' vector. +#' Calendar date formatted as YYYY-MM-DD. +#' @param tm 'character' vector. +#' Time in Greenwich Mean Time (UTC) formatted as HH:MM. +#' Vector length equal to the length of `dt`. +#' @param tm_unset 'character' string. +#' Value if time is missing, noon by default. +#' @param tz 'character' string. +#' Time zone specification to convert to. +#' +#' @return Returns an object of class 'POSIXct'. +#' +#' @author J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center +#' +#' @export +#' +#' @keywords internal +#' +#' @examples +#' as_posix_ct( +#' dt = c("2024-01-01", "2024-02-15", NA), +#' tm = c("14:30", NA, "11:11"), +#' tz = "America/Denver" +#' ) + +as_posix_ct <- function(dt, tm, tm_unset = "12:00", tz = "") { + checkmate::assert_character(dt, min.len = 1) + checkmate::assert_character(tm, len = length(dt)) + checkmate::assert_string(tm_unset, n.chars = 5) + time <- tm + is <- is.na(time) + time[is] <- tm_unset + paste(dt, time) |> + as.POSIXct(tz = "GMT", format = "%Y-%m-%d %H:%M") |> + format(tz = tz) |> + as.POSIXct(tz = tz) +} + + +#' Extract Archive Contents +#' +#' @description Extract contents of an archive to a directory. +#' Requires that the \pkg{archive} package is available. +#' +#' @param file 'character' string. +#' File path to the archive. +#' @param destdir 'character' string. +#' Destination directory to extract files to. +#' It will be created if necessary. +#' Defaults to the temporary directory. +#' +#' @return Invisibly returns the extracted path(s). +#' +#' @author J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center +#' +#' @export +#' +#' @keywords internal +#' +#' @examples +#' files <- system.file("extdata", "test.zip", package = "inldata") |> +#' extract_archive() +#' +#' unlink(files) + +extract_archive <- function(file, destdir = tempdir()) { + + # check arguments + file <- path.expand(file) |> + normalizePath(winslash = "/", mustWork = FALSE) + checkmate::assert_file_exists(file, access = "r") + destdir <- path.expand(destdir) |> + normalizePath(winslash = "/", mustWork = FALSE) + dir.create(destdir, showWarnings = FALSE, recursive = TRUE) + checkmate::assert_directory_exists(destdir, access = "rw") + + # check packages + check_package(pkg = "archive", msg = "Extracting contents of an archive") + + # extract contents + files <- archive::archive_extract(archive = file, dir = destdir) + + # get paths + paths <- file.path(destdir, files, fsep = "/") + + invisible(paths) +} + + +#' Write Lines to a File +#' +#' @description Write text lines to a file. +#' +#' @param text 'character' vector. +#' Text to write to file. +#' @param path 'character' string. +#' Path to the file. +#' @param gz 'logical' flag. +#' Whether to compress the file using Gzip. +#' The `.gz` extension is added to the file `path`. +#' +#' @return Invisibly returns the extracted path(s). +#' +#' @author J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center +#' +#' @export +#' +#' @keywords internal +#' +#' @examples +#' path <- write_lines( +#' text = "Test", +#' path = tempfile(fileext = ".txt"), +#' gz = TRUE +#' ) +#' +#' unlink(path) + +write_lines <- function(text, path, gz = FALSE) { + checkmate::assert_character(text) + checkmate::assert_path_for_output(path, overwrite = TRUE) + checkmate::assert_flag(gz) + if (gz) { + path <- paste0(path, ".gz") + con <- gzfile(path, open = "w", encoding = "UTF-8") + on.exit(close(con)) + writeLines(text, con = con, useBytes = TRUE) + } else { + writeLines(text, con = path, useBytes = TRUE) + } + invisible(path) +} + + +#' Extract File Extension +#' +#' @description Extract the extension of a file. +#' +#' @param x 'character' vector. +#' File path(s). +#' @param compression 'logical' flag. +#' Whether to account for the compression extension '.gz', '.bz2' or '.xz'. +#' +#' @return Returns the file (name) extensions (excluding the leading dot). +#' +#' @author J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center +#' +#' @export +#' +#' @keywords internal +#' +#' @examples +#' c("dir/file.txt", "file.txt.gz") |> +#' get_file_ext() + +get_file_ext <- function(x, compression = TRUE) { + checkmate::assert_character(x, any.missing = FALSE, min.len = 1) + checkmate::assert_flag(compression) + base_names <- basename(x) + patterns <- sprintf("^%s.", + tools::file_path_sans_ext(base_names, compression = compression) + ) + vapply(seq_along(x), + FUN = function(i) { + sub(pattern = patterns[i], replacement = "", x = base_names[i]) + }, + FUN.VALUE = character(1) + ) +} diff --git a/R/write_datasets.R b/R/write_datasets.R index cf2166fbc53444be9cdb6b9139113f9e9b495fdc..0a99a408f906ea9aa83b2502bbee65292097c235 100644 --- a/R/write_datasets.R +++ b/R/write_datasets.R @@ -18,9 +18,12 @@ #' @param formats 'character' vector. #' Formats for saving datasets. #' Choose from one or more of the following formats: -#' `csv`, `geojson`, `json`, `parquet`, `shp`, `tiff`, `txt`, and `xlsx`. -#' Please refer to the *details* section for a description of each format. +#' `txt`, `json`, `csv`, `xlsx`, `parquet`, `geojson`, `shp`, and `tiff`. +#' Please refer to the *Details* section for a description of each format. #' All file formats are saved to the disk by default. +#' @param gzip 'character' vector. +#' File `formats` that are eligible for Gzip compression. +#' At present, it accommodates `txt`, `json`, and `geojson` formats exclusively. #' @param overwrite 'logical' flag. #' Whether to overwrite an existing file. #' @param include 'character' vector. @@ -33,6 +36,8 @@ #' Whether to add indentation, whitespace, and newlines to JSON output (default is `TRUE`). #' See [`prettify`][jsonlite::prettify] function for details. #' The tradeoff for human-readable output is a much larger file size. +#' @param full_names 'logical' flag. +#' Whether the full paths of the files are returned (default). #' @param quiet 'logical' flag. #' Whether to suppress printing of debugging information. #' @@ -67,10 +72,12 @@ write_datasets <- function(package, destdir = getwd(), formats = NULL, + gzip = NULL, overwrite = TRUE, include = NULL, exclude = NULL, pretty = TRUE, + full_names = TRUE, quiet = FALSE) { # check arguments @@ -82,12 +89,22 @@ write_datasets <- function(package, unique = TRUE, null.ok = TRUE ) - choices <- c("csv", "geojson", "json", "parquet", "shp", "tiff", "txt", "xlsx") + choices <- c( + "csv", + "geojson", + "json", + "parquet", + "shp", + "tiff", + "txt", + "xlsx" + ) if (is.null(formats)) { formats <- choices } checkmate::assert_subset(formats, choices = choices) - checkmate::assert_logical(overwrite) + checkmate::assert_subset(gzip, choices = c("json", "geojson")) + checkmate::assert_flag(overwrite) checkmate::assert_character(include, any.missing = FALSE, unique = TRUE, @@ -100,8 +117,9 @@ write_datasets <- function(package, min.len = 1, null.ok = TRUE ) - checkmate::assert_logical(pretty) - checkmate::assert_logical(quiet) + checkmate::assert_flag(pretty) + checkmate::assert_flag(full_names) + checkmate::assert_flag(quiet) # check packages pkgs <- c( @@ -118,11 +136,17 @@ write_datasets <- function(package, normalizePath(winslash = "/", mustWork = FALSE) dir.create(destdir, showWarnings = FALSE, recursive = TRUE) + # check if working in package directory + is_pkg_dir <- test_pkg_dir(package) + # get package dataset names - ds_names <- utils::data( - package = package, - verbose = !quiet - )$results[, "Item"] + if (is_pkg_dir) { + ds_paths <- list.files("data", pattern = "*.rda", full.names = TRUE) + ds_names <- basename(ds_paths) |> tools::file_path_sans_ext() + names(ds_paths) <- ds_names + } else { + ds_names <- utils::data(package = package, verbose = !quiet)$results[, "Item"] + } # include datasets if (!is.null(include)) { @@ -153,15 +177,23 @@ write_datasets <- function(package, message() } - # save dataset to a temporary environment + # get dataset envir <- new.env() - nm <- utils::data( - list = name, - package = package, - verbose = !quiet, - envir = envir - )[1] - ds <- envir[[nm]] + if (is_pkg_dir) { + nm <- load( + file = ds_paths[name], + envir = envir, + verbose = !quiet + ) + } else { + nm <- utils::data( + list = name, + package = package, + envir = envir, + verbose = !quiet + ) + } + ds <- envir[[nm[1]]] # simple feature class if (inherits(ds, c("sf", "sfc"))) { @@ -192,9 +224,14 @@ write_datasets <- function(package, quiet = quiet, delete_dsn = checkmate::test_file_exists(path, access = "rw") ) - txt <- readLines(con = path, encoding = "UTF-8") - txt <- if (pretty) jsonlite::prettify(txt, indent = 2) else jsonlite::minify(txt) - writeLines(text = txt, con = path, useBytes = TRUE) + text <- readLines(con = path, encoding = "UTF-8") + if (pretty) { + text <- jsonlite::prettify(text, indent = 2) + } else { + text <- jsonlite::minify(text) + } + path <- write_lines(text, path, gz = "geojson" %in% gzip) + paths <- c(paths, path) } # write compressed SHP files @@ -212,6 +249,7 @@ write_datasets <- function(package, checkmate::assert_path_for_output(path, overwrite = overwrite) utils::zip(path, files = files, extras = "-j") unlink(files) + paths <- c(paths, path) } # spatial raster class @@ -223,6 +261,7 @@ write_datasets <- function(package, checkmate::assert_path_for_output(path, overwrite = overwrite) terra::unwrap(ds) |> terra::writeRaster(filename = path, overwrite = TRUE, verbose = !quiet) + paths <- c(paths, path) } # data frame class @@ -237,16 +276,23 @@ write_datasets <- function(package, sep = ",", row.names = FALSE, qmethod = "double", - fileEncoding = "UTF-16LE" + fileEncoding = "UTF-8" ) + paths <- c(paths, path) } # write JSON file if ("json" %in% formats) { path <- sprintf("%s/%s.json", destdir, name) checkmate::assert_path_for_output(path, overwrite = overwrite) - jsonlite::toJSON(ds, null = "null", na = "null", digits = 8, pretty = pretty) |> - writeLines(con = path, useBytes = TRUE) + text <- jsonlite::toJSON(ds, + null = "null", + na = "null", + digits = 8, + pretty = pretty + ) + path <- write_lines(text, path, gz = "json" %in% gzip) + paths <- c(paths, path) } # write Parquet file @@ -254,6 +300,7 @@ write_datasets <- function(package, path <- sprintf("%s/%s.parquet", destdir, name) checkmate::assert_path_for_output(path, overwrite = overwrite) arrow::write_parquet(ds, sink = path, compression = "snappy") + paths <- c(paths, path) } # write XLSX file @@ -261,6 +308,7 @@ write_datasets <- function(package, path <- sprintf("%s/%s.xlsx", destdir, name) checkmate::assert_path_for_output(path, overwrite = overwrite) writexl::write_xlsx(ds, path = path) + paths <- c(paths, path) } # coordinate reference system class @@ -270,17 +318,23 @@ write_datasets <- function(package, if ("txt" %in% formats) { path <- sprintf("%s/%s.txt", destdir, name) checkmate::assert_path_for_output(path, overwrite = overwrite) - writeLines(ds$wkt, con = path) + path <- write_lines(ds$wkt, path, gz = "txt" %in% gzip) + paths <- c(paths, path) } # other classes } else { - sprintf("Class '%s' for dataset '%s' is not accounted for.", class(ds), name) |> + sprintf("Class '%s' for dataset '%s' is not accounted for.", + class(ds), name + ) |> stop(call. = FALSE) } + } - # append path - paths <- c(paths, path) + # express as relative path + if (!full_names) { + paths <- sprintf("^%s/", getwd()) |> + sub(replacement = "", x = paths) } # return output paths diff --git a/README.Rmd b/README.Rmd index d096812d1159d3f6597ea719f354e5b516a689e2..f76c444dcdd0f1b9399dc81b17b5aae718dc9cb0 100644 --- a/README.Rmd +++ b/README.Rmd @@ -1,8 +1,7 @@ --- output: md_document: - variant: markdown_github - md_extensions: -autolink_bare_uris+hard_line_breaks + variant: gfm --- # inldata <img src="man/figures/logo.svg" alt="inldata" align="right" width="152px" /> @@ -13,10 +12,12 @@ output: ## Description -```{r, include=FALSE} -ran_swm <- range(inldata::swm$stage_dt) |> format(format = "%Y") -ran_gwl <- range(inldata::gwl$lev_dt) |> format(format = "%Y") -ran_samples <- range(inldata::samples$sample_dt) |> format(format = "%Y") +```{r "description", include=FALSE} +files <- sprintf("data/%s.rda", c("swm", "gwl", "samples")) +for (file in files) load(file) +ran_swm <- swm$stage_dt |> range() |> format(format = "%Y") +ran_gwl <- gwl$lev_dt |> range() |> format(format = "%Y") +ran_samples <- samples$sample_dt |> range() |> format(format = "%Y") ``` The **inldata** package is a practical resource that consolidates datasets for the groundwater and surface-water monitoring networks of the U.S. Geological Survey - Idaho National Laboratory (USGS-INL). Managed by the [USGS-INL Project Office] in collaboration with the U.S. Department of Energy, it provides data from the Idaho National Laboratory and surrounding areas. This data is crucial in understanding the effects of waste disposal on the eastern Snake River Plain aquifer in southeastern Idaho and assessing the long-term availability of water. @@ -74,7 +75,7 @@ Jason C. Fisher (<jfisher@usgs.gov>) To cite **inldata** in publications, please use: -```{r "citation", echo=FALSE, results="asis"} +```{r "citations", echo=FALSE, results="asis"} utils::readCitationFile("inst/CITATION") |> print(style = "textVersion") ``` @@ -82,7 +83,7 @@ utils::readCitationFile("inst/CITATION") |> print(style = "textVersion") We value your contributions and suggestions on how to make these materials more useful to the community. Please feel free to share your thoughts by commenting on the [issue tracker] or opening a [merge request] to contribute. -```{r, echo=FALSE, results="asis"} +```{r "contributing", echo=FALSE, results="asis"} files <- c("CODE_OF_CONDUCT.md", "DISCLAIMER.md", "LICENSE.md") for (f in files) { txt <- readLines(f, encoding = "UTF-8") diff --git a/README.md b/README.md index 3d4898b944bd2e7cf02c3d57eefac253706d5b87..dca37725a2a3bc7f4a9563ab0d60fc99c2165ba6 100644 --- a/README.md +++ b/README.md @@ -76,12 +76,12 @@ help(package = "inldata") ## Authors -- Jason C. Fisher (ORCID iD - [0000-0001-9032-8912](https://orcid.org/0000-0001-9032-8912)) -- Allison R. Trcka (ORCID iD - [0000-0001-8498-4737](https://orcid.org/0000-0001-8498-4737)) -- Kerri C. Treinen (ORCID iD - [0000-0003-0645-6810](https://orcid.org/0000-0003-0645-6810)) +- Jason C. Fisher (ORCID iD + [0000-0001-9032-8912](https://orcid.org/0000-0001-9032-8912)) +- Allison R. Trcka (ORCID iD + [0000-0001-8498-4737](https://orcid.org/0000-0001-8498-4737)) +- Kerri C. Treinen (ORCID iD + [0000-0003-0645-6810](https://orcid.org/0000-0003-0645-6810)) ## Point of Contact diff --git a/data-raw/README.md b/data-raw/README.md index 2e9bb86359947e624570940710a58d2b09159212..23e0d42125bc0035aca24b3c60b7b99e7ed67068 100644 --- a/data-raw/README.md +++ b/data-raw/README.md @@ -7,6 +7,7 @@ The folder contains an [R script](make-datasets.R) that builds datasets in the i ```plaintext . +-- misc (miscellaneous data) +| +-- alpha-codes.tsv (alpha codes) | +-- background.tsv (background concentrations) | +-- benchmarks.csv (benchmark concentrations, see https://water.usgs.gov/water-resources/hbsl/) | +-- counting-error.tsv (radioactivity counting error) @@ -17,7 +18,6 @@ The folder contains an [R script](make-datasets.R) that builds datasets in the i | +-- nrfiwd.geojson (industrial waste ditch) | +-- percpond.geojson (percolation ponds) | +-- projection.txt (coordinate reference system) -| +-- translate-codes.tsv (translate between alpha and NWIS parameter codes) +-- qwdata (water-quality system) | +-- alphacodes.txt (alpha parameter codes) | +-- commands.txt (qwdata menu commands) @@ -28,6 +28,7 @@ The folder contains an [R script](make-datasets.R) that builds datasets in the i | +-- siteids.txt (site numbers) +-- README.md +-- detection-limites.tsv (laboratory detection limits) ++-- make-data-release.R (script for creating a data release) +-- make-datasets.R (script for building datasets) +-- make-erd.R (script for creating an entity relationship diagram) +-- output.log (script output log) diff --git a/data-raw/make-data-release.R b/data-raw/make-data-release.R new file mode 100644 index 0000000000000000000000000000000000000000..0d0353c6c83ba53164c7e0b51479084a0f1fb24e --- /dev/null +++ b/data-raw/make-data-release.R @@ -0,0 +1,34 @@ +# !/usr/bin/env Rscript + +# Script requirements: +# - Working directory is the package path + +# source package functions +list.files("R", full.names = TRUE) |> + lapply(FUN = source) |> + invisible() + +# source package datasets +files <- list.files("data", pattern = "*.rda", full.names = TRUE) +for (file in files) load(file) + +# set destination directory +destdir <- "data-release" + +# delete existing data release +list.files(path = destdir, full.names = TRUE, recursive = TRUE) |> + unlink() + +# make data release +make_data_release( + metadata = "inst/extdata/metadata.json", + package = "inldata", + destdir = destdir, + bounding = dem, + rngdates = c( + samples$sample_dt, + gwl$lev_dt, + swm$stage_dt + ), + validate = TRUE +) diff --git a/data-raw/make-datasets.R b/data-raw/make-datasets.R index 03249b9caf0ff2cbd3183508cad0cc933c00f197..6e415d5864933a6c2c60473616f998cdc4b3de89 100644 --- a/data-raw/make-datasets.R +++ b/data-raw/make-datasets.R @@ -2,7 +2,6 @@ # Script requirements: # - Working directory is the package path -# - 7-Zip is on your path # source package functions list.files("R", full.names = TRUE) |> @@ -10,4 +9,4 @@ list.files("R", full.names = TRUE) |> invisible() # make datasets -make_datasets(clean = TRUE) +make_datasets(clean = TRUE, quiet = TRUE) diff --git a/data-raw/misc/translate-codes.tsv b/data-raw/misc/alpha-codes.tsv similarity index 99% rename from data-raw/misc/translate-codes.tsv rename to data-raw/misc/alpha-codes.tsv index 84502e140392f1d6335213efa12a16ca6638bbfa..412c5a9ecd2397a46786a75513cf3c43bda26268 100644 --- a/data-raw/misc/translate-codes.tsv +++ b/data-raw/misc/alpha-codes.tsv @@ -108,5 +108,5 @@ RMDAT result_md result modification date RMUSR result_mn result modification user id RNDCD result_rd rounding code RPLEV rpt_lev_va reporting level -UNITS parm_unit reporting units +UNITS unit_cd reporting units VALUE result_va parameter value diff --git a/data-raw/misc/background.tsv b/data-raw/misc/background.tsv index 4672d270d9254786b4e09c357ad20cbd54c562f2..beb5f89a55303e39ee18a207003eb7ca66c1771c 100644 --- a/data-raw/misc/background.tsv +++ b/data-raw/misc/background.tsv @@ -1,4 +1,4 @@ -srsname pcode parm_unit bkgrd_min bkgrd_max reference +srsname pcode unit_cd bkgrd_min bkgrd_max reference Sodium 00930 mg/L 8.3 14.8 Bartholomay and Hall (2016) Chloride 00940 mg/L 11.8 14.2 Bartholomay and Hall (2016) Sulfate 00945 mg/L 20.2 21.4 Bartholomay and Hall (2016) diff --git a/data-raw/misc/benchmarks-extras.tsv b/data-raw/misc/benchmarks-extras.tsv index a4cfe1b0fe41dac31103699bb6c5a70c538873fc..db37f206c6a24cecca9b43d856303e131aafde9e 100644 --- a/data-raw/misc/benchmarks-extras.tsv +++ b/data-raw/misc/benchmarks-extras.tsv @@ -1,4 +1,4 @@ -srsname pcode mcl parm_unit +srsname pcode mcl unit_cd TTHM4 90867 80 ug/L Tritium 07000 20000 pCi/L Strontium-90 13501 8 pCi/L diff --git a/data-raw/misc/detection-limits.tsv b/data-raw/misc/detection-limits.tsv index 078ae97055fc94d18adae83e83e9aa4558619d29..11d28d013b4477ebcc247807a8f69cf63ab8f133 100644 --- a/data-raw/misc/detection-limits.tsv +++ b/data-raw/misc/detection-limits.tsv @@ -3,12 +3,12 @@ # # 'srsname' is the analyte name # 'pcode' is the parameter code -# 'parm_unit' is units for radiochemical parameters in pCi/L +# 'unit_cd' is units for radiochemical parameters in pCi/L # 'lab_det_lim_va' is the detection limit in pCi/L -# 'sdate' is the start date the detection limit is effective +# 'min_dt' is the start date the detection limit is effective # 'reference' identifies the publication source -srsname pcode parm_unit lab_det_lim_va sdate reference +srsname pcode unit_cd lab_det_lim_va min_dt reference Tritium 07000 pCi/L 500 1949-01-16 Bartholomay and others (2003, table 9) Tritium 07000 pCi/L 200 2003-04-01 Bartholomay and others (2014, table D1) Strontium-90 13501 pCi/L 5 1949-01-16 Bodnar and Percival (1982) diff --git a/data-raw/misc/nrfiwd.geojson b/data-raw/misc/nrfiwd.geojson index 9f751a2c181df492def77e3bccbe0d38d111dcb0..9bd5e75e3f06604eda801137d184da103bcaca35 100644 --- a/data-raw/misc/nrfiwd.geojson +++ b/data-raw/misc/nrfiwd.geojson @@ -1,8 +1 @@ -{ -"type": "FeatureCollection", -"name": "nrfiwd", -"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, -"features": [ -{ "type": "Feature", "properties": { "Name": "Industrial Waste Ditch" }, "geometry": { "type": "LineString", "coordinates": [ [ -112.920757932656386, 43.651724343956779 ], [ -112.920554965326389, 43.651869592164147 ], [ -112.920277586650712, 43.652091140200156 ], [ -112.920064884911284, 43.652214435309276 ], [ -112.919930862717678, 43.652366359805377 ], [ -112.919171144062275, 43.653372574526827 ], [ -112.918942588885457, 43.653572436850034 ], [ -112.918731548984567, 43.653819935809224 ], [ -112.918660150517951, 43.654033777143951 ], [ -112.918676839947494, 43.654501272815551 ], [ -112.918685937984833, 43.654760281301343 ], [ -112.918589531383603, 43.655032245030739 ], [ -112.918477573765159, 43.655160180608142 ], [ -112.918304277320857, 43.655240066720417 ], [ -112.917753662963804, 43.655379118144239 ], [ -112.917438764669299, 43.655385749799407 ], [ -112.917238994887185, 43.655250732718734 ], [ -112.917083336915212, 43.655096316326556 ], [ -112.916853514682359, 43.655063003136092 ], [ -112.916415104647712, 43.65512554896825 ], [ -112.915948247325446, 43.655151420326987 ], [ -112.915471985919979, 43.655146574463494 ], [ -112.915103202776194, 43.655218996318474 ], [ -112.914656707791266, 43.65550441291105 ], [ -112.914214666685169, 43.655902758707988 ], [ -112.913842481831693, 43.656332244676385 ], [ -112.913432849832134, 43.656740212904161 ], [ -112.912879495828776, 43.657233337745055 ], [ -112.912376071471769, 43.657599397361665 ], [ -112.912082991202482, 43.657752333942284 ], [ -112.911610604189391, 43.657775973624496 ], [ -112.911423115758183, 43.657930742446794 ], [ -112.911295909462581, 43.658063993161853 ], [ -112.911160165146441, 43.658292486434412 ], [ -112.911082460321239, 43.658668470492103 ], [ -112.911096297129845, 43.658895479372148 ], [ -112.91119043669444, 43.659121864667661 ], [ -112.911318935887437, 43.659539841847568 ], [ -112.911425479750335, 43.659898594942504 ], [ -112.911509574254737, 43.660033228067512 ], [ -112.911535047517731, 43.660343760409042 ], [ -112.911654256504576, 43.660442149574052 ], [ -112.911855580541754, 43.660594322356722 ], [ -112.911893273810776, 43.660660644825114 ], [ -112.911784552555446, 43.660711995856055 ], [ -112.911581305852806, 43.660797563683374 ], [ -112.911478818806486, 43.660892352903254 ], [ -112.911167890314189, 43.661391828291279 ], [ -112.911133032243512, 43.661539247162885 ], [ -112.911192724447588, 43.66163644766381 ], [ -112.911397244100272, 43.661758905927584 ], [ -112.911620666636253, 43.661876806428474 ], [ -112.91176839160542, 43.662074657661769 ], [ -112.911815329920529, 43.662280432180339 ], [ -112.911714293443055, 43.662458661064662 ], [ -112.911509306780928, 43.662653040166688 ], [ -112.911302882075518, 43.662753463917021 ], [ -112.911159395200755, 43.662885939819574 ], [ -112.911174899650661, 43.663050542546237 ], [ -112.911283240659657, 43.663261393960752 ], [ -112.911245244236738, 43.663400809467078 ], [ -112.910990573915328, 43.663540666589284 ], [ -112.910795091887323, 43.663692608703897 ], [ -112.910630919712901, 43.663967941710588 ], [ -112.910282837150518, 43.664375641493905 ], [ -112.910078360645585, 43.664572456779304 ], [ -112.909815628976602, 43.664762748952874 ], [ -112.909532478587124, 43.664881930386329 ], [ -112.909143275616628, 43.665050556753314 ], [ -112.908864307809964, 43.66521378309394 ], [ -112.908859877503829, 43.665332193419104 ], [ -112.908982590765916, 43.665407728264086 ], [ -112.909215490944334, 43.665511925021647 ], [ -112.909399536458764, 43.665642371506863 ], [ -112.909485784330158, 43.665883610648677 ], [ -112.909505991011557, 43.666060332953641 ], [ -112.909292837883484, 43.666157166374411 ], [ -112.909085304406631, 43.666216589959426 ], [ -112.908921338809137, 43.666345160610327 ], [ -112.908757346968272, 43.666490647265505 ], [ -112.908432766419395, 43.666612688574055 ], [ -112.908137170440298, 43.66672774184056 ], [ -112.907868027858726, 43.66684357759182 ], [ -112.907445594953572, 43.667071225982525 ], [ -112.90716529039895, 43.667241305024376 ], [ -112.907138751724602, 43.667431781959536 ], [ -112.907216235379067, 43.667735880138146 ], [ -112.907155152137506, 43.6682025517973 ], [ -112.907044133340705, 43.668712235571938 ], [ -112.906851822923812, 43.669173085631606 ], [ -112.906550025099889, 43.669656324996268 ], [ -112.906267945610296, 43.669946033326411 ], [ -112.906028824709949, 43.670121096149522 ], [ -112.905842208737198, 43.670288581652692 ], [ -112.905676654990174, 43.670414174535686 ], [ -112.905540002395924, 43.670520741149389 ], [ -112.90527833123393, 43.670678638973918 ], [ -112.905081176560884, 43.670868974327419 ], [ -112.905058674046629, 43.671136239607975 ], [ -112.905015643610412, 43.671376708125187 ], [ -112.904943080318432, 43.671619533376486 ], [ -112.904900060322774, 43.671852858158175 ], [ -112.905033798493847, 43.672350645806709 ], [ -112.905112067852329, 43.6726531266386 ], [ -112.905102278768013, 43.673036496356893 ], [ -112.904904980911098, 43.673312555468208 ], [ -112.90422851128848, 43.673671558139056 ], [ -112.903952847097443, 43.673704664837217 ], [ -112.903710145308494, 43.673642549410097 ], [ -112.903398785009998, 43.67342797703855 ], [ -112.903031683289882, 43.673191925646037 ], [ -112.902476422801172, 43.673081270386376 ], [ -112.901897796314245, 43.673161910459534 ], [ -112.90156826870215, 43.673228778793685 ], [ -112.901336517655125, 43.673294777837 ], [ -112.901255204712896, 43.673454954586042 ], [ -112.901181840207016, 43.673580392118119 ], [ -112.900919224890828, 43.673658746111002 ], [ -112.900557992004082, 43.673848931789017 ], [ -112.900386115278408, 43.674067127333721 ], [ -112.900465317082777, 43.674337003241398 ], [ -112.900684948671042, 43.67446101749411 ], [ -112.901042603362498, 43.674454182925025 ], [ -112.901357875436375, 43.67450322257168 ], [ -112.901728413344884, 43.674421435345032 ], [ -112.901996497336867, 43.67460255543542 ], [ -112.902338229349326, 43.674714847258848 ], [ -112.902630390308232, 43.674740186680303 ], [ -112.902945366902401, 43.674636782054655 ], [ -112.903089622379198, 43.674708340869721 ], [ -112.903197682573833, 43.674844162122092 ], [ -112.903157999594313, 43.675037008103558 ], [ -112.903082078323251, 43.675320310118657 ], [ -112.902979914464566, 43.675598827424892 ], [ -112.902749985819369, 43.675751031303157 ], [ -112.902529991842897, 43.675846093692009 ], [ -112.901998405952824, 43.675864690573896 ], [ -112.901765355238481, 43.675916878238361 ], [ -112.901499569670349, 43.675921412766279 ], [ -112.901118887218985, 43.675959184880654 ], [ -112.900977935714323, 43.67587333908336 ], [ -112.900965107571125, 43.675692354684202 ], [ -112.901047562593618, 43.675432871991518 ], [ -112.901046439197543, 43.675117120176637 ], [ -112.900794063295407, 43.674950216205964 ], [ -112.90026913747954, 43.674914042580077 ], [ -112.89984901963858, 43.674992257065227 ], [ -112.899487866530777, 43.675127671173023 ], [ -112.899300415449687, 43.675382298175251 ], [ -112.898948966912073, 43.675598680857092 ], [ -112.89863677840637, 43.675881771542969 ], [ -112.898560958821932, 43.676091252579454 ], [ -112.898662436876648, 43.676234215950728 ], [ -112.899298617355726, 43.676460992866446 ], [ -112.899724786849958, 43.67669710775818 ], [ -112.89989509616683, 43.676887754728746 ], [ -112.899878266795966, 43.677143007642385 ], [ -112.899677828317166, 43.677311899674464 ], [ -112.899460938662685, 43.677506970438543 ], [ -112.899634281492254, 43.677847637762085 ], [ -112.899755038052277, 43.678240645864904 ] ] } } -] -} +{"type":"FeatureCollection","features":[{"type":"Feature","id":1,"geometry":{"type":"LineString","coordinates":[[-112.91994894399994,43.651865001000033],[-112.91974597299998,43.652010248000067],[-112.91946859199999,43.652231794000045],[-112.91927300099997,43.652367841000057],[-112.91906803999996,43.652607236000051],[-112.91845643599999,43.653412036000077],[-112.91810672699995,43.653757526000049],[-112.91795262399995,43.653998686000079],[-112.91788122299994,43.654212526000038],[-112.91791752499995,43.654642386000035],[-112.91791475099996,43.654903001000037],[-112.91780274499996,43.655175913000051],[-112.91769025499997,43.655333420000034],[-112.91748499399995,43.655410889000052],[-112.91694843199997,43.655560500000036],[-112.91661228099997,43.655574355000056],[-112.91640442199997,43.655494275000081],[-112.91624692299996,43.65531061300004],[-112.91613602899997,43.655247480000071],[-112.91596644599997,43.655236172000059],[-112.91567668099998,43.65528919500008],[-112.91536137299994,43.65533395600005],[-112.91512870999998,43.655348677000063],[-112.91483307699997,43.655330658000025],[-112.91467864399999,43.655335480000076],[-112.91447770099995,43.655350617000067],[-112.91430045099997,43.655404372000078],[-112.91413240099996,43.655480069000077],[-112.91385438499998,43.655665720000059],[-112.91343859699998,43.65605227900005],[-112.91306157799994,43.656486873000063],[-112.91266131599997,43.656900085000075],[-112.91238652599998,43.657126462000065],[-112.91205032599999,43.657437357000049],[-112.91156642499999,43.657770934000041],[-112.91126630199994,43.657920364000063],[-112.91101654699997,43.657935498000029],[-112.91079394399998,43.657942281000032],[-112.91061402299999,43.658071332000077],[-112.91048681399997,43.658204582000053],[-112.91037237399996,43.658433277000029],[-112.91027335599995,43.658809057000042],[-112.91028718999996,43.659036067000045],[-112.91038132699998,43.659262453000053],[-112.91052402699995,43.659680566000077],[-112.91061635999995,43.660039185000073],[-112.91072535799998,43.660221368000066],[-112.91074713599994,43.660484552000071],[-112.91086793899996,43.660578557000065],[-112.91105725899996,43.660724015000028],[-112.91108414499996,43.660801238000033],[-112.91097636199999,43.66088450500007],[-112.91077325199996,43.660962372000029],[-112.91066940599995,43.66104841300006],[-112.91037984099995,43.661544651000042],[-112.91032388899998,43.66167983400004],[-112.91033056099997,43.661722970000028],[-112.91039570299995,43.66177715200007],[-112.91061728799997,43.661877768000068],[-112.91074228799994,43.661917155000026],[-112.91083282999995,43.66201760000007],[-112.91097587999997,43.662211970000044],[-112.91100909199997,43.662323060000062],[-112.91101296799997,43.662421089000077],[-112.91093115299998,43.662601219000067],[-112.91071227399999,43.662820504000081],[-112.91049525499994,43.662916600000074],[-112.91035023399996,43.663026527000056],[-112.91038695199995,43.663191332000054],[-112.91045399799998,43.663289100000043],[-112.91050886999994,43.663405615000045],[-112.91048832299998,43.663492588000054],[-112.91043117299995,43.663561155000025],[-112.91018140399996,43.66368125300005],[-112.90997244099998,43.663824263000038],[-112.90983227199996,43.664113027000042],[-112.90947481099994,43.664536038000051],[-112.90947071899996,43.664626310000074],[-112.90937024399994,43.664755261000039],[-112.90925296199998,43.66480030200006],[-112.90911484999998,43.664799236000079],[-112.90900179099998,43.664813098000025],[-112.90894020299999,43.66489925500008],[-112.90884086199998,43.66499316200003],[-112.90866799599996,43.665062688000035],[-112.90834419099997,43.665218734000064],[-112.90806063399998,43.665384114000062],[-112.90805067899998,43.665472764000071],[-112.90817959299994,43.665540656000076],[-112.90844447499995,43.665636359000075],[-112.90862660499994,43.665788794000036],[-112.90870993799996,43.666023404000043],[-112.90874563699998,43.666265191000036],[-112.90870703699994,43.666309605000038],[-112.90849060799997,43.666330815000038],[-112.90837577499997,43.666333232000056],[-112.90829210599998,43.666393624000079],[-112.90811942499994,43.666501206000078],[-112.90797084399998,43.66663253400003],[-112.90762354899999,43.66675325600005],[-112.90732795099996,43.666868307000072],[-112.90710245599996,43.667001063000043],[-112.90696967099996,43.666987428000027],[-112.90686078099998,43.666955386000041],[-112.90673778999997,43.66695326100006],[-112.90666612999996,43.666971794000062],[-112.90663096599997,43.667047366000077],[-112.90668559099998,43.667099486000041],[-112.90674929299996,43.667169955000077],[-112.90670485499999,43.667248942000072],[-112.90661774099999,43.667294334000076],[-112.90642835799997,43.667339918000039],[-112.90637964699994,43.667387246000033],[-112.90641956399998,43.667569763000074],[-112.90645909399996,43.667876936000027],[-112.90651233899996,43.668050034000032],[-112.90646197199999,43.668342501000041],[-112.90630143499999,43.668856116000029],[-112.90610541899997,43.669316930000036],[-112.90580263799995,43.669853881000051],[-112.90550171299998,43.670162211000047],[-112.90522889799996,43.67035844000003],[-112.90506121899995,43.670501929000068],[-112.90488012999998,43.670667666000043],[-112.90464771299997,43.67074913700003],[-112.90440117999998,43.670888375000061],[-112.90427189499997,43.671009517000073],[-112.90424938899997,43.671276783000053],[-112.90420635499999,43.671517250000079],[-112.90413378799997,43.671760075000066],[-112.90409076499998,43.67199339900003],[-112.90413559399997,43.672495708000042],[-112.90427686099997,43.672793422000041],[-112.90431110999998,43.672992495000074],[-112.90429296799999,43.673177039000052],[-112.90409566599999,43.67345309600006],[-112.90341918999997,43.673812094000027],[-112.90314352499996,43.673845199000027],[-112.90290082299998,43.673783082000057],[-112.90255182599998,43.673603067000045],[-112.90217026899995,43.673348071000078],[-112.90166710599999,43.673221794000028],[-112.90108847599998,43.673302430000035],[-112.90075894799998,43.673369296000033],[-112.90052719499994,43.673435294000058],[-112.90044587999995,43.673595470000066],[-112.90037251299998,43.673720907000074],[-112.90010989699999,43.673799259000077],[-112.89970055699996,43.673988979000057],[-112.89948013099996,43.674230882000074],[-112.89956998799994,43.674525036000034],[-112.89984117799997,43.674662980000051],[-112.90017011399999,43.674607521000041],[-112.90054853599997,43.674643739000032],[-112.90091907599998,43.674561953000079],[-112.90118715799997,43.674743075000038],[-112.90152888899996,43.674855370000046],[-112.90182105099996,43.674880712000061],[-112.90213602999995,43.674777309000035],[-112.90228028399997,43.674848869000073],[-112.90238834399997,43.674984691000077],[-112.90234865799999,43.675177536000035],[-112.90227273199997,43.675460838000049],[-112.90217056399996,43.675739354000029],[-112.90194063299998,43.675891556000067],[-112.90172063799997,43.675986618000081],[-112.90118904999997,43.676005211000074],[-112.90095599799997,43.676057396000033],[-112.90069021199997,43.67606193000006],[-112.90030952799998,43.676099699000076],[-112.90016857799998,43.67601385200004],[-112.90015575199999,43.675832868000043],[-112.90023821099999,43.675573385000064],[-112.90023709099995,43.675257633000058],[-112.89998471699994,43.675090728000043],[-112.89945978999998,43.675054551000073],[-112.89903967099997,43.675132762000032],[-112.89867851599996,43.675268173000063],[-112.89849105999997,43.675522799000078],[-112.89813960799995,43.675739179000061],[-112.89782741499994,43.676022268000054],[-112.89775159299995,43.676231749000067],[-112.89785306899995,43.67637471200004],[-112.89848924699999,43.676601494000067],[-112.89891541499998,43.676837612000043],[-112.89908572199994,43.677028260000043],[-112.89906888899998,43.677283513000077],[-112.89886844799997,43.677452403000075],[-112.89865155599995,43.677647472000046],[-112.89882489299998,43.677988141000071],[-112.89894564499997,43.678381150000064]]},"properties":{"OBJECTID":1,"Name":"Industrial Waste Ditch","Shape_Length":0.05241165331517194}}]} \ No newline at end of file diff --git a/data-raw/misc/percponds.geojson b/data-raw/misc/percponds.geojson index 3a4b186aeec48f5d23cd2cb5a570a415e99aff38..ec42d05d9ff915bf3d88faa907fc8ce9db38aabd 100644 --- a/data-raw/misc/percponds.geojson +++ b/data-raw/misc/percponds.geojson @@ -1 +1 @@ -{"type":"FeatureCollection","features":[{"type":"Feature","id":1,"geometry":{"type":"Polygon","coordinates":[[[-112.73037923599998,43.859794822000026],[-112.72984968099996,43.85952955600004],[-112.72974316099999,43.85946452500008],[-112.729661481,43.85945332800003],[-112.72948940599997,43.859368964000055],[-112.72937334999995,43.859359651000034],[-112.72930865399996,43.85941055400008],[-112.72918368599994,43.85943502400005],[-112.72862176999996,43.86009256700004],[-112.72847930299997,43.860184608000054],[-112.72798730699998,43.86079730300003],[-112.72793701099994,43.86090029500008],[-112.72796624299997,43.86100088200004],[-112.72802215799999,43.86107952500004],[-112.72863365299997,43.861335643000075],[-112.72875257499999,43.86134499700006],[-112.72900915899999,43.861430632000065],[-112.72914607299998,43.86144424300005],[-112.72921869099997,43.86140542900006],[-112.73034583299994,43.859951928000044],[-112.73037923599998,43.859794822000026]]]},"properties":{"OBJECTID":1,"OBJECTID_1":1,"AREA":16940.9577996,"PERIMETER":523.4658013,"Pond_loc":"TAN","Name":null,"Shape_Leng":523.4655928,"Shape_Length":0.0067260722869830905,"Shape_Area":0.0000027932986690750155}},{"type":"Feature","id":3,"geometry":{"type":"Polygon","coordinates":[[[-112.91251628199996,43.65359419200007],[-112.91252519299996,43.65365394400004],[-112.91278521199996,43.653995010000074],[-112.91282822899996,43.654063810000025],[-112.91289312199996,43.65415327100004],[-112.91307086899997,43.65437535400008],[-112.91314386699997,43.654480281000076],[-112.91325146399998,43.65459711900007],[-112.91332754199999,43.65459711700004],[-112.91345852999996,43.65452861800003],[-112.91516017099997,43.65358669700004],[-112.91522661799996,43.65353264400005],[-112.91525758199998,43.65348916200003],[-112.91528311799999,43.653436320000026],[-112.91527900099999,43.65338841700003],[-112.91525968399998,43.653324948000034],[-112.91466991499999,43.652553295000075],[-112.91462155699998,43.65252512400008],[-112.91456339799998,43.652502526000035],[-112.91448807799998,43.65250611100004],[-112.91442106099998,43.65251766600005],[-112.91251628199996,43.65359419200007]]]},"properties":{"OBJECTID":3,"OBJECTID_1":3,"AREA":23276.6422914,"PERIMETER":612.5640108,"Pond_loc":"NRF","Name":null,"Shape_Leng":612.5639513,"Shape_Length":0.007153983439317262,"Shape_Area":0.0000030628638291554923}},{"type":"Feature","id":4,"geometry":{"type":"Polygon","coordinates":[[[-112.91707883299995,43.64092818300003],[-112.91702909699995,43.640942565000046],[-112.91698246899995,43.640972659000056],[-112.91690275899998,43.64104486300005],[-112.91696622399996,43.64110636100003],[-112.91705318999999,43.64118563100004],[-112.91718234999996,43.641260172000045],[-112.91722315099997,43.64123709200004],[-112.91730612899994,43.641130342000054],[-112.91712925299998,43.64097649000007],[-112.91707883299995,43.64092818300003]]]},"properties":{"OBJECTID":4,"OBJECTID_1":4,"AREA":765.9626278,"PERIMETER":110.460075,"Pond_loc":"NRF","Name":null,"Shape_Leng":110.4604204,"Shape_Length":0.0010563281878767906,"Shape_Area":6.912181724993183e-8}},{"type":"Feature","id":5,"geometry":{"type":"Polygon","coordinates":[[[-112.91702531399994,43.64065159100005],[-112.91674961499996,43.64083812600006],[-112.91672043199998,43.64090157700008],[-112.91675373399994,43.64093959200005],[-112.91679526699994,43.64097742600006],[-112.91685715499995,43.64099218900003],[-112.91699278999994,43.64087612600008],[-112.91710753699999,43.64078549100003],[-112.91712262999994,43.64074815500004],[-112.91702531399994,43.64065159100005]]]},"properties":{"OBJECTID":5,"OBJECTID_1":5,"AREA":733.428378,"PERIMETER":112.6597027,"Pond_loc":"NRF","Name":null,"Shape_Leng":112.6598029,"Shape_Length":0.0010751648353901255,"Shape_Area":6.6175260091826e-8}},{"type":"Feature","id":6,"geometry":{"type":"Polygon","coordinates":[[[-112.65483369699996,43.59897250600005],[-112.65482883799996,43.59892135200005],[-112.65478422999996,43.59888491400005],[-112.65468147299998,43.59885907900008],[-112.65422182399999,43.598919081000076],[-112.65413474699994,43.59894743700005],[-112.65400760499995,43.599211420000074],[-112.65392909699995,43.59939920900007],[-112.65384814499998,43.59962750500006],[-112.65381873199999,43.599784441000054],[-112.65383371799999,43.59986256500008],[-112.65387756099994,43.59993410900006],[-112.65395982099994,43.599993151000035],[-112.65411057199998,43.60004366600003],[-112.65428650999996,43.60004795700007],[-112.65440858699998,43.60001119800006],[-112.65453210899994,43.599845806000076],[-112.65483369699996,43.59897250600005]]]},"properties":{"OBJECTID":6,"OBJECTID_1":6,"AREA":7712.9111432,"PERIMETER":355.3452122,"Pond_loc":"MFC","Name":null,"Shape_Leng":355.3455107,"Shape_Length":0.0035260212696812928,"Shape_Area":8.104314436230885e-7}},{"type":"Feature","id":7,"geometry":{"type":"Polygon","coordinates":[[[-112.65457452399994,43.59841784400004],[-112.65429870199995,43.598463741000046],[-112.65428141699999,43.598561165000035],[-112.65427665599998,43.59877785900005],[-112.65431568999998,43.59886656600003],[-112.65438840199994,43.59886991500008],[-112.65453312599999,43.598848187000044],[-112.65454759899995,43.59880403500006],[-112.65457452399994,43.59841784400004]]]},"properties":{"OBJECTID":7,"OBJECTID_1":7,"AREA":1087.9499356,"PERIMETER":136.718034,"Pond_loc":"MFC","Name":null,"Shape_Leng":136.7178436,"Shape_Length":0.0013449488133028455,"Shape_Area":1.1433132774554863e-7}},{"type":"Feature","id":8,"geometry":{"type":"Polygon","coordinates":[[[-112.65527451999998,43.59839791400003],[-112.65519811599995,43.598346942000035],[-112.65512103399999,43.59833682400006],[-112.65462283799997,43.59836143900003],[-112.65459583299997,43.59875912200005],[-112.65462942499994,43.59881678100004],[-112.65468354599994,43.598831336000046],[-112.65503531699994,43.59884342600003],[-112.65519028499995,43.598835903000065],[-112.65524998799998,43.598815427000034],[-112.65527451999998,43.59839791400003]]]},"properties":{"OBJECTID":8,"OBJECTID_1":8,"AREA":3007.9304453,"PERIMETER":209.766451,"Pond_loc":"MFC","Name":null,"Shape_Leng":209.7664364,"Shape_Length":0.0021782455912364943,"Shape_Area":3.16058429064049e-7}},{"type":"Feature","id":9,"geometry":{"type":"Polygon","coordinates":[[[-112.96053680499995,43.58728883400005],[-112.95963842899994,43.58727429900006],[-112.95960997899999,43.58798672100005],[-112.96052014599996,43.58800071300004],[-112.96053680499995,43.58728883400005]]]},"properties":{"OBJECTID":9,"OBJECTID_1":9,"AREA":5023.1201686,"PERIMETER":283.5346658,"Pond_loc":"ATRC","Name":"Chemical Waste Pond","Shape_Leng":283.5345726,"Shape_Length":0.003233831851075247,"Shape_Area":6.442991069578259e-7}},{"type":"Feature","id":10,"geometry":{"type":"Polygon","coordinates":[[[-112.95846200699998,43.58606613000006],[-112.95842298199995,43.58612237500006],[-112.95841288599996,43.58617619900008],[-112.95851518299997,43.58622946100007],[-112.95863466699996,43.58630059700005],[-112.95876554699998,43.58635390200004],[-112.95894423799996,43.586465006000026],[-112.95908652499998,43.58653222200007],[-112.95916466399996,43.586491333000026],[-112.95917684999995,43.58643260000008],[-112.95907723399995,43.58635186300006],[-112.95898941599995,43.58631290900007],[-112.95882550899995,43.586236575000044],[-112.95846200699998,43.58606613000006]]]},"properties":{"OBJECTID":10,"OBJECTID_1":10,"AREA":869.4443079,"PERIMETER":155.4522072,"Pond_loc":"ATRC","Name":"Sanitary Waste Pond","Shape_Leng":155.4525526,"Shape_Length":0.00184146695330948,"Shape_Area":1.1148089520365528e-7}},{"type":"Feature","id":11,"geometry":{"type":"Polygon","coordinates":[[[-112.96021612399994,43.58463479900007],[-112.95949115999997,43.58463394900008],[-112.95948230199997,43.58479042700003],[-112.95947128899996,43.58495428200007],[-112.95946966499997,43.585423355000046],[-112.95951306499995,43.58549978700006],[-112.96013061599996,43.58549315700003],[-112.96018557299999,43.58547063800006],[-112.96021612399994,43.58463479900007]]]},"properties":{"OBJECTID":11,"OBJECTID_1":11,"AREA":4861.6231257,"PERIMETER":281.1613353,"Pond_loc":"ATRC","Name":"Evaporation Pond","Shape_Leng":281.161283,"Shape_Length":0.0031162632970551983,"Shape_Area":6.234374500584373e-7}},{"type":"Feature","id":12,"geometry":{"type":"Polygon","coordinates":[[[-112.957530153,43.58339762400004],[-112.95747193299997,43.58343773100006],[-112.95723916699995,43.58367964200005],[-112.95709294899996,43.583848327000055],[-112.95699837099994,43.58396058900007],[-112.95693133799995,43.58403760900006],[-112.95698245999995,43.58408663600005],[-112.95712989699996,43.584149694000075],[-112.95726984999999,43.58423098900005],[-112.95743629599997,43.58431723600006],[-112.95759598299998,43.58440480000007],[-112.95777646299996,43.58449018300007],[-112.95788275499996,43.58454067800005],[-112.95801746299998,43.58462965900003],[-112.95821929899995,43.58473438300007],[-112.95832615899997,43.58475243700008],[-112.95838654199997,43.58470459900008],[-112.95847707699994,43.58459686600003],[-112.95862644999994,43.58442540200008],[-112.95885663299998,43.58416441000003],[-112.95892570599995,43.584169950000046],[-112.95902196799994,43.584186095000064],[-112.95907768999996,43.584166409000034],[-112.95902450599999,43.584121233000076],[-112.95890529099995,43.584071969000036],[-112.95878544799996,43.584014584000045],[-112.95859048799997,43.58391489500008],[-112.95849652999999,43.583885732000056],[-112.95841373699994,43.583847552000066],[-112.95832131299994,43.58379195800006],[-112.95823188599996,43.58373957900005],[-112.95772014699997,43.583451395000054],[-112.95766221199995,43.58343789600008],[-112.957530153,43.58339762400004]]]},"properties":{"OBJECTID":12,"OBJECTID_1":12,"AREA":10951.7744541,"PERIMETER":443.7626681,"Pond_loc":"ATRC","Name":"Radioactive Waste Pond","Shape_Leng":443.7632938,"Shape_Length":0.00521137378766102,"Shape_Area":0.0000014044637603682847}},{"type":"Feature","id":13,"geometry":{"type":"Polygon","coordinates":[[[-112.95905977899997,43.584123816000044],[-112.95901406199994,43.58422159000003],[-112.95899945499997,43.58441572700008],[-112.95900741799994,43.58461476300005],[-112.95917977099998,43.58462525700003],[-112.95944908799999,43.584625102000075],[-112.95995241099996,43.58461407200008],[-112.96018400799994,43.584459614000025],[-112.96018895499998,43.58414189700005],[-112.96002060499995,43.58412828200005],[-112.95968164299995,43.58411266300004],[-112.95905977899997,43.584123816000044]]]},"properties":{"OBJECTID":13,"OBJECTID_1":13,"AREA":4423.7297475,"PERIMETER":266.2925197,"Pond_loc":"ATRC","Name":"Radioactive Waste Pond","Shape_Leng":266.2925345,"Shape_Length":0.003173567337543913,"Shape_Area":5.67349487158108e-7}},{"type":"Feature","id":14,"geometry":{"type":"Polygon","coordinates":[[[-112.95777969799997,43.58203282900007],[-112.95746376599999,43.582529296000075],[-112.95891586499994,43.58312146900005],[-112.95898769999997,43.58308578200007],[-112.95904680399997,43.583011826000075],[-112.95924930799998,43.58264111200003],[-112.95911866099999,43.58257899400007],[-112.95777969799997,43.58203282900007]]]},"properties":{"OBJECTID":14,"OBJECTID_1":14,"AREA":7240.9888047,"PERIMETER":367.8044114,"Pond_loc":"ATRC","Name":"Cold Waste Pond","Shape_Leng":367.8041618,"Shape_Length":0.004344702499211979,"Shape_Area":9.290654188260158e-7}},{"type":"Feature","id":15,"geometry":{"type":"Polygon","coordinates":[[[-112.95817264999994,43.58146300400006],[-112.95782089199997,43.581957920000036],[-112.95933635299997,43.582580946000064],[-112.95968007899995,43.582092970000076],[-112.95817264999994,43.58146300400006]]]},"properties":{"OBJECTID":15,"OBJECTID_1":15,"AREA":7491.0684672,"PERIMETER":378.3996641,"Pond_loc":"ATRC","Name":"Cold Waste Pond","Shape_Leng":378.3993741,"Shape_Length":0.004476367919677234,"Shape_Area":9.606525714722905e-7}},{"type":"Feature","id":16,"geometry":{"type":"Polygon","coordinates":[[[-112.92847625599995,43.57538939800003],[-112.92842588899998,43.57533991100007],[-112.92827627099996,43.57532185400004],[-112.92798677799999,43.57532579000008],[-112.92795767199999,43.575369436000074],[-112.92794594999998,43.57566167300007],[-112.92795471699998,43.575703187000045],[-112.92800425499996,43.57573078400003],[-112.92838636999994,43.57573287400004],[-112.92847153999998,43.57568321100007],[-112.92847625599995,43.57538939800003]]]},"properties":{"OBJECTID":16,"OBJECTID_1":16,"AREA":2288.2974651,"PERIMETER":180.4952426,"Pond_loc":"INTEC","Name":null,"Shape_Leng":180.4954782,"Shape_Length":0.0017294657009442457,"Shape_Area":2.0619923441304692e-7}},{"type":"Feature","id":17,"geometry":{"type":"Polygon","coordinates":[[[-112.92791233799994,43.575333914000055],[-112.92787484599995,43.57530382500005],[-112.92757646299998,43.575297584000054],[-112.92751272999999,43.57534488400006],[-112.92753236699997,43.57556157700003],[-112.92758721799999,43.57558363100003],[-112.92781140299996,43.575588835000076],[-112.92787051099998,43.57557428800004],[-112.927908619,43.57554555000007],[-112.92791233799994,43.575333914000055]]]},"properties":{"OBJECTID":17,"OBJECTID_1":17,"AREA":1186.9192418,"PERIMETER":129.3840617,"Pond_loc":"INTEC","Name":null,"Shape_Leng":129.3839233,"Shape_Length":0.001247103262382723,"Shape_Area":1.0692695549551845e-7}},{"type":"Feature","id":18,"geometry":{"type":"Polygon","coordinates":[[[-112.927913908,43.57502586600003],[-112.92788494799998,43.57499294000007],[-112.92779628499994,43.57497928300006],[-112.92754742399995,43.575001229000065],[-112.92752159599996,43.57503634700004],[-112.92751825999994,43.575224631000026],[-112.92755741099995,43.57526302200006],[-112.92784692599997,43.57526706900006],[-112.92791763299999,43.57523139800003],[-112.927913908,43.57502586600003]]]},"properties":{"OBJECTID":18,"OBJECTID_1":18,"AREA":1175.956919,"PERIMETER":128.8568086,"Pond_loc":"INTEC","Name":null,"Shape_Leng":128.8568874,"Shape_Length":0.0012444293506433586,"Shape_Area":1.0588751713840375e-7}},{"type":"Feature","id":19,"geometry":{"type":"Polygon","coordinates":[[[-112.928440836,43.574872397000036],[-112.92844773199994,43.57487811000004],[-112.92823098999997,43.57485793300003],[-112.92804133099997,43.57486178600004],[-112.92796131199998,43.57491211100006],[-112.92796288599999,43.57519891700008],[-112.92802429899996,43.57525713200005],[-112.92842078299998,43.57525764800005],[-112.92848034399998,43.575208220000036],[-112.92848206899998,43.57490313000005],[-112.928440836,43.574872397000036]]]},"properties":{"OBJECTID":19,"OBJECTID_1":19,"AREA":2199.3479158,"PERIMETER":178.3390949,"Pond_loc":"INTEC","Name":null,"Shape_Leng":178.3391124,"Shape_Length":0.0017126960542485582,"Shape_Area":1.9810994062285944e-7}},{"type":"Feature","id":20,"geometry":{"type":"Polygon","coordinates":[[[-112.93389469599998,43.563910830000054],[-112.93549606699997,43.563936124000065],[-112.93557181299997,43.563913823000064],[-112.93562063699994,43.562668028000076],[-112.93559486699996,43.56260321600007],[-112.93555579499997,43.562553001000026],[-112.93546332099999,43.562532789000045],[-112.93540117999999,43.56252009700006],[-112.93395155899998,43.562503424000056],[-112.93388498399997,43.56251639100003],[-112.93382260499999,43.56253946900006],[-112.93377849999996,43.56256428000006],[-112.93373288199996,43.56263755700007],[-112.93371153999999,43.56372230900007],[-112.93371355,43.56379743300005],[-112.93373534999995,43.563843563000034],[-112.93378281199995,43.563896261000025],[-112.93389469599998,43.563910830000054]]]},"properties":{"OBJECTID":20,"OBJECTID_1":20,"AREA":29155.7396243,"PERIMETER":660.1518128,"Pond_loc":"INTEC","Name":"Infiltration Pond","Shape_Leng":660.1519621,"Shape_Length":0.006334595156770013,"Shape_Area":0.0000026264296604255082}},{"type":"Feature","id":21,"geometry":{"type":"Polygon","coordinates":[[[-112.93194096199994,43.56385222400007],[-112.93279162399995,43.56387119400006],[-112.93315240499999,43.56386144600003],[-112.93319459999998,43.56382892100004],[-112.93322366899997,43.563608474000034],[-112.93324036699994,43.56357204600005],[-112.93323210599999,43.56308410200006],[-112.93319443999997,43.56300729800006],[-112.93314294999999,43.562964892000025],[-112.93311017499997,43.562889634000044],[-112.93305855299997,43.56286112200007],[-112.93186868699996,43.56284451400006],[-112.93182064499996,43.56285833100003],[-112.93178964099997,43.562893967000036],[-112.93175049199999,43.56334488300007],[-112.93175965299997,43.563504961000035],[-112.93178077999994,43.56378110000003],[-112.93183272199997,43.56377975600003],[-112.93194096199994,43.56385222400007]]]},"properties":{"OBJECTID":21,"OBJECTID_1":21,"AREA":16039.9107396,"PERIMETER":484.2706253,"Pond_loc":"INTEC","Name":"Infiltration Pond","Shape_Leng":484.2705944,"Shape_Length":0.004668132431732084,"Shape_Area":0.000001444854088689483}},{"type":"Feature","id":22,"geometry":{"type":"Polygon","coordinates":[[[-112.97249441899999,43.555426510000075],[-112.97250594199994,43.55384698600005],[-112.97125731599999,43.553790469000035],[-112.97137160199998,43.55547136200005],[-112.97249441899999,43.555426510000075]]]},"properties":{"OBJECTID":22,"OBJECTID_1":22,"AREA":21457.0166711,"PERIMETER":612.1593975,"Pond_loc":"INTEC","Name":"New Percolation Pond","Shape_Leng":612.1593323,"Shape_Length":0.005637956665542785,"Shape_Area":0.0000019326735853200327}},{"type":"Feature","id":23,"geometry":{"type":"Polygon","coordinates":[[[-112.95782347999994,43.585559164000074],[-112.95695149299996,43.58505119600005],[-112.95567787299996,43.58638477200003],[-112.95658217899995,43.586846637000065],[-112.95782347999994,43.585559164000074]]]},"properties":{"OBJECTID":23,"OBJECTID_1":23,"AREA":0,"PERIMETER":0,"Pond_loc":"INTEC","Name":"Evaporation Pond","Shape_Leng":496.7838,"Shape_Length":0.005657044498839449,"Shape_Area":0.000001773701092394554}},{"type":"Feature","id":24,"geometry":{"type":"Polygon","coordinates":[[[-112.95549526899998,43.586256707000075],[-112.95680120499998,43.58487702100007],[-112.95604622399998,43.58453502800006],[-112.95477231899997,43.58586859800005],[-112.95549526899998,43.586256707000075]]]},"properties":{"OBJECTID":24,"OBJECTID_1":24,"AREA":0,"PERIMETER":0,"Pond_loc":"INTEC","Name":"Evaporation Pond","Shape_Leng":474.5717258,"Shape_Length":0.005393350754181257,"Shape_Area":0.0000014733880568060088}},{"type":"Feature","id":25,"geometry":{"type":"Polygon","coordinates":[[[-112.91035781199997,43.65483601500006],[-112.91032445699994,43.65490517000006],[-112.91033189799998,43.654977399000074],[-112.91055531099994,43.65528581800004],[-112.91064008499995,43.655385556000056],[-112.91089607199996,43.65572870900007],[-112.91094287499999,43.65578328200007],[-112.91101214799994,43.65581496300007],[-112.91114166999995,43.655822854000064],[-112.91311975999997,43.65471380900004],[-112.91315955599998,43.65463724500006],[-112.91285101099999,43.65422087500008],[-112.91277540499999,43.654160543000046],[-112.91275430299999,43.65410026200004],[-112.91249858599997,43.65376818300007],[-112.91237961099995,43.65371616700003],[-112.91229053599994,43.65372455600004],[-112.91116089399998,43.65434636600003],[-112.91035781199997,43.65483601500006]]]},"properties":{"OBJECTID":25,"OBJECTID_1":2,"AREA":23778.9124696,"PERIMETER":620.9067853,"Pond_loc":"NRF","Name":null,"Shape_Leng":620.9067171,"Shape_Length":0.0072684646360231114,"Shape_Area":0.0000031287974621333796}}]} \ No newline at end of file +{"type":"FeatureCollection","features":[{"type":"Feature","id":30,"geometry":{"type":"Polygon","coordinates":[[[-112.91009136399998,43.655742410000073],[-112.90902396299998,43.654611485000032],[-112.90598928799994,43.656121307000035],[-112.90705665699994,43.657252261000053],[-112.91009136399998,43.655742410000073]]]},"properties":{"OBJECTID":30,"Pond_loc":"NRF","Name":null,"Shape_Length":0.009889271701748973,"Shape_Area":5.04362875487023e-06,"Activity":"Active","Start_date":2013,"End_date":null}},{"type":"Feature","id":31,"geometry":{"type":"Polygon","coordinates":[[[-112.90894277199999,43.65448129300006],[-112.90797171299994,43.653434858000026],[-112.90492654499997,43.654924504000064],[-112.90589757399999,43.655970964000062],[-112.90894277199999,43.65448129300006]]]},"properties":{"OBJECTID":31,"Pond_loc":"NRF","Name":null,"Shape_Length":0.0096351918855404894,"Shape_Area":4.6331480859762406e-06,"Activity":"Active","Start_date":2013,"End_date":null}},{"type":"Feature","id":32,"geometry":{"type":"Polygon","coordinates":[[[-112.91311810799999,43.654603050000048],[-112.91235389199994,43.653776484000048],[-112.91010711599995,43.654871548000074],[-112.91087131499995,43.655698129000029],[-112.91311810799999,43.654603050000048]]]},"properties":{"OBJECTID":32,"Pond_loc":"NRF","Name":null,"Shape_Length":0.0072503210516740354,"Shape_Area":2.6939943812430258e-06,"Activity":"Inactive","Start_date":null,"End_date":2013}},{"type":"Feature","id":33,"geometry":{"type":"Polygon","coordinates":[[[-112.91338015999997,43.654466582000055],[-112.91532852499995,43.653456383000048],[-112.91448934999994,43.652603126000031],[-112.91254099899999,43.653613311000072],[-112.91338015999997,43.654466582000055]]]},"properties":{"OBJECTID":33,"Pond_loc":"NRF","Name":null,"Shape_Length":0.0067828880255205223,"Shape_Area":2.5101845407561649e-06,"Activity":"Inactive","Start_date":null,"End_date":2003}},{"type":"Feature","id":36,"geometry":{"type":"Polygon","coordinates":[[[-112.72953625699995,43.860271897000075],[-112.72849039399995,43.859861393000074],[-112.72750336599995,43.861177894000036],[-112.72854924399996,43.861588406000067],[-112.72953625699995,43.860271897000075]]]},"properties":{"OBJECTID":36,"Pond_loc":"TAN","Name":null,"Shape_Length":0.0055379302631621118,"Shape_Area":1.7820735540145756e-06,"Activity":"Inactive","Start_date":null,"End_date":1988}},{"type":"Feature","id":38,"geometry":{"type":"Polygon","coordinates":[[[-112.73321654599994,43.860405030000038],[-112.73221201199999,43.861472743000036],[-112.73302233599998,43.861871862000044],[-112.73402686299994,43.860804142000063],[-112.73321654599994,43.860405030000038]]]},"properties":{"OBJECTID":38,"Pond_loc":"TAN","Name":null,"Shape_Length":0.0047385193287962177,"Shape_Area":1.2661162608944252e-06,"Activity":"Active","Start_date":1998,"End_date":null}},{"type":"Feature","id":39,"geometry":{"type":"Polygon","coordinates":[[[-112.73180199699999,43.860435245000076],[-112.73263316299995,43.860805428000049],[-112.73303684599995,43.860330900000065],[-112.73220568299996,43.859960720000061],[-112.73180199699999,43.860435245000076]]]},"properties":{"OBJECTID":39,"Pond_loc":"TAN","Name":null,"Shape_Length":0.003065758040624453,"Shape_Area":5.4384611482206186e-07,"Activity":"Active","Start_date":1998,"End_date":null}},{"type":"Feature","id":40,"geometry":{"type":"Polygon","coordinates":[[[-112.73130922799999,43.861019992000081],[-112.73206489099999,43.861377592000053],[-112.73247132099999,43.860927961000073],[-112.73171566199994,43.860570364000068],[-112.73130922799999,43.861019992000081]]]},"properties":{"OBJECTID":40,"Pond_loc":"TAN","Name":null,"Shape_Length":0.0028841992041406779,"Shape_Area":4.8510695114862859e-07,"Activity":"Active","Start_date":1998,"End_date":null}},{"type":"Feature","id":41,"geometry":{"type":"Polygon","coordinates":[[[-112.95550841599999,43.588414643000078],[-112.95632887599999,43.588406897000027],[-112.95630520799995,43.587082980000048],[-112.95548476699997,43.587090726000042],[-112.95550841599999,43.588414643000078]]]},"properties":{"OBJECTID":41,"Pond_loc":"ATRC","Name":null,"Shape_Length":0.0042892308751043013,"Shape_Area":1.0863916233389158e-06,"Activity":"Active","Start_date":1998,"End_date":null}},{"type":"Feature","id":42,"geometry":{"type":"Polygon","coordinates":[[[-112.95523179299994,43.588382734000049],[-112.95521290099998,43.586804374000053],[-112.95158070099995,43.586813092000057],[-112.95161758299997,43.587682273000041],[-112.95228104699999,43.588049324000053],[-112.95259662599994,43.588165543000059],[-112.95281946499995,43.588301899000044],[-112.95308322999995,43.588409247000072],[-112.95523179299994,43.588382734000049]]]},"properties":{"OBJECTID":42,"Pond_loc":"ATRC","Name":null,"Shape_Length":0.0098699211605746077,"Shape_Area":5.2483978966136656e-06,"Activity":"Active","Start_date":1998,"End_date":null}},{"type":"Feature","id":43,"geometry":{"type":"Polygon","coordinates":[[[-112.95590142299994,43.584720405000041],[-112.95483166599996,43.585863790000076],[-112.95558649499998,43.586236954000071],[-112.95665624399999,43.585093561000065],[-112.95590142299994,43.584720405000041]]]},"properties":{"OBJECTID":43,"Pond_loc":"ATRC","Name":"Evaporation Pond","Shape_Length":0.0048156410251236539,"Shape_Area":1.2622476314630836e-06,"Activity":"Active","Start_date":1998,"End_date":null}},{"type":"Feature","id":44,"geometry":{"type":"Polygon","coordinates":[[[-112.95685764999996,43.585186641000064],[-112.95579607999997,43.586319376000063],[-112.95655443499999,43.586694905000058],[-112.95761599699995,43.585562164000066],[-112.95685764999996,43.585186641000064]]]},"properties":{"OBJECTID":44,"Pond_loc":"ATRC","Name":"Evaporation Pond","Shape_Length":0.0047973191383039876,"Shape_Area":1.2576586287425346e-06,"Activity":"Active","Start_date":1998,"End_date":null}},{"type":"Feature","id":45,"geometry":{"type":"Polygon","coordinates":[[[-112.96053085299997,43.587906378000071],[-112.96050308099996,43.587302832000034],[-112.95971986899997,43.587321871000029],[-112.95974763399994,43.587925418000054],[-112.96053085299997,43.587906378000071]]]},"properties":{"OBJECTID":45,"Pond_loc":"ATRC","Name":"Chemical Waste Pond","Shape_Length":0.0027752636928443843,"Shape_Area":4.7323567215467075e-07,"Activity":"Inactive","Start_date":null,"End_date":1988}},{"type":"Feature","id":46,"geometry":{"type":"Polygon","coordinates":[[[-112.95826489999996,43.584842703000049],[-112.95888943599999,43.584192742000027],[-112.95752122899995,43.583498031000033],[-112.95689668499995,43.584147984000026],[-112.95826489999996,43.584842703000049]]]},"properties":{"OBJECTID":46,"Pond_loc":"ATRC","Name":"Radioactive Waste Pond","Shape_Length":0.004871730242427541,"Shape_Area":1.3231556230730419e-06,"Activity":"Inactive","Start_date":null,"End_date":1988}},{"type":"Feature","id":47,"geometry":{"type":"Polygon","coordinates":[[[-112.95939924799995,43.585465842000076],[-112.96017292299996,43.585454447000075],[-112.96015166699999,43.584691989000078],[-112.95937800199999,43.584703383000033],[-112.95939924799995,43.585465842000076]]]},"properties":{"OBJECTID":47,"Pond_loc":"ATRC","Name":"Radioactive Waste Pond","Shape_Length":0.0030730169936290987,"Shape_Area":5.9013341222990448e-07,"Activity":"Inactive","Start_date":null,"End_date":1988}},{"type":"Feature","id":48,"geometry":{"type":"Polygon","coordinates":[[[-112.95899724099996,43.584668890000046],[-112.96018114299994,43.584666219000042],[-112.96017881099999,43.584121402000051],[-112.95899491999995,43.584124073000055],[-112.95899724099996,43.584668890000046]]]},"properties":{"OBJECTID":48,"Pond_loc":"ATRC","Name":"Radioactive Waste Pond","Shape_Length":0.0034574429607874659,"Shape_Area":6.4501315351632569e-07,"Activity":"Inactive","Start_date":null,"End_date":1988}},{"type":"Feature","id":49,"geometry":{"type":"Polygon","coordinates":[[[-112.95907444799997,43.586889969000026],[-112.95944492599995,43.586477215000059],[-112.95847167099998,43.58601563600007],[-112.95810118899999,43.586428387000069],[-112.95907444799997,43.586889969000026]]]},"properties":{"OBJECTID":49,"Pond_loc":"ATRC","Name":"Sanitary Waste Pond","Shape_Length":0.0032636013473313326,"Shape_Area":5.7272060348741857e-07,"Activity":"Inactive","Start_date":null,"End_date":1988}},{"type":"Feature","id":50,"geometry":{"type":"Polygon","coordinates":[[[-112.95907018399998,43.583116549000067],[-112.95933543499996,43.58268974300006],[-112.95791922799998,43.582224628000063],[-112.95765396899998,43.582651430000055],[-112.95907018399998,43.583116549000067]]]},"properties":{"OBJECTID":50,"Pond_loc":"ATRC","Name":"Cold Waste Pond","Shape_Length":0.0039862975388584108,"Shape_Area":7.2781912947092753e-07,"Activity":"Active","Start_date":null,"End_date":null}},{"type":"Feature","id":51,"geometry":{"type":"Polygon","coordinates":[[[-112.95942517099996,43.582620301000077],[-112.95971162899997,43.582162212000071],[-112.95829788899999,43.581695020000041],[-112.95801142299996,43.582153106000078],[-112.95942517099996,43.582620301000077]]]},"properties":{"OBJECTID":51,"Pond_loc":"ATRC","Name":"Cold Waste Pond","Shape_Length":0.0040584436832013914,"Shape_Area":7.8145163903617102e-07,"Activity":"Active","Start_date":null,"End_date":null}},{"type":"Feature","id":52,"geometry":{"type":"Polygon","coordinates":[[[-112.97239533999999,43.555548996000027],[-112.97239586099994,43.553903034000029],[-112.97135942599999,43.553901103000044],[-112.97135887699994,43.555547065000042],[-112.97239533999999,43.555548996000027]]]},"properties":{"OBJECTID":52,"Pond_loc":"INTEC","Name":"New Percolation Pond","Shape_Length":0.0053648257716321143,"Shape_Area":1.7059567020161111e-06,"Activity":"Active","Start_date":2002,"End_date":null}},{"type":"Feature","id":54,"geometry":{"type":"Polygon","coordinates":[[[-112.93787217899995,43.52477669700005],[-112.93785109999999,43.522625748000053],[-112.93581143999995,43.522636313000078],[-112.93583244699994,43.524787263000064],[-112.93787217899995,43.52477669700005]]]},"properties":{"OBJECTID":54,"Pond_loc":"CFA","Name":null,"Shape_Length":0.008381551590208227,"Shape_Area":4.3875054212068912e-06,"Activity":"Active","Start_date":1998,"End_date":null}},{"type":"Feature","id":55,"geometry":{"type":"Polygon","coordinates":[[[-112.93789135199995,43.525289247000046],[-112.93788209799999,43.524924772000077],[-112.93582705499995,43.524952380000059],[-112.93583629699998,43.525316855000028],[-112.93789135199995,43.525289247000046]]]},"properties":{"OBJECTID":55,"Pond_loc":"CFA","Name":null,"Shape_Length":0.004839653491734733,"Shape_Area":7.4926930299812308e-07,"Activity":"Active","Start_date":1998,"End_date":null}},{"type":"Feature","id":56,"geometry":{"type":"Polygon","coordinates":[[[-112.92855831499998,43.575753776000056],[-112.92855418499994,43.575342908000039],[-112.92801709299999,43.575345760000062],[-112.92802121999995,43.575756629000068],[-112.92855831499998,43.575753776000056]]]},"properties":{"OBJECTID":56,"Pond_loc":"INTEC","Name":null,"Shape_Length":0.0018959806325620915,"Shape_Area":2.206865772517078e-07,"Activity":"Active","Start_date":null,"End_date":null}},{"type":"Feature","id":57,"geometry":{"type":"Polygon","coordinates":[[[-112.92855592299998,43.57523748400007],[-112.92855690999994,43.57483436800004],[-112.92801463199999,43.574833665000028],[-112.92801364099995,43.575236781000058],[-112.92855592299998,43.57523748400007]]]},"properties":{"OBJECTID":57,"Pond_loc":"INTEC","Name":null,"Shape_Length":0.0018907953378008355,"Shape_Area":2.1860243975921457e-07,"Activity":"Active","Start_date":null,"End_date":null}},{"type":"Feature","id":58,"geometry":{"type":"Polygon","coordinates":[[[-112.92792012099994,43.575605084000074],[-112.92791907999998,43.575327529000049],[-112.92750358499995,43.575328352000042],[-112.92750462399999,43.575605907000067],[-112.92792012099994,43.575605084000074]]]},"properties":{"OBJECTID":58,"Pond_loc":"INTEC","Name":null,"Shape_Length":0.0013861075270696446,"Shape_Area":1.1532384820711211e-07,"Activity":"Active","Start_date":null,"End_date":null}},{"type":"Feature","id":59,"geometry":{"type":"Polygon","coordinates":[[[-112.92791468199999,43.575260853000032],[-112.92790762899995,43.57496610100003],[-112.92748682799999,43.574971423000079],[-112.92749387899994,43.575266175000081],[-112.92791468199999,43.575260853000032]]]},"properties":{"OBJECTID":59,"Pond_loc":"INTEC","Name":null,"Shape_Length":0.0014313440025077715,"Shape_Area":1.2406976185152847e-07,"Activity":"Active","Start_date":null,"End_date":null}},{"type":"Feature","id":60,"geometry":{"type":"Polygon","coordinates":[[[-112.92901238999997,43.572610045000033],[-112.92894011499999,43.571632099000055],[-112.92748158099994,43.571689073000073],[-112.92755383399998,43.57266702000004],[-112.92901238999997,43.572610045000033]]]},"properties":{"OBJECTID":60,"Pond_loc":"INTEC","Name":null,"Shape_Length":0.0048805403001506232,"Shape_Area":1.4304961830910306e-06,"Activity":"Active","Start_date":null,"End_date":null}},{"type":"Feature","id":61,"geometry":{"type":"Polygon","coordinates":[[[-112.93824049899996,43.563388150000037],[-112.93822752499995,43.562434005000057],[-112.93755160299997,43.562438863000068],[-112.93756456599999,43.563393008000048],[-112.93824049899996,43.563388150000037]]]},"properties":{"OBJECTID":61,"Pond_loc":"INTEC","Name":"Evaporation Pond","Shape_Length":0.0032603561711763845,"Shape_Area":6.4499584541817681e-07,"Activity":"Active","Start_date":2002,"End_date":null}},{"type":"Feature","id":62,"geometry":{"type":"Polygon","coordinates":[[[-112.93737625999995,43.563377434000074],[-112.93736267099996,43.562433619000046],[-112.93667980299995,43.562438816000054],[-112.93669338099994,43.563382631000025],[-112.93737625999995,43.563377434000074]]]},"properties":{"OBJECTID":62,"Pond_loc":"INTEC","Name":"Evaporation Pond","Shape_Length":0.0032536120364397699,"Shape_Area":6.4457684586191437e-07,"Activity":"Active","Start_date":2002,"End_date":null}},{"type":"Feature","id":63,"geometry":{"type":"Polygon","coordinates":[[[-112.93580736899997,43.563931273000037],[-112.93576852099994,43.562467599000058],[-112.93376734899999,43.562495667000064],[-112.93380614899996,43.563959342000032],[-112.93580736899997,43.563931273000037]]]},"properties":{"OBJECTID":63,"Pond_loc":"INTEC","Name":null,"Shape_Length":0.0069311642922896318,"Shape_Area":2.9301892860644764e-06,"Activity":"Inactive","Start_date":null,"End_date":2002}},{"type":"Feature","id":64,"geometry":{"type":"Polygon","coordinates":[[[-112.93317299299997,43.563978860000077],[-112.93312822999997,43.562739277000048],[-112.93152585399997,43.562769863000028],[-112.93157058399999,43.564009447000046],[-112.93317299299997,43.563978860000077]]]},"properties":{"OBJECTID":64,"Pond_loc":"INTEC","Name":null,"Shape_Length":0.0056861505166340412,"Shape_Area":1.9876679423701797e-06,"Activity":"Inactive","Start_date":null,"End_date":2002}},{"type":"Feature","id":65,"geometry":{"type":"Polygon","coordinates":[[[-112.65040497099994,43.599188169000058],[-112.65117162099995,43.599383997000075],[-112.65201024699996,43.597649922000073],[-112.65124361499994,43.59745410000005],[-112.65040497099994,43.599188169000058]]]},"properties":{"OBJECTID":65,"Pond_loc":"MFC","Name":null,"Shape_Length":0.0054349470055045359,"Shape_Area":1.4936363910711431e-06,"Activity":"Active","Start_date":2013,"End_date":null}},{"type":"Feature","id":66,"geometry":{"type":"Polygon","coordinates":[[[-112.65127782999997,43.599412533000077],[-112.65213306799996,43.599637673000075],[-112.65297378699995,43.597950893000075],[-112.65211856899998,43.59772575900007],[-112.65127782999997,43.599412533000077]]]},"properties":{"OBJECTID":66,"Pond_loc":"MFC","Name":null,"Shape_Length":0.0055381024748888162,"Shape_Area":1.6318581249957625e-06,"Activity":"Active","Start_date":2013,"End_date":null}},{"type":"Feature","id":67,"geometry":{"type":"Polygon","coordinates":[[[-112.65224317399998,43.599633783000058],[-112.65312012099997,43.59986212900003],[-112.65392029499998,43.59823906400004],[-112.65304336899999,43.598010725000051],[-112.65224317399998,43.599633783000058]]]},"properties":{"OBJECTID":67,"Pond_loc":"MFC","Name":null,"Shape_Length":0.0054315396528050982,"Shape_Area":1.6060380002577912e-06,"Activity":"Active","Start_date":2013,"End_date":null}},{"type":"Feature","id":68,"geometry":{"type":"Polygon","coordinates":[[[-112.65526825399996,43.598913902000049],[-112.65526657099997,43.598485996000079],[-112.65467711599996,43.598487219000049],[-112.65467879499994,43.598915125000076],[-112.65526825399996,43.598913902000049]]]},"properties":{"OBJECTID":68,"Pond_loc":"MFC","Name":null,"Shape_Length":0.0020347351411794412,"Shape_Area":2.5223424291195004e-07,"Activity":"Inactive","Start_date":null,"End_date":2020}},{"type":"Feature","id":69,"geometry":{"type":"Polygon","coordinates":[[[-112.65453961599997,43.598955695000029],[-112.65452954699998,43.598580549000076],[-112.65431111599997,43.598583645000076],[-112.65432118399997,43.598958792000076],[-112.65453961599997,43.598955695000029]]]},"properties":{"OBJECTID":69,"Pond_loc":"MFC","Name":null,"Shape_Length":0.0011874700722506939,"Shape_Area":8.1974989820928865e-08,"Activity":"Inactive","Start_date":null,"End_date":2020}},{"type":"Feature","id":70,"geometry":{"type":"Polygon","coordinates":[[[-112.65485624799999,43.599001395000073],[-112.65416253299998,43.59903100400004],[-112.65380965099996,43.600092957000072],[-112.65457460699997,43.600236276000032],[-112.65485624799999,43.599001395000073]]]},"properties":{"OBJECTID":70,"Pond_loc":"MFC","Name":null,"Shape_Length":0.0038582522678400509,"Shape_Area":8.5561918949620943e-07,"Activity":"Inactive","Start_date":null,"End_date":2020}},{"type":"Feature","id":71,"geometry":{"type":"Polygon","coordinates":[[[-112.93627788699996,43.522538180000026],[-112.93627012799999,43.522180325000079],[-112.93581936499999,43.522185500000035],[-112.93582712299997,43.522543355000039],[-112.93627788699996,43.522538180000026]]]},"properties":{"OBJECTID":71,"Pond_loc":"CFA","Name":null,"Shape_Length":0.001617464598620324,"Shape_Area":1.6134812251822158e-07,"Activity":"Inactive","Start_date":1998,"End_date":2016}},{"type":"Feature","id":72,"geometry":{"type":"Polygon","coordinates":[[[-112.93205897499996,43.566816866000067],[-112.93204221199994,43.56610345200005],[-112.93051271199994,43.566122445000076],[-112.93052945699998,43.566835858000047],[-112.93205897499996,43.566816866000067]]]},"properties":{"OBJECTID":72,"Pond_loc":"INTEC","Name":null,"Shape_Length":0.0044864742294965492,"Shape_Area":1.0914905693041766e-06,"Activity":"Inactive","Start_date":null,"End_date":2002}},{"type":"Feature","id":73,"geometry":{"type":"Polygon","coordinates":[[[-112.65948408299994,43.59788472200006],[-112.65966204799997,43.597932979000063],[-112.65980788399997,43.597867533000056],[-112.65987903299998,43.597784421000028],[-112.65997178699996,43.597768719000044],[-112.66004284299999,43.597689804000026],[-112.66005625299999,43.597606016000043],[-112.65994869299999,43.59750821800003],[-112.65981170499998,43.597435258000075],[-112.65971047799997,43.597312350000038],[-112.65964305599999,43.597227614000076],[-112.65959258199996,43.597159865000037],[-112.65951798899999,43.597138004000044],[-112.65939767099997,43.597094620000064],[-112.65928154399995,43.597122639000077],[-112.65920853099999,43.597289674000081],[-112.65912741399995,43.597561545000076],[-112.65903642599994,43.597757750000028],[-112.65902012499998,43.597971620000067],[-112.65906342599999,43.598102244000074],[-112.65897737299997,43.598336281000059],[-112.65894654599998,43.598424063000039],[-112.65891422699997,43.598578983000039],[-112.65889448199999,43.598687880000057],[-112.65906192599999,43.598689845000081],[-112.65908204399994,43.598564162000059],[-112.65914145999994,43.598489308000069],[-112.65920003799994,43.59845222000007],[-112.65918495299996,43.598351308000076],[-112.65921065799995,43.598234086000048],[-112.65925349799994,43.598125460000063],[-112.65932548699999,43.598004583000034],[-112.65937307499996,43.597942182000054],[-112.65943155899998,43.597909290000075],[-112.65948408299994,43.59788472200006]]]},"properties":{"OBJECTID":73,"Pond_loc":"MFC","Name":"Waste Ditch","Shape_Length":0.0045048428751913606,"Shape_Area":7.2847318325475015e-07,"Activity":"Active","Start_date":null,"End_date":null}},{"type":"Feature","id":74,"geometry":{"type":"Polygon","coordinates":[[[-112.66872969899998,43.603155427000047],[-112.66885234799997,43.603093896000075],[-112.66890672399995,43.60298540000008],[-112.66901828699997,43.60290275400007],[-112.66922856899998,43.602796073000036],[-112.66931777399998,43.602679588000058],[-112.66924483599996,43.602582202000065],[-112.66916677099999,43.602455375000034],[-112.66912847799995,43.602358391000053],[-112.66911282099994,43.602282658000036],[-112.66924692499998,43.602225458000078],[-112.66929954099999,43.602196689000039],[-112.66944509999996,43.602143819000048],[-112.66951531599994,43.602102664000029],[-112.66956234299994,43.602065436000032],[-112.66965593399999,43.602011960000027],[-112.66966226299996,43.60198685000006],[-112.66958654999996,43.602015350000045],[-112.66947508099997,43.60209380100008],[-112.66937031199996,43.602130357000078],[-112.66923648599999,43.602174969000032],[-112.66909064899994,43.602240427000027],[-112.66907119799998,43.602336738000076],[-112.66907354899996,43.602492065000035],[-112.66906592399994,43.602575921000039],[-112.66899496699995,43.602650646000029],[-112.66886187999995,43.602661688000069],[-112.66857186799996,43.602717072000075],[-112.66844903299994,43.602786995000031],[-112.66834873999994,43.602882364000038],[-112.66831214999996,43.602970080000034],[-112.66836198999999,43.603067198000076],[-112.66849937199999,43.603123363000066],[-112.66858533899995,43.603153746000032],[-112.66872969899998,43.603155427000047]]]},"properties":{"OBJECTID":74,"Pond_loc":"MFC","Name":"Waste Ditch","Shape_Length":0.0042344592735707367,"Shape_Area":3.7099997024885243e-07,"Activity":"Active","Start_date":2013,"End_date":null}},{"type":"Feature","id":75,"geometry":{"type":"Polygon","coordinates":[[[-113.03996007399996,43.493931208000049],[-113.03972570599996,43.493564321000065],[-113.03927884199999,43.493715617000078],[-113.03951320699997,43.494082505000051],[-113.03996007399996,43.493931208000049]]]},"properties":{"OBJECTID":75,"Pond_loc":"RWMC","Name":null,"Shape_Length":0.0018142767094481227,"Shape_Area":1.9940819728325098e-07,"Activity":"Active","Start_date":2003,"End_date":null}},{"type":"Feature","id":76,"geometry":{"type":"Polygon","coordinates":[[[-113.03967104099996,43.493410667000035],[-113.03946734299996,43.493062793000036],[-113.03899861499997,43.493208265000078],[-113.03920231099994,43.493556139000077],[-113.03967104099996,43.493410667000035]]]},"properties":{"OBJECTID":76,"Pond_loc":"RWMC","Name":null,"Shape_Length":0.0017878156628972186,"Shape_Area":1.9269084213839467e-07,"Activity":"Active","Start_date":2003,"End_date":null}},{"type":"Feature","id":77,"geometry":{"type":"Polygon","coordinates":[[[-113.03894702699995,43.493621011000073],[-113.03878067299996,43.493317926000032],[-113.03760368999997,43.49368841200004],[-113.03775421099999,43.493853639000065],[-113.03757302299999,43.493917698000075],[-113.03737475699995,43.493922587000043],[-113.03725745399998,43.493934717000059],[-113.03722886899999,43.494032852000032],[-113.03724594599998,43.494092021000029],[-113.03735340899999,43.494132277000062],[-113.03894702699995,43.493621011000073]]]},"properties":{"OBJECTID":77,"Pond_loc":"RWMC","Name":null,"Shape_Length":0.0042637714610805405,"Shape_Area":5.0046933885698089e-07,"Activity":"Active","Start_date":2003,"End_date":null}},{"type":"Feature","id":78,"geometry":{"type":"Polygon","coordinates":[[[-113.03923626299996,43.494128439000065],[-113.03906069099997,43.493838394000079],[-113.03763024299997,43.494285450000064],[-113.03762060999998,43.494324720000066],[-113.03770042699995,43.494404093000071],[-113.03800553399998,43.49447880300005],[-113.03811580899998,43.494342004000032],[-113.03818953399997,43.494237690000034],[-113.03837972999997,43.494173705000037],[-113.03856008499997,43.494162105000044],[-113.03876735899996,43.494157290000032],[-113.03892865999995,43.494211113000063],[-113.03923626299996,43.494128439000065]]]},"properties":{"OBJECTID":78,"Pond_loc":"RWMC","Name":null,"Shape_Length":0.0036855844971266398,"Shape_Area":3.2623941863081201e-07,"Activity":"Active","Start_date":2003,"End_date":null}},{"type":"Feature","id":79,"geometry":{"type":"Polygon","coordinates":[[[-112.94055232499994,43.564225674000056],[-112.94050777199999,43.563306142000044],[-112.93996640199998,43.56332001100003],[-112.94001094799995,43.564239544000031],[-112.94055232499994,43.564225674000056]]]},"properties":{"OBJECTID":79,"Pond_loc":"INTEC","Name":null,"Shape_Length":0.0029243243344306649,"Shape_Area":4.9842840718019947e-07,"Activity":"Inactive","Start_date":2002,"End_date":2003}},{"type":"Feature","id":80,"geometry":{"type":"Polygon","coordinates":[[[-112.93983300499997,43.563328152000054],[-112.93936000299999,43.563340136000079],[-112.93940401599997,43.564258788000075],[-112.93987702499999,43.564246804000049],[-112.93983300499997,43.563328152000054]]]},"properties":{"OBJECTID":80,"Pond_loc":"INTEC","Name":null,"Shape_Length":0.0027857263836932058,"Shape_Area":4.3505494231940977e-07,"Activity":"Inactive","Start_date":2002,"End_date":2003}}]} \ No newline at end of file diff --git a/data-raw/misc/units.tsv b/data-raw/misc/units.tsv index 806bb7febda8ce5cb12a930e3d8d913db2410757..78f58363af0f429a325bd333cfdf304b7dcc2a6a 100644 --- a/data-raw/misc/units.tsv +++ b/data-raw/misc/units.tsv @@ -1,12 +1,12 @@ -parm_unit desc siunitx +unit_cd unit_ds siunitx % percent code code deg C degrees Celsius ft feet -mg/L milligrams per litre \si{\mg\per\L} -mg/L as N milligrams per litre as nitrogen \si{\mg\per\L} as N -mg/L as P milligrams per litre as phosphorus -mg/L as CaCO3 milligrams per litre as calcium carbonate +mg/L milligrams per liter \si{\mg\per\L} +mg/L as N milligrams per liter as nitrogen \si{\mg\per\L} as N +mg/L as P milligrams per liter as phosphorus +mg/L as CaCO3 milligrams per liter as calcium carbonate None unitless NTU nephelometric turbidity units nu number diff --git a/data-raw/output.log b/data-raw/output.log index a751dd9b397a93b8a1631288a0d469949862b55e..78293bb32cda193bf311a80f4852e50b98705f61 100644 --- a/data-raw/output.log +++ b/data-raw/output.log @@ -1,266 +1,312 @@ running '/usr/lib/R/bin/R --no-echo --no-restore --no-save --no-restore --file=data-raw/make-datasets.R' -TIMESTAMP: 2024-04-13 09:52:55 PDT +TIMESTAMP: 2024-05-16 11:46:45 PDT + STATUS: making 'crs' dataset ... -STATUS: making 'dl' dataset ... STATUS: making 'parameters' dataset ... +STATUS: making 'dl' dataset ... STATUS: making 'samples' dataset ... -Warning: Unable to pair 29 replicate samples: - 1989-11-15 17:00:00 433509112573501 (USGS 56) - 1989-11-15 17:01:00 433509112573501 (USGS 56) - 1991-10-11 12:11:00 13115000 (MUD LAKE NR TERRETON ID) - 1991-10-21 14:45:00 433318112555001 (USGS 114) - 1992-10-09 18:00:00 433315112560301 (USGS 77) - 1992-10-09 18:01:00 433315112560301 (USGS 77) - 1994-04-12 15:15:00 435038112453401 (NO NAME 1) - 1994-04-15 15:11:00 433505112581901 (USGS 79) - 1994-04-25 18:30:00 433446112570701 (USGS 62) - 1994-04-25 18:31:00 433446112570701 (USGS 62) - 1994-07-15 15:00:00 432533112504901 (01N 31E 08CDD1) - 1994-07-15 15:01:00 432533112504901 (01N 31E 08CDD1) - 1996-04-16 18:00:00 432740113044501 (USGS 9) - 1996-04-16 18:01:00 432740113044501 (USGS 9) - 1997-10-01 12:00:00 432942112532801 (USGS 107) - 1997-11-19 11:30:00 433847112544201 (NRF 11) - 1998-04-13 15:30:00 434915112443901 (USGS 7) - 1999-10-21 16:05:00 433500112572502 (USGS 58) - 2000-07-13 14:22:00 433522112582101 (SITE 19) - 2000-10-04 18:00:00 433500112572502 (USGS 58) - 2000-10-04 18:01:00 433500112572502 (USGS 58) - 2001-04-17 13:00:00 433052113025001 (RWMC M14S) - 2002-07-09 13:00:00 434426112575701 (USGS 19) - 2002-09-10 13:15:00 433058113010401 (RWMC M11S) - 2003-11-05 13:50:00 433331112560501 (USGS 111) - 2011-12-14 12:07:00 433858112545501 (NRF 3) - 2017-05-11 11:15:00 433856112545901 (NRF 14) - 2019-11-19 12:36:00 433841112545201 (NRF 10) - 2023-11-13 13:31:00 433841112545201 (NRF 10) +Warning: Unable to pair 262 replicate records: + 13115000 'MUD LAKE NR TERRETON ID' 07000 1991-10-11 12:11:00 + 13115000 'MUD LAKE NR TERRETON ID' 07001 1991-10-11 12:11:00 + 432533112504901 '01N 31E 08CDD1' 00010 1994-07-15 15:01:00 + 432533112504901 '01N 31E 08CDD1' 00095 1994-07-15 15:00:00 + 432533112504901 '01N 31E 08CDD1' 00095 1994-07-15 15:01:00 + 432533112504901 '01N 31E 08CDD1' 00400 1994-07-15 15:00:00 + 432533112504901 '01N 31E 08CDD1' 00400 1994-07-15 15:01:00 + 432533112504901 '01N 31E 08CDD1' 00940 1994-07-15 15:00:00 + 432533112504901 '01N 31E 08CDD1' 01000 1994-07-15 15:00:00 + 432533112504901 '01N 31E 08CDD1' 07000 1994-07-15 15:01:00 + 432533112504901 '01N 31E 08CDD1' 07001 1994-07-15 15:01:00 + 432533112504901 '01N 31E 08CDD1' 13501 1994-07-15 15:01:00 + 432533112504901 '01N 31E 08CDD1' 13502 1994-07-15 15:01:00 + 432740113044501 'USGS 9' 00010 1996-04-16 18:00:00 + 432740113044501 'USGS 9' 00010 1996-04-16 18:01:00 + 432740113044501 'USGS 9' 00095 1996-04-16 18:00:00 + 432740113044501 'USGS 9' 00095 1996-04-16 18:01:00 + 432740113044501 'USGS 9' 00400 1996-04-16 18:00:00 + 432740113044501 'USGS 9' 00400 1996-04-16 18:01:00 + 432740113044501 'USGS 9' 00608 1996-04-16 18:00:00 + 432740113044501 'USGS 9' 00613 1996-04-16 18:00:00 + 432740113044501 'USGS 9' 00618 1996-04-16 18:00:00 + 432740113044501 'USGS 9' 00631 1996-04-16 18:00:00 + 432740113044501 'USGS 9' 00671 1996-04-16 18:00:00 + 432740113044501 'USGS 9' 00930 1996-04-16 18:00:00 + 432740113044501 'USGS 9' 00940 1996-04-16 18:00:00 + 432740113044501 'USGS 9' 01030 1996-04-16 18:00:00 + 432740113044501 'USGS 9' 01032 1996-04-16 18:00:00 + 432740113044501 'USGS 9' 07000 1996-04-16 18:01:00 + 432740113044501 'USGS 9' 07001 1996-04-16 18:01:00 + 432740113044501 'USGS 9' 28401 1996-04-16 18:01:00 + 432740113044501 'USGS 9' 28402 1996-04-16 18:01:00 + 432942112532801 'USGS 107' 00403 1997-10-01 12:00:00 + 432942112532801 'USGS 107' 00930 1997-10-01 12:00:00 + 432942112532801 'USGS 107' 00940 1997-10-01 12:00:00 + 432942112532801 'USGS 107' 01030 1997-10-01 12:00:00 + 432942112532801 'USGS 107' 90095 1997-10-01 12:00:00 + 433052113025001 'RWMC M14S' 00608 2001-04-17 13:00:00 + 433052113025001 'RWMC M14S' 00613 2001-04-17 13:00:00 + 433052113025001 'RWMC M14S' 00618 2001-04-17 13:00:00 + 433052113025001 'RWMC M14S' 00631 2001-04-17 13:00:00 + 433052113025001 'RWMC M14S' 00671 2001-04-17 13:00:00 + 433058113010401 'RWMC M11S' 90095 2002-09-10 13:15:00 + 433315112560301 'USGS 77' 00010 1992-10-09 18:00:00 + 433315112560301 'USGS 77' 00010 1992-10-09 18:01:00 + 433315112560301 'USGS 77' 00095 1992-10-09 18:00:00 + 433315112560301 'USGS 77' 00095 1992-10-09 18:01:00 + 433315112560301 'USGS 77' 00400 1992-10-09 18:00:00 + 433315112560301 'USGS 77' 00400 1992-10-09 18:01:00 + 433315112560301 'USGS 77' 00608 1992-10-09 18:00:00 + 433315112560301 'USGS 77' 00613 1992-10-09 18:00:00 + 433315112560301 'USGS 77' 00618 1992-10-09 18:00:00 + 433315112560301 'USGS 77' 00631 1992-10-09 18:00:00 + 433315112560301 'USGS 77' 00671 1992-10-09 18:00:00 + 433315112560301 'USGS 77' 00930 1992-10-09 18:00:00 + 433315112560301 'USGS 77' 00940 1992-10-09 18:00:00 + 433315112560301 'USGS 77' 07000 1992-10-09 18:01:00 + 433315112560301 'USGS 77' 07001 1992-10-09 18:01:00 + 433315112560301 'USGS 77' 13501 1992-10-09 18:01:00 + 433315112560301 'USGS 77' 13502 1992-10-09 18:01:00 + 433318112555001 'USGS 114' 01030 1991-10-21 14:45:00 + 433318112555001 'USGS 114' 01032 1991-10-21 14:45:00 + 433331112560501 'USGS 111' 90095 2003-11-05 13:50:00 + 433446112570701 'USGS 62' 00010 1994-04-25 18:30:00 + 433446112570701 'USGS 62' 00010 1994-04-25 18:31:00 + 433446112570701 'USGS 62' 00095 1994-04-25 18:30:00 + 433446112570701 'USGS 62' 00095 1994-04-25 18:31:00 + 433446112570701 'USGS 62' 00400 1994-04-25 18:30:00 + 433446112570701 'USGS 62' 00400 1994-04-25 18:31:00 + 433446112570701 'USGS 62' 00940 1994-04-25 18:30:00 + 433446112570701 'USGS 62' 01030 1994-04-25 18:30:00 + 433446112570701 'USGS 62' 01032 1994-04-25 18:30:00 + 433446112570701 'USGS 62' 07000 1994-04-25 18:31:00 + 433446112570701 'USGS 62' 07001 1994-04-25 18:31:00 + 433446112570701 'USGS 62' 13501 1994-04-25 18:31:00 + 433446112570701 'USGS 62' 13502 1994-04-25 18:31:00 + 433446112570701 'USGS 62' 28401 1994-04-25 18:31:00 + 433446112570701 'USGS 62' 28402 1994-04-25 18:31:00 + 433500112572502 'USGS 58' 00010 2000-10-04 18:00:00 + 433500112572502 'USGS 58' 00010 2000-10-04 18:01:00 + 433500112572502 'USGS 58' 00095 2000-10-04 18:00:00 + 433500112572502 'USGS 58' 00095 2000-10-04 18:01:00 + 433500112572502 'USGS 58' 00400 2000-10-04 18:00:00 + 433500112572502 'USGS 58' 00400 2000-10-04 18:01:00 + 433500112572502 'USGS 58' 00403 2000-10-04 18:00:00 + 433500112572502 'USGS 58' 00930 2000-10-04 18:00:00 + 433500112572502 'USGS 58' 00935 1999-10-21 16:05:00 + 433500112572502 'USGS 58' 00940 2000-10-04 18:00:00 + 433500112572502 'USGS 58' 00945 2000-10-04 18:00:00 + 433500112572502 'USGS 58' 01030 2000-10-04 18:00:00 + 433500112572502 'USGS 58' 07000 2000-10-04 18:01:00 + 433500112572502 'USGS 58' 07001 2000-10-04 18:01:00 + 433500112572502 'USGS 58' 13501 2000-10-04 18:01:00 + 433500112572502 'USGS 58' 13502 2000-10-04 18:01:00 + 433500112572502 'USGS 58' 28401 2000-10-04 18:01:00 + 433500112572502 'USGS 58' 28402 2000-10-04 18:01:00 + 433500112572502 'USGS 58' 90095 2000-10-04 18:00:00 + 433505112581901 'USGS 79' 07000 1994-04-15 15:11:00 + 433505112581901 'USGS 79' 07001 1994-04-15 15:11:00 + 433509112573501 'USGS 56' 00003 1989-11-15 17:00:00 + 433509112573501 'USGS 56' 00003 1989-11-15 17:01:00 + 433509112573501 'USGS 56' 00010 1989-11-15 17:00:00 + 433509112573501 'USGS 56' 00010 1989-11-15 17:01:00 + 433509112573501 'USGS 56' 00095 1989-11-15 17:00:00 + 433509112573501 'USGS 56' 00095 1989-11-15 17:01:00 + 433509112573501 'USGS 56' 00400 1989-11-15 17:00:00 + 433509112573501 'USGS 56' 00400 1989-11-15 17:01:00 + 433509112573501 'USGS 56' 00930 1989-11-15 17:00:00 + 433509112573501 'USGS 56' 00940 1989-11-15 17:00:00 + 433509112573501 'USGS 56' 01034 1989-11-15 17:00:00 + 433509112573501 'USGS 56' 07000 1989-11-15 17:01:00 + 433509112573501 'USGS 56' 07001 1989-11-15 17:01:00 + 433522112582101 'SITE 19' 01030 2000-07-13 14:22:00 + 433841112545201 'NRF 10' 00010 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 00020 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 00095 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 00300 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 00400 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 00419 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 00613 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 00618 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 00631 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 00680 2023-11-13 13:31:00 + 433841112545201 'NRF 10' 00900 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 00915 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 00925 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 00930 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 00931 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 00932 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 00935 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 00940 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 00945 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01000 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01002 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01005 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01007 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01010 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01025 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01027 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01030 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01034 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01040 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01046 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01049 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01051 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01056 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01057 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01065 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01075 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01077 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01090 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01095 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01106 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01145 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 01147 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 07000 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 13501 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 28401 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 63675 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 71890 2019-11-19 12:36:00 + 433841112545201 'NRF 10' 71900 2019-11-19 12:36:00 + 433847112544201 'NRF 11' 00010 1997-11-19 11:30:00 + 433847112544201 'NRF 11' 00095 1997-11-19 11:30:00 + 433847112544201 'NRF 11' 00400 1997-11-19 11:30:00 + 433847112544201 'NRF 11' 07000 1997-11-19 11:30:00 + 433856112545901 'NRF 14' 07000 2017-05-11 11:15:00 + 433858112545501 'NRF 3' 00613 2011-12-14 12:07:00 + 434426112575701 'USGS 19' 90095 2002-07-09 13:00:00 + 434915112443901 'USGS 7' 00403 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 00608 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 00613 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 00618 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 00631 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 00671 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 00930 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 00940 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 01000 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 01005 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 01010 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 01025 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 01030 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 01035 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 01040 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 01049 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 01056 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 01057 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 01060 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 01065 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 01075 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 01090 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 01095 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 01106 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 22703 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 30217 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 32101 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 32102 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 32103 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 32104 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 32105 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 32106 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34010 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34030 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34215 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34301 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34311 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34371 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34413 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34418 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34423 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34475 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34488 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34496 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34501 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34506 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34511 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34516 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34536 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34541 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34546 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34551 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34566 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34571 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34668 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34696 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34699 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 34704 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 39175 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 39180 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 39702 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 71890 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77093 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77128 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77168 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77170 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77173 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77222 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77223 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77224 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77226 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77275 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77277 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77297 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77342 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77350 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77353 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77356 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77443 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77562 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77613 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77651 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 77652 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 78032 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 81551 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 81555 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 82625 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 90095 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 90867 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 99832 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 99833 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 99834 1998-04-13 15:30:00 + 434915112443901 'USGS 7' 99931 1998-04-13 15:30:00 + 435038112453401 'NO NAME 1' 22703 1994-04-12 15:15:00 STATUS: making 'benchmarks' dataset ... STATUS: making 'sites' dataset ... Warning: Unrecognized altitude datum code in sites, will assume NAVD88: - 435053112423203 (06N 31E 13CAB2 TAN 2336) datum 'NA' + 435053112423203 '06N 31E 13CAB2 TAN 2336' datum 'NA' STATUS: making 'swm' dataset ... Warning: Removed duplicated timestamp records: - 13119000 (LITTLE LOST RIVER NR HOWE, ID) at 1986-06-06 18:00:00 - 13127000 (BIG LOST RIVER BL MACKAY RES NR MACKAY ID) at 1985-10-16 18:00:00 - 13127000 (BIG LOST RIVER BL MACKAY RES NR MACKAY ID) at 1986-02-24 17:00:00 - 13127000 (BIG LOST RIVER BL MACKAY RES NR MACKAY ID) at 1986-06-30 18:00:00 - 13132500 (BIG LOST RIVER NR ARCO ID) at 1986-02-24 17:00:00 - 13132500 (BIG LOST RIVER NR ARCO ID) at 1986-06-02 18:00:00 - 13132535 (BIG LOST R AT LINCOLN BLVD BRIDGE NR ATOMIC CITY) at 1985-10-13 18:00:00 - 13132535 (BIG LOST R AT LINCOLN BLVD BRIDGE NR ATOMIC CITY) at 1986-05-18 18:00:00 + 13119000 'LITTLE LOST RIVER NR HOWE, ID' 1986-06-06 18:00:00 + 13127000 'BIG LOST RIVER BL MACKAY RES NR MACKAY ID' 1985-10-16 18:00:00 + 13127000 'BIG LOST RIVER BL MACKAY RES NR MACKAY ID' 1986-02-24 17:00:00 + 13127000 'BIG LOST RIVER BL MACKAY RES NR MACKAY ID' 1986-06-30 18:00:00 + 13132500 'BIG LOST RIVER NR ARCO ID' 1986-02-24 17:00:00 + 13132500 'BIG LOST RIVER NR ARCO ID' 1986-06-02 18:00:00 + 13132535 'BIG LOST R AT LINCOLN BLVD BRIDGE NR ATOMIC CITY' 1985-10-13 18:00:00 + 13132535 'BIG LOST R AT LINCOLN BLVD BRIDGE NR ATOMIC CITY' 1986-05-18 18:00:00 STATUS: making 'gwl' dataset ... -Not all dates were converted to Date object. Returning raw text for date columns. -Warning: Unknown time formats, removed records: - 433823112460401 (USGS 139B) format 'NA' - 433823112460401 (USGS 139B) format 'NA' +Warning: Unknown date-time format, removed records: + 433823112460401 'USGS 139B' date '2014-03' time 'NA' + 433823112460401 'USGS 139B' date '2014-03' time 'NA' STATUS: making 'units' dataset ... STATUS: making 'background' dataset ... STATUS: making 'esrp' dataset ... -Reading layer `esrp' from data source - `/home/jfisher/repos/INLPO/inldata/data-raw/misc/esrp.geojson' - using driver `GeoJSON' -Simple feature collection with 1 feature and 1 field -Geometry type: POLYGON -Dimension: XY -Bounding box: xmin: -115.2079 ymin: 42.31804 xmax: -111.53 ymax: 44.42618 -Geodetic CRS: WGS 84 STATUS: making 'inl' dataset ... -Reading layer `inl' from data source - `/home/jfisher/repos/INLPO/inldata/data-raw/misc/inl.geojson' - using driver `GeoJSON' -Simple feature collection with 1 feature and 4 fields -Geometry type: POLYGON -Dimension: XY -Bounding box: xmin: -113.1777 ymin: 43.44917 xmax: -112.4608 ymax: 44.01592 -Geodetic CRS: WGS 84 STATUS: making 'iwd' dataset ... -Reading layer `nrfiwd' from data source - `/home/jfisher/repos/INLPO/inldata/data-raw/misc/nrfiwd.geojson' - using driver `GeoJSON' -Simple feature collection with 1 feature and 1 field -Geometry type: LINESTRING -Dimension: XY -Bounding box: xmin: -112.9208 ymin: 43.65172 xmax: -112.8986 ymax: 43.67824 -Geodetic CRS: WGS 84 STATUS: making 'facilities' dataset ... -Reading layer `facilities' from data source - `/home/jfisher/repos/INLPO/inldata/data-raw/misc/facilities.geojson' - using driver `GeoJSON' -Simple feature collection with 7 features and 1 field -Attribute-geometry relationship: identity (1) -Geometry type: MULTIPOLYGON -Dimension: XY -Bounding box: xmin: -113.0539 ymin: 43.49488 xmax: -112.6532 ymax: 43.85915 -Geodetic CRS: WGS 84 STATUS: making 'percponds' dataset ... -Reading layer `percponds' from data source - `/home/jfisher/repos/INLPO/inldata/data-raw/misc/percponds.geojson' - using driver `GeoJSON' -Simple feature collection with 24 features and 9 fields -Attribute-geometry relationships: identity (9) -Geometry type: POLYGON -Dimension: XY -Bounding box: xmin: -112.9725 ymin: 43.55379 xmax: -112.6538 ymax: 43.86144 -Geodetic CRS: WGS 84 STATUS: making 'idaho' dataset ... -Reading layer `tl_2023_us_state' from data source - `/tmp/RtmpA5GVQn/tl_2023_us_state.shp' using driver `ESRI Shapefile' -Simple feature collection with 56 features and 15 fields -Geometry type: MULTIPOLYGON -Dimension: XY -Bounding box: xmin: -179.2311 ymin: -14.60181 xmax: 179.8597 ymax: 71.43979 -Geodetic CRS: NAD83 STATUS: making 'cities' dataset ... -Reading layer `tl_2023_16_place' from data source - `/tmp/RtmpA5GVQn/tl_2023_16_place.shp' using driver `ESRI Shapefile' -Simple feature collection with 236 features and 16 fields -Attribute-geometry relationships: constant (16) -Geometry type: MULTIPOLYGON -Dimension: XY -Bounding box: xmin: -117.0466 ymin: 41.9989 xmax: -111.081 ymax: 48.73532 -Geodetic CRS: NAD83 +Warning: st_centroid assumes attributes are constant over geometries STATUS: making 'counties' dataset ... -Reading layer `tl_2023_us_county' from data source - `/tmp/RtmpA5GVQn/tl_2023_us_county.shp' using driver `ESRI Shapefile' -Simple feature collection with 3235 features and 18 fields -Attribute-geometry relationships: constant (18) -Geometry type: MULTIPOLYGON -Dimension: XY -Bounding box: xmin: -179.2311 ymin: -14.60181 xmax: 179.8597 ymax: 71.43979 -Geodetic CRS: NAD83 STATUS: making 'roads' dataset ... -Reading layer `tl_2023_16_prisecroads' from data source - `/tmp/RtmpA5GVQn/tl_2023_16_prisecroads.shp' using driver `ESRI Shapefile' -Simple feature collection with 1491 features and 4 fields -Geometry type: LINESTRING -Dimension: XY -Bounding box: xmin: -117.0418 ymin: 41.99685 xmax: -111.044 ymax: 49.00056 -Geodetic CRS: NAD83 -Reading layer `tl_2023_16011_roads' from data source - `/tmp/RtmpA5GVQn/tl_2023_16011_roads.shp' using driver `ESRI Shapefile' -Simple feature collection with 4261 features and 4 fields -Geometry type: LINESTRING -Dimension: XY -Bounding box: xmin: -113.0078 ymin: 42.86303 xmax: -111.5881 ymax: 43.62662 -Geodetic CRS: NAD83 -Reading layer `tl_2023_16013_roads' from data source - `/tmp/RtmpA5GVQn/tl_2023_16013_roads.shp' using driver `ESRI Shapefile' -Simple feature collection with 4049 features and 4 fields -Geometry type: LINESTRING -Dimension: XY -Bounding box: xmin: -114.9367 ymin: 42.6298 xmax: -113.0073 ymax: 43.99296 -Geodetic CRS: NAD83 -Reading layer `tl_2023_16019_roads' from data source - `/tmp/RtmpA5GVQn/tl_2023_16019_roads.shp' using driver `ESRI Shapefile' -Simple feature collection with 10382 features and 4 fields -Geometry type: LINESTRING -Dimension: XY -Bounding box: xmin: -112.5201 ymin: 43.01941 xmax: -111.044 ymax: 43.6269 -Geodetic CRS: NAD83 -Reading layer `tl_2023_16023_roads' from data source - `/tmp/RtmpA5GVQn/tl_2023_16023_roads.shp' using driver `ESRI Shapefile' -Simple feature collection with 1458 features and 4 fields -Geometry type: LINESTRING -Dimension: XY -Bounding box: xmin: -113.7282 ymin: 43.28459 xmax: -112.695 ymax: 44.23407 -Geodetic CRS: NAD83 -Reading layer `tl_2023_16033_roads' from data source - `/tmp/RtmpA5GVQn/tl_2023_16033_roads.shp' using driver `ESRI Shapefile' -Simple feature collection with 7492 features and 4 fields -Geometry type: LINESTRING -Dimension: XY -Bounding box: xmin: -112.9953 ymin: 43.97198 xmax: -111.6172 ymax: 44.56652 -Geodetic CRS: NAD83 -Reading layer `tl_2023_16037_roads' from data source - `/tmp/RtmpA5GVQn/tl_2023_16037_roads.shp' using driver `ESRI Shapefile' -Simple feature collection with 3330 features and 4 fields -Geometry type: LINESTRING -Dimension: XY -Bounding box: xmin: -115.2687 ymin: 43.62884 xmax: -113.3247 ymax: 44.85102 -Geodetic CRS: NAD83 -Reading layer `tl_2023_16051_roads' from data source - `/tmp/RtmpA5GVQn/tl_2023_16051_roads.shp' using driver `ESRI Shapefile' -Simple feature collection with 3826 features and 4 fields -Geometry type: LINESTRING -Dimension: XY -Bounding box: xmin: -112.6971 ymin: 43.62314 xmax: -111.626 ymax: 44.05822 -Geodetic CRS: NAD83 -Reading layer `tl_2023_16067_roads' from data source - `/tmp/RtmpA5GVQn/tl_2023_16067_roads.shp' using driver `ESRI Shapefile' -Simple feature collection with 5044 features and 4 fields -Geometry type: LINESTRING -Dimension: XY -Bounding box: xmin: -113.9321 ymin: 42.52039 xmax: -113.4131 ymax: 43.19984 -Geodetic CRS: NAD83 -Warning: attribute variables are assumed to be spatially constant throughout all geometries STATUS: making 'lakes' dataset ... - -7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 -p7zip Version 16.02 (locale=C.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Xeon(R) W-10885M CPU @ 2.40GHz (A0652),ASM,AES-NI) - -Scanning the drive for archives: -1 file, 107012670 bytes (103 MiB) - -Extracting archive: /home/jfisher/.cache/inldata/NHDPlusV21_PN_17_NHDSnapshot_08.7z --- -Path = /home/jfisher/.cache/inldata/NHDPlusV21_PN_17_NHDSnapshot_08.7z -Type = 7z -Physical Size = 107012670 -Headers Size = 749 -Method = LZMA:24 -Solid = + -Blocks = 1 - -Everything is Ok - -Folders: 4 -Files: 36 -Size: 415343814 -Compressed: 107012670 -Reading layer `NHDWaterbody' from data source `/tmp/RtmpA5GVQn/NHDWaterbody.shp' using driver `ESRI Shapefile' -Simple feature collection with 14367 features and 12 fields -Attribute-geometry relationships: constant (12) -Geometry type: MULTIPOLYGON -Dimension: XYZ -Bounding box: xmin: -124.6899 ymin: 41.48215 xmax: -109.7721 ymax: 49.00419 -z_range: zmin: 0 zmax: 0 -Geodetic CRS: NAD83 +â ™ 21 extracted | 266 MB ( 85 MB/s) | 3.1s +â ¹ 21 extracted | 392 MB ( 64 MB/s) | 6.1s STATUS: making 'streams' dataset ... - -7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 -p7zip Version 16.02 (locale=C.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Xeon(R) W-10885M CPU @ 2.40GHz (A0652),ASM,AES-NI) - -Scanning the drive for archives: -1 file, 107012670 bytes (103 MiB) - -Extracting archive: /home/jfisher/.cache/inldata/NHDPlusV21_PN_17_NHDSnapshot_08.7z --- -Path = /home/jfisher/.cache/inldata/NHDPlusV21_PN_17_NHDSnapshot_08.7z -Type = 7z -Physical Size = 107012670 -Headers Size = 749 -Method = LZMA:24 -Solid = + -Blocks = 1 - -Everything is Ok - -Folders: 4 -Files: 36 -Size: 415343814 -Compressed: 107012670 -Reading layer `NHDFlowline' from data source `/tmp/RtmpA5GVQn/NHDFlowline.shp' using driver `ESRI Shapefile' -Simple feature collection with 272340 features and 14 fields -Attribute-geometry relationships: constant (14) -Geometry type: MULTILINESTRING -Dimension: XYZM -Bounding box: xmin: -124.7626 ymin: 41.13574 xmax: -109.7706 ymax: 49.03937 -z_range: zmin: 0 zmax: 0 -m_range: mmin: -2.35e-05 mmax: 100 -Geodetic CRS: NAD83 +â ™ 21 extracted | 339 MB ( 74 MB/s) | 4.6s STATUS: making 'dem' dataset ... - |---------|---------|---------|---------| ========================================= STATUS: compress dataset files ... +STATUS: compress dataset files ... STATUS: copy dataset files to destination directory ... -DURATION: 5.834881 mins + +DURATION: 6.320151 mins diff --git a/data/background.rda b/data/background.rda index cee9a33f5418071b9fd51889a2b7ce602418cd76..1f430304ebe004979cada104cb1a790c687cc9cc 100644 Binary files a/data/background.rda and b/data/background.rda differ diff --git a/data/benchmarks.rda b/data/benchmarks.rda index 58525a49336c5ffa93187b3f0c8acbc46db7ca70..b5fde5476186a09e10a6a8667592bab1e1025ec3 100644 Binary files a/data/benchmarks.rda and b/data/benchmarks.rda differ diff --git a/data/cities.rda b/data/cities.rda index 07b9338c8218b132decd7c61e3d60de9c7ed3085..18baf66b5a5862834b1b4442c7b624c7087eae2e 100644 Binary files a/data/cities.rda and b/data/cities.rda differ diff --git a/data/counties.rda b/data/counties.rda index 57d609c441468dac68a0d1b476c0553e357d8e16..b084a6796ef83fde090964fb2381d882216be548 100644 Binary files a/data/counties.rda and b/data/counties.rda differ diff --git a/data/crs.rda b/data/crs.rda index bb417c117077398ee06b3e597fc3ae9b460924a4..229592dce6dc5d6321f7c257efa432bacf48da27 100644 Binary files a/data/crs.rda and b/data/crs.rda differ diff --git a/data/dem.rda b/data/dem.rda index c8520ec226b983cf0a8f2ecd4600703180b2bc30..a7edeef2a753d12f427c42f6dc9f588de0d52772 100644 Binary files a/data/dem.rda and b/data/dem.rda differ diff --git a/data/dl.rda b/data/dl.rda index cb5ec7d85ebb0a914eba18940d380c3799e2074f..37939de2cc89ce624e0e8b02ba8da4909d74aa17 100644 Binary files a/data/dl.rda and b/data/dl.rda differ diff --git a/data/esrp.rda b/data/esrp.rda index f3e40c848c6b4290790e029c619d93cdf540279c..238cafea9b72738763c584b304ad6f185e1d9c6e 100644 Binary files a/data/esrp.rda and b/data/esrp.rda differ diff --git a/data/facilities.rda b/data/facilities.rda index 70bebcd8adabdea3cafc5909d02cb96e4a9085b2..8708b9fc85cfe57d1af85d36ac22110d2374dbed 100644 Binary files a/data/facilities.rda and b/data/facilities.rda differ diff --git a/data/gwl.rda b/data/gwl.rda index 8ecced0fe6af5ebf885610ce25c074cf67b9e7a8..7e01a2b46f2143132786de40e4f5cc8fcdf93b34 100644 Binary files a/data/gwl.rda and b/data/gwl.rda differ diff --git a/data/idaho.rda b/data/idaho.rda index eb196d87b05ed9c8685688332bc87de9f4e4528f..987860430e6b96660534f9be0b626417def35d30 100644 Binary files a/data/idaho.rda and b/data/idaho.rda differ diff --git a/data/inl.rda b/data/inl.rda index a76bae58b2abdbcc7e939ae5d3ec82a588fa7225..66426d34c42f2d6b8c786840b4deae2853692730 100644 Binary files a/data/inl.rda and b/data/inl.rda differ diff --git a/data/iwd.rda b/data/iwd.rda index 8bd994bfa8c4ca146373988f323d77fb7a43c179..6726cb99d70ee266dbc6f34b8ac2e74f63a0c91d 100644 Binary files a/data/iwd.rda and b/data/iwd.rda differ diff --git a/data/lakes.rda b/data/lakes.rda index 534bd5f4f417d388a3339dd7e550d5c14f678782..004b5eae8be76c8fa5aeef15ed444a5b7bbe80a6 100644 Binary files a/data/lakes.rda and b/data/lakes.rda differ diff --git a/data/parameters.rda b/data/parameters.rda index 9339cd45f61d4e41b786bf543f9b1ce71316f765..9d2ef1862f46a747b8f2a0bc8e3e39497d1cf622 100644 Binary files a/data/parameters.rda and b/data/parameters.rda differ diff --git a/data/percponds.rda b/data/percponds.rda index 63d3b5e620214e4dc46c4287d55e0b2c56075257..f678379b579cfc6149d76b78d291cecef0f49248 100644 Binary files a/data/percponds.rda and b/data/percponds.rda differ diff --git a/data/roads.rda b/data/roads.rda index 44318f2ad1a8fa9336d435f53ece601c06b287a9..d7217007537b6ba667d831650a405585b93c108a 100644 Binary files a/data/roads.rda and b/data/roads.rda differ diff --git a/data/samples.rda b/data/samples.rda index 941bc38226474fd606e26b992085ccf15a33a66a..e44c097e4c1911e1de6d3544c1f24969bc2bd034 100644 Binary files a/data/samples.rda and b/data/samples.rda differ diff --git a/data/sites.rda b/data/sites.rda index 60db6d1289e9bf508b68a7f6663dc39d6c3b1ad1..bafe10a45c7ec549f5676509479c1d6d44ffece3 100644 Binary files a/data/sites.rda and b/data/sites.rda differ diff --git a/data/streams.rda b/data/streams.rda index 1d873b2d5ad3a6349b971a450dd8bc382da10911..8ca16ebffc332d434d305566690629249e044d0e 100644 Binary files a/data/streams.rda and b/data/streams.rda differ diff --git a/data/swm.rda b/data/swm.rda index c421e8f9190859d9e3361555689c8c25444fa68c..f5664541eea2721883786069613ef8c141776fcf 100644 Binary files a/data/swm.rda and b/data/swm.rda differ diff --git a/data/units.rda b/data/units.rda index d321286a93315b0780f07b801ec073ae5b87a2dc..a33c32c66b092d63c0ede5bf878b5d73d965cb3c 100644 Binary files a/data/units.rda and b/data/units.rda differ diff --git a/inst/extdata/test.rdb b/inst/extdata/test.rdb new file mode 100644 index 0000000000000000000000000000000000000000..e19e19d1ae9f2cdb60112cdb21acb4e34737a6d8 --- /dev/null +++ b/inst/extdata/test.rdb @@ -0,0 +1,30 @@ +# RDB file created at 05/04/2024 14:33:57 +# +# SNAME Station name +# STAID Station number +# DATES Date +# TIMES Sample start time +# MEDIM Medium code +# DBNUM Data base number +# ANENT Analyzing entity cd +# PLNAM Parameter long name +# PCODE Parameter code +# REMRK Remark code +# VALUE Parameter value +# LSDEV Lab std deviation +# UNITS Reporting units +# DQIND DQI code +# RPLEV Reporting level +# RLTYP Reporting level type +# STYPE Sample type code +# METHD Method code +# ASTAT Analysis status code +# RCMLB Lab result comment +# PSNAM Parameter short name +# ADATE Result analysis date +# +SNAME STAID DATES TIMES MEDIM DBNUM ANENT PLNAM PCODE REMRK VALUE LSDEV UNITS DQIND RPLEV RLTYP STYPE METHD ASTAT RCMLB PSNAM ADATE +50S 20S 10D 10S 10S 10S 10S 60S 10S 10S 10N 10S 10S 10S 10S 10S 10S 10S 10S 50S 30S 10D +03N 29E 01DBB1 USGS 98 433657112563601 19991005 0925 WG 01 temperature 00010 11.8 deg C R 9 U temperature +03N 29E 01DBB1 USGS 98 433657112563601 19991005 0925 WG 01 conductance, water, unfiltered, microsiemens 00095 434 uS/cm @25C R 9 U cond at 25C +03N 29E 01DBB1 USGS 98 433657112563601 19991005 0925 WG 01 pH 00400 8.06 std units R 9 U pH diff --git a/inst/extdata/test.zip b/inst/extdata/test.zip new file mode 100644 index 0000000000000000000000000000000000000000..10be6d2a3d4e9ef1fff1cfb151d5b2862c50031b Binary files /dev/null and b/inst/extdata/test.zip differ diff --git a/inst/tinytest/test_functions.R b/inst/tinytest/test_functions.R index b60e5ca0c2a4e590fe6d87596af27b5ee34817e9..3e82adec1caa2c43eded00c8ff8f9d8727dd6f3b 100644 --- a/inst/tinytest/test_functions.R +++ b/inst/tinytest/test_functions.R @@ -26,3 +26,19 @@ if (test_file_exists(Sys.which("mp"), access = "x")) { # test URL assertion expect_silent(assert_url("https://www.usa.gov/")) expect_error(assert_url("https://fail/on/bad/url/")) +expect_error(assert_url("https://anyapi.io/api/v1/exchange/rates?base=NAN&apiKey=123")) + +# test downloading file +url <- "https://code.usgs.gov/inl/inldata/-/raw/main/CODE_OF_CONDUCT.md" +file <- download_file(url, cachedir = tempdir(), quiet = TRUE) +expect_file_exists(file, access = "rw") +unlink(file) + +# test cleaning simple feature +x <- clean_sf(cities, + cols = c("key" = "id", "geometry" = "geometry"), + agr = c("key" = "identity"), + crs = sf::st_crs(3857), + extent = sf::st_bbox(esrp) +) +expect_multi_class(x, classes = c("sf", "data.frame")) diff --git a/inst/tinytest/test_make_datasets.R b/inst/tinytest/test_make_datasets.R new file mode 100644 index 0000000000000000000000000000000000000000..5dfad553bcafab7dc24214f47513e5b30618697f --- /dev/null +++ b/inst/tinytest/test_make_datasets.R @@ -0,0 +1,115 @@ +# setup tinytest for checkmate functionality +library("tinytest") +library("checkmate") +using("checkmate") + +# test existence of data-raw folder +destdir <- tempfile("") +expect_error( + current = make_datasets(destdir = destdir), + pattern = "does not exist.$" +) +unlink(destdir) + +# test making parameters +pcodes <- "07000" +n <- length(pcodes) +x <- inldata:::mds_parameters(pcodes) +expect_data_frame(x, nrows = n, col.names = "named") +x <- inldata:::tabulate_parm_data(x, samples) +expect_data_frame(x, nrows = n, col.names = "named") + +# test making detection limits +data <- data.frame( + "srsname" = c("Tritium", "Tritium"), + "pcode" = c("07000", "07000"), + "unit_cd" = c("pCi/L", "pCi/L"), + "lab_det_lim_va" = c("500", "200"), + "min_dt" = c("1949-01-16", "2003-04-01"), + "reference" = c("Bartholomay", "Bartholomay") +) +x <- inldata:::mds_dl(data, parameters) +expect_data_frame(x, nrows = nrow(data), col.names = "named") + +# test making benchmarks +bm <- data.frame( + "Chemical Name" = "trans-1,3-Dichloropropene", + "CAS Registry Number" = "10061-02-6", + "USGS Parameter Code" = "34699", + "Chemical Class" = "VOC", + "MCL (micrograms/L)" = NA_character_, + "Chronic Noncancer HHBP (micrograms/L)" = NA_character_, + "Carcinogenic HHBP (micrograms/L)" = NA_character_, + "Noncancer HBSL (micrograms/L)" = "200", + "Cancer HBSL (micrograms/L)" = "0.3-30", + "Benchmark Remarks" = NA_character_, + check.names = FALSE +) +mcl_extras <- data.frame( + "srsname" = "Tritium", + "pcode" = "07000", + "mcl" = "20000", + "unit_cd" = "pCi/L" +) +n <- nrow(bm) + nrow(mcl_extras) +x <- inldata:::mds_benchmarks(bm, mcl_extras, parameters) +expect_data_frame(x, nrows = n, col.names = "named") + +# test making sites +data <- data.frame( + "agency_cd" = "USGS", + "site_no" = "432700112470801", + "station_nm" = "02N 31E 35DCC1 USGS 1", + "network_cd" = "A", + "pos" = "3" +) +x <- inldata:::mds_sites(data, crs) +expect_multi_class(x, classes = c("sf", "data.frame")) +expect_set_equal(nrow(x), nrow(data)) +y <- inldata:::tabulate_site_data(x, samples, gwl, swm) +expect_data_frame(y, nrows = nrow(x), col.names = "named") + +# test making surface-water measurements +site_no <- "13131000" +is <- sites$site_no == site_no +x <- inldata:::mds_swm(sites = sites[is, ], tz = "America/Denver") +expect_data_frame(x, min.rows = 1, col.names = "named") + +# test making groundwater levels +site_no <- "433500112572501" +is <- sites$site_no == site_no +x <- inldata:::mds_gwl(sites = sites[is, ], tz = "America/Denver") +expect_data_frame(x, min.rows = 1, col.names = "named") + +# test making units +data <- data.frame( + "unit_cd" = "deg C", + "unit_ds" = "degrees Celsius" +) +x <- inldata:::mds_units(data) +expect_data_frame(x, nrows = nrow(data), col.names = "named") + +# test making background concentrations +data <- data.frame( + "srsname" = "Sodium", + "pcode" = "00930", + "unit_cd" = "mg/L", + "bkgrd_min" = "8.3", + "bkgrd_max" = "14.8", + "reference" = "Bartholomay" +) +x <- inldata:::mds_background(data, parameters) +expect_data_frame(x, nrows = nrow(data), col.names = "named") + +# test unit conversion +data <- data.frame( + "pcode" = c("01065", "00631"), + "unit_cd" = c("ug/L", "ug/L") +) +x <- inldata:::convert_units(data, parameters) +expect_data_frame(x, + types = c("character", "character", "character", "numeric"), + nrows = nrow(data), + col.names = "named" +) +expect_set_equal(colnames(x), c("pcode", "from", "to", "mult")) diff --git a/man/as_posix_ct.Rd b/man/as_posix_ct.Rd new file mode 100644 index 0000000000000000000000000000000000000000..ff0a4e41e971a03ebcf6919f773b1aedbe1cf6bd --- /dev/null +++ b/man/as_posix_ct.Rd @@ -0,0 +1,39 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils.R +\name{as_posix_ct} +\alias{as_posix_ct} +\title{Date-Time Conversion} +\usage{ +as_posix_ct(dt, tm, tm_unset = "12:00", tz = "") +} +\arguments{ +\item{dt}{'character' vector. +Calendar date formatted as YYYY-MM-DD.} + +\item{tm}{'character' vector. +Time in Greenwich Mean Time (UTC) formatted as HH:MM. +Vector length equal to the length of \code{dt}.} + +\item{tm_unset}{'character' string. +Value if time is missing, noon by default.} + +\item{tz}{'character' string. +Time zone specification to convert to.} +} +\value{ +Returns an object of class 'POSIXct'. +} +\description{ +Convert calendar date and times. +} +\examples{ +as_posix_ct( + dt = c("2024-01-01", "2024-02-15", NA), + tm = c("14:30", NA, "11:11"), + tz = "America/Denver" +) +} +\author{ +J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center +} +\keyword{internal} diff --git a/man/background.Rd b/man/background.Rd index fa6c1d642a6b44f9bc4937f0340e588dfbfce643..59169afc0bd20a9ed1b06741f423b1710f496480 100644 --- a/man/background.Rd +++ b/man/background.Rd @@ -7,12 +7,10 @@ \format{ A data frame with columns: \describe{ -\item{\code{srsname}}{Substance Registry Services -(\href{https://sor.epa.gov/sor_internet/registry/substreg/home/overview/home.do}{SRS}) -name for constituents, such as "Strontium-90".} +\item{\code{parm_nm}}{Long parameter name, +such as "Strontium-90, water, unfiltered, picocuries per liter".} \item{\code{pcode}}{U.S. Geological Survey 5-digit parameter code used to identify the constituent measured, see \code{\link{parameters}} dataset for details. For example, the parameter code for Tritium is "07000".} -\item{\code{parm_unit}}{Parameter units of measure, see \code{\link{units}} dataset for unit descriptions.} \item{\code{bkgrd_min}}{Minimum limit of background concentration.} \item{\code{bkgrd_max}}{Maximum limit of background concentration.} \item{\code{reference}}{Source of background concentration limits. diff --git a/man/benchmarks.Rd b/man/benchmarks.Rd index 620586caf0610aad1642f8917a6e1e75d6ac39c9..34528d857ba6c8dbeb16daabe3ee69a1bbe6785d 100644 --- a/man/benchmarks.Rd +++ b/man/benchmarks.Rd @@ -7,12 +7,10 @@ \format{ A data frame with columns: \describe{ -\item{\code{srsname}}{Substance Registry Services -(\href{https://sor.epa.gov/sor_internet/registry/substreg/home/overview/home.do}{SRS}) name for constituents, -such as "Strontium-90".} +\item{\code{parm_nm}}{Long parameter name, +such as "Strontium-90, water, unfiltered, picocuries per liter".} \item{\code{pcode}}{U.S. Geological Survey 5-digit parameter code used to identify the constituent measured, see \code{\link{parameters}} dataset for details. For example, the parameter code for Tritium is "07000".} -\item{\code{parm_unit}}{Parameter units of measure, see \code{\link{units}} dataset for unit descriptions.} \item{\code{mcl}}{Maximum Contaminant Levels (MCLs), a standard set by the EPA for drinking water quality. An MCL is the legal threshold limit on the amount of a substance that is allowed diff --git a/man/clean_sf.Rd b/man/clean_sf.Rd new file mode 100644 index 0000000000000000000000000000000000000000..ec7f5ba0f431959ca3c48600de99fadba6c7454f --- /dev/null +++ b/man/clean_sf.Rd @@ -0,0 +1,48 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/clean_sf.R +\name{clean_sf} +\alias{clean_sf} +\title{Clean a Simple Feature} +\usage{ +clean_sf(x, cols = NULL, agr = NULL, crs = NULL, extent = NULL) +} +\arguments{ +\item{x}{'sf' object. +Simple feature.} + +\item{cols}{'character' vector. +Names indicating the columns to keep. +Vector names are optional and used to rename columns.} + +\item{agr}{'character' vector. +Attribute geometry relationship, +specifies for each non-geometry attribute column how it relates to the geometry, +and can have one of following values: "constant", "aggregate", "identity". +Where "constant" is used for attributes that are constant throughout the geometry, +"aggregate" where the attribute is an aggregate value over the geometry, +"identity" when the attributes uniquely identifies the geometry of particular thing. +The default value assumes you don't know. +If named, vector names should correspond to the non-geometry list-column columns of \code{x}.} + +\item{crs}{'crs' object. +Target coordinate reference system.} + +\item{extent}{'bbox' object. +Spatial extent (aka bounding box) used to crop the simple feature.} +} +\value{ +Returns an object of class 'sf'. +} +\description{ +Subset columns, transform coordinates, +and (or) crop the spatial extent of a simple feature. +} +\examples{ +sp <- system.file("shape/nc.shp", package = "sf") |> + sf::st_read(quiet = TRUE) |> + clean_sf(cols = "geometry", crs = sf::st_crs(3857)) +} +\author{ +J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center +} +\keyword{internal} diff --git a/man/dem.Rd b/man/dem.Rd index 9214077e4a1fbaa4638ce137f7598fa12128cb5f..2eeb10fdb2a9ce89ad45b20904483a6c9ee210a1 100644 --- a/man/dem.Rd +++ b/man/dem.Rd @@ -27,10 +27,6 @@ dem The digital elevation model (DEM) for the Idaho National Laboratory and its vicinity in eastern Idaho. A DEM is a representation of the land surface that uses a digital grid to describe the elevation values of the terrain. -The spatial grid is composed of -\Sexpr{terra::unwrap(inldata::dem) |> nrow() |> format(big.mark = ",")} rows and -\Sexpr{terra::unwrap(inldata::dem) |> ncol() |> format(big.mark = ",")} columns, and -has cell sizes that are constant at 100 meters by 100 meters. } \examples{ elevation <- terra::unwrap(dem) diff --git a/man/dl.Rd b/man/dl.Rd index b64a4553c0c896a7c8fa143ee93514d3a8445d2c..cbfeb92dfb7d7cb7a4cf209259f34a1531977f52 100644 --- a/man/dl.Rd +++ b/man/dl.Rd @@ -7,14 +7,12 @@ \format{ A data frame with columns: \describe{ -\item{\code{srsname}}{Substance Registry Services -(\href{https://sor.epa.gov/sor_internet/registry/substreg/home/overview/home.do}{SRS}) -name for constituents, such as "Strontium-90".} +\item{\code{parm_nm}}{Long parameter name, +such as "Strontium-90, water, unfiltered, picocuries per liter".} \item{\code{pcode}}{U.S. Geological Survey 5-digit parameter code used to identify the constituent measured, see \code{\link{parameters}} dataset for details. For example, the parameter code for Tritium is "07000".} -\item{\code{parm_unit}}{Parameter units of measure, see \code{\link{units}} dataset for unit descriptions.} \item{\code{lab_det_lim_va}}{Laboratory detection limit concentration.} -\item{\code{sdate}}{Date that the detection limit went into effect.} +\item{\code{min_dt}}{Date that the detection limit went into effect.} \item{\code{reference}}{Source of detection limit. Reference citations are as follows: "Bartholomay and others (2003, table 9)", diff --git a/man/download_file.Rd b/man/download_file.Rd new file mode 100644 index 0000000000000000000000000000000000000000..c8ba3d8a84098151c67dc44640618aeb816b6258 --- /dev/null +++ b/man/download_file.Rd @@ -0,0 +1,35 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/download_file.R +\name{download_file} +\alias{download_file} +\title{Download File from the Internet} +\usage{ +download_file(url, cachedir = get_cache_dir(), ..., quiet = FALSE, mode = "wb") +} +\arguments{ +\item{url}{'character' string. +URL of a resource to be downloaded.} + +\item{cachedir}{'character' string. +Path to the cache directory, see \code{\link{get_cache_dir}} function for the default value. +The file will not be downloaded if the file exists in the cache directory.} + +\item{...}{Additioanl arguments to be passed to the \code{\link[utils:download.file]{download.file}} function. +The destination of the downloaded file may not be specified.} + +\item{quiet}{'logical' flag. +Whether to supress status messages (if any), and the progress bar.} + +\item{mode}{'character' string. +Mode with which to write the file. Useful values are "w", "wb" (binary), "a" (append) and "ab".} +} +\value{ +Returns the path to the downloaded file, or extracted files when decompression occurs. +} +\description{ +Download a file from the Internet and save to a cache directory. +} +\author{ +J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center +} +\keyword{internal} diff --git a/man/extract_archive.Rd b/man/extract_archive.Rd new file mode 100644 index 0000000000000000000000000000000000000000..1fa14bded3acefaf8b43192a2a30061bcd8fbaa1 --- /dev/null +++ b/man/extract_archive.Rd @@ -0,0 +1,34 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils.R +\name{extract_archive} +\alias{extract_archive} +\title{Extract Archive Contents} +\usage{ +extract_archive(file, destdir = tempdir()) +} +\arguments{ +\item{file}{'character' string. +File path to the archive.} + +\item{destdir}{'character' string. +Destination directory to extract files to. +It will be created if necessary. +Defaults to the temporary directory.} +} +\value{ +Invisibly returns the extracted path(s). +} +\description{ +Extract contents of an archive to a directory. +Requires that the \pkg{archive} package is available. +} +\examples{ +files <- system.file("extdata", "test.zip", package = "inldata") |> + extract_archive() + +unlink(files) +} +\author{ +J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center +} +\keyword{internal} diff --git a/man/figures/erd.svg b/man/figures/erd.svg index 4ba0b1241e98783e9ef39c1daca1bbbf9d7767e2..497df8c380d05fcb4225aa6388929c3c39056364 100644 --- a/man/figures/erd.svg +++ b/man/figures/erd.svg @@ -4,509 +4,489 @@ <!-- Generated by graphviz version 2.40.1 (20161225.0304) --> <!-- Title: %0 Pages: 1 --> -<svg width="530pt" height="1548pt" - viewBox="0.00 0.00 530.00 1548.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> -<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 1544)"> +<svg width="578pt" height="1494pt" + viewBox="0.00 0.00 578.00 1494.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> +<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 1490)"> <title>%0</title> <g id="a_graph0"><a xlink:title="ERD"> -<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-1544 526,-1544 526,4 -4,4"/> +<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-1490 574,-1490 574,4 -4,4"/> </a> </g> <!-- background --> <g id="background" class="node"> <title>background</title> -<polygon fill="#efebdd" stroke="transparent" points="152,-1521 152,-1539 212,-1539 212,-1521 152,-1521"/> -<text text-anchor="start" x="153.6758" y="-1526.2" font-family="Times,serif" font-size="12.00" fill="#000000">background</text> -<polygon fill="#ffffff" stroke="transparent" points="152,-1503 152,-1521 212,-1521 212,-1503 152,-1503"/> -<text text-anchor="start" x="154" y="-1508.2" font-family="Times,serif" font-size="12.00" fill="#444444">srsname</text> -<polygon fill="#ffffff" stroke="transparent" points="152,-1485 152,-1503 212,-1503 212,-1485 152,-1485"/> -<text text-anchor="start" x="154" y="-1491.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">pcode</text> -<polygon fill="#ffffff" stroke="transparent" points="152,-1467 152,-1485 212,-1485 212,-1467 152,-1467"/> -<text text-anchor="start" x="154" y="-1472.2" font-family="Times,serif" font-size="12.00" fill="#444444">parm_unit</text> -<polygon fill="#ffffff" stroke="transparent" points="152,-1449 152,-1467 212,-1467 212,-1449 152,-1449"/> -<text text-anchor="start" x="154" y="-1454.2" font-family="Times,serif" font-size="12.00" fill="#444444">bkgrd_min</text> -<polygon fill="#ffffff" stroke="transparent" points="152,-1431 152,-1449 212,-1449 212,-1431 152,-1431"/> -<text text-anchor="start" x="154" y="-1436.2" font-family="Times,serif" font-size="12.00" fill="#444444">bkgrd_max</text> -<polygon fill="#ffffff" stroke="transparent" points="152,-1413 152,-1431 212,-1431 212,-1413 152,-1413"/> -<text text-anchor="start" x="154" y="-1418.2" font-family="Times,serif" font-size="12.00" fill="#444444">reference</text> -<polygon fill="none" stroke="#555555" points="151,-1412 151,-1540 213,-1540 213,-1412 151,-1412"/> +<polygon fill="#efebdd" stroke="transparent" points="228,-1467 228,-1485 288,-1485 288,-1467 228,-1467"/> +<text text-anchor="start" x="229.6758" y="-1472.2" font-family="Times,serif" font-size="12.00" fill="#000000">background</text> +<polygon fill="#ffffff" stroke="transparent" points="228,-1449 228,-1467 288,-1467 288,-1449 228,-1449"/> +<text text-anchor="start" x="230" y="-1454.2" font-family="Times,serif" font-size="12.00" fill="#444444">parm_nm</text> +<polygon fill="#ffffff" stroke="transparent" points="228,-1431 228,-1449 288,-1449 288,-1431 228,-1431"/> +<text text-anchor="start" x="230" y="-1437.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">pcode</text> +<polygon fill="#ffffff" stroke="transparent" points="228,-1413 228,-1431 288,-1431 288,-1413 228,-1413"/> +<text text-anchor="start" x="230" y="-1418.2" font-family="Times,serif" font-size="12.00" fill="#444444">bkgrd_min</text> +<polygon fill="#ffffff" stroke="transparent" points="228,-1395 228,-1413 288,-1413 288,-1395 228,-1395"/> +<text text-anchor="start" x="230" y="-1400.2" font-family="Times,serif" font-size="12.00" fill="#444444">bkgrd_max</text> +<polygon fill="#ffffff" stroke="transparent" points="228,-1377 228,-1395 288,-1395 288,-1377 228,-1377"/> +<text text-anchor="start" x="230" y="-1382.2" font-family="Times,serif" font-size="12.00" fill="#444444">reference</text> +<polygon fill="none" stroke="#555555" points="227,-1376 227,-1486 289,-1486 289,-1376 227,-1376"/> </g> <!-- parameters --> <g id="parameters" class="node"> <title>parameters</title> -<polygon fill="#efebdd" stroke="transparent" points="295.5,-1353 295.5,-1371 378.5,-1371 378.5,-1353 295.5,-1353"/> -<text text-anchor="start" x="310.6834" y="-1358.2" font-family="Times,serif" font-size="12.00" fill="#000000">parameters</text> -<polygon fill="#ffffff" stroke="transparent" points="295.5,-1335 295.5,-1353 378.5,-1353 378.5,-1335 295.5,-1335"/> -<text text-anchor="start" x="297.5" y="-1341.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">pcode</text> -<polygon fill="#ffffff" stroke="transparent" points="295.5,-1317 295.5,-1335 378.5,-1335 378.5,-1317 295.5,-1317"/> -<text text-anchor="start" x="297.5" y="-1322.2" font-family="Times,serif" font-size="12.00" fill="#444444">parm_nm</text> -<polygon fill="#ffffff" stroke="transparent" points="295.5,-1299 295.5,-1317 378.5,-1317 378.5,-1299 295.5,-1299"/> -<text text-anchor="start" x="297.007" y="-1304.2" font-family="Times,serif" font-size="12.00" fill="#444444">parm_group_nm</text> -<polygon fill="#ffffff" stroke="transparent" points="295.5,-1281 295.5,-1299 378.5,-1299 378.5,-1281 295.5,-1281"/> -<text text-anchor="start" x="297.5" y="-1286.2" font-family="Times,serif" font-size="12.00" fill="#444444">casrn</text> -<polygon fill="#ffffff" stroke="transparent" points="295.5,-1263 295.5,-1281 378.5,-1281 378.5,-1263 295.5,-1263"/> -<text text-anchor="start" x="297.5" y="-1268.2" font-family="Times,serif" font-size="12.00" fill="#444444">srsname</text> -<polygon fill="#ffffff" stroke="transparent" points="295.5,-1245 295.5,-1263 378.5,-1263 378.5,-1245 295.5,-1245"/> -<text text-anchor="start" x="297.5" y="-1250.2" font-family="Times,serif" font-size="12.00" fill="#444444">parm_unit</text> -<polygon fill="#ffffff" stroke="transparent" points="295.5,-1227 295.5,-1245 378.5,-1245 378.5,-1227 295.5,-1227"/> -<text text-anchor="start" x="297.5" y="-1232.2" font-family="Times,serif" font-size="12.00" fill="#444444">min_dt</text> -<polygon fill="#ffffff" stroke="transparent" points="295.5,-1209 295.5,-1227 378.5,-1227 378.5,-1209 295.5,-1209"/> -<text text-anchor="start" x="297.5" y="-1214.2" font-family="Times,serif" font-size="12.00" fill="#444444">max_dt</text> -<polygon fill="#ffffff" stroke="transparent" points="295.5,-1191 295.5,-1209 378.5,-1209 378.5,-1191 295.5,-1191"/> -<text text-anchor="start" x="297.5" y="-1196.2" font-family="Times,serif" font-size="12.00" fill="#444444">nrecords</text> -<polygon fill="#ffffff" stroke="transparent" points="295.5,-1173 295.5,-1191 378.5,-1191 378.5,-1173 295.5,-1173"/> -<text text-anchor="start" x="297.5" y="-1178.2" font-family="Times,serif" font-size="12.00" fill="#444444">nsites</text> -<polygon fill="none" stroke="#555555" points="294,-1172 294,-1372 379,-1372 379,-1172 294,-1172"/> +<polygon fill="#efebdd" stroke="transparent" points="371.5,-1121 371.5,-1139 454.5,-1139 454.5,-1121 371.5,-1121"/> +<text text-anchor="start" x="386.6834" y="-1126.2" font-family="Times,serif" font-size="12.00" fill="#000000">parameters</text> +<polygon fill="#ffffff" stroke="transparent" points="371.5,-1103 371.5,-1121 454.5,-1121 454.5,-1103 371.5,-1103"/> +<text text-anchor="start" x="373.5" y="-1109.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">pcode</text> +<polygon fill="#ffffff" stroke="transparent" points="371.5,-1085 371.5,-1103 454.5,-1103 454.5,-1085 371.5,-1085"/> +<text text-anchor="start" x="373.5" y="-1090.2" font-family="Times,serif" font-size="12.00" fill="#444444">parm_nm</text> +<polygon fill="#ffffff" stroke="transparent" points="371.5,-1067 371.5,-1085 454.5,-1085 454.5,-1067 371.5,-1067"/> +<text text-anchor="start" x="373.007" y="-1072.2" font-family="Times,serif" font-size="12.00" fill="#444444">parm_group_nm</text> +<polygon fill="#ffffff" stroke="transparent" points="371.5,-1049 371.5,-1067 454.5,-1067 454.5,-1049 371.5,-1049"/> +<text text-anchor="start" x="373.5" y="-1054.2" font-family="Times,serif" font-size="12.00" fill="#444444">casrn</text> +<polygon fill="#ffffff" stroke="transparent" points="371.5,-1031 371.5,-1049 454.5,-1049 454.5,-1031 371.5,-1031"/> +<text text-anchor="start" x="373.5" y="-1036.2" font-family="Times,serif" font-size="12.00" fill="#444444">srsname</text> +<polygon fill="#ffffff" stroke="transparent" points="371.5,-1013 371.5,-1031 454.5,-1031 454.5,-1013 371.5,-1013"/> +<text text-anchor="start" x="373.5" y="-1018.2" font-family="Times,serif" font-size="12.00" fill="#444444">unit_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="371.5,-995 371.5,-1013 454.5,-1013 454.5,-995 371.5,-995"/> +<text text-anchor="start" x="373.5" y="-1000.2" font-family="Times,serif" font-size="12.00" fill="#444444">min_dt</text> +<polygon fill="#ffffff" stroke="transparent" points="371.5,-977 371.5,-995 454.5,-995 454.5,-977 371.5,-977"/> +<text text-anchor="start" x="373.5" y="-982.2" font-family="Times,serif" font-size="12.00" fill="#444444">max_dt</text> +<polygon fill="#ffffff" stroke="transparent" points="371.5,-959 371.5,-977 454.5,-977 454.5,-959 371.5,-959"/> +<text text-anchor="start" x="373.5" y="-964.2" font-family="Times,serif" font-size="12.00" fill="#444444">nrecords</text> +<polygon fill="#ffffff" stroke="transparent" points="371.5,-941 371.5,-959 454.5,-959 454.5,-941 371.5,-941"/> +<text text-anchor="start" x="373.5" y="-946.2" font-family="Times,serif" font-size="12.00" fill="#444444">nsites</text> +<polygon fill="none" stroke="#555555" points="370,-940 370,-1140 455,-1140 455,-940 370,-940"/> </g> <!-- background->parameters --> <g id="background_1" class="edge"> <title>background:pcode->parameters:pcode</title> -<path fill="none" stroke="#555555" d="M212,-1494C246.7224,-1494 255.8064,-1369.7423 285.922,-1347.4148"/> -<polygon fill="#555555" stroke="#555555" points="287.2561,-1350.655 295.5,-1344 284.9053,-1344.0615 287.2561,-1350.655"/> -</g> -<!-- units --> -<g id="units" class="node"> -<title>units</title> -<polygon fill="#efebdd" stroke="transparent" points="416.5,-1153 416.5,-1171 469.5,-1171 469.5,-1153 416.5,-1153"/> -<text text-anchor="start" x="431.3318" y="-1158.2" font-family="Times,serif" font-size="12.00" fill="#000000">units</text> -<polygon fill="#ffffff" stroke="transparent" points="416.5,-1135 416.5,-1153 469.5,-1153 469.5,-1135 416.5,-1135"/> -<text text-anchor="start" x="418.337" y="-1141.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">parm_unit</text> -<polygon fill="#ffffff" stroke="transparent" points="416.5,-1117 416.5,-1135 469.5,-1135 469.5,-1117 416.5,-1117"/> -<text text-anchor="start" x="418.5" y="-1122.2" font-family="Times,serif" font-size="12.00" fill="#444444">desc</text> -<polygon fill="#ffffff" stroke="transparent" points="416.5,-1099 416.5,-1117 469.5,-1117 469.5,-1099 416.5,-1099"/> -<text text-anchor="start" x="418.5" y="-1104.2" font-family="Times,serif" font-size="12.00" fill="#444444">siunitx</text> -<polygon fill="none" stroke="#555555" points="415,-1098 415,-1172 470,-1172 470,-1098 415,-1098"/> -</g> -<!-- background->units --> -<g id="background_2" class="edge"> -<title>background:parm_unit->units:parm_unit</title> -<path fill="none" stroke="#555555" d="M212,-1476C297.3912,-1476 330.4147,-1451.2219 379,-1381 407.2055,-1340.2336 369.2913,-1170.4237 406.6667,-1146.7457"/> -<polygon fill="#555555" stroke="#555555" points="407.8097,-1150.0605 416.5,-1144 405.9271,-1143.3184 407.8097,-1150.0605"/> +<path fill="none" stroke="#555555" d="M288,-1440C326.3486,-1440 320.701,-1402.9688 334,-1367 352.5827,-1316.7408 319.0864,-1137.3331 361.5911,-1114.4151"/> +<polygon fill="#555555" stroke="#555555" points="362.6132,-1117.7685 371.5,-1112 360.9556,-1110.9675 362.6132,-1117.7685"/> </g> <!-- benchmarks --> <g id="benchmarks" class="node"> <title>benchmarks</title> -<polygon fill="#efebdd" stroke="transparent" points="137,-1375 137,-1393 228,-1393 228,-1375 137,-1375"/> -<text text-anchor="start" x="153.5116" y="-1380.2" font-family="Times,serif" font-size="12.00" fill="#000000">benchmarks</text> -<polygon fill="#ffffff" stroke="transparent" points="137,-1357 137,-1375 228,-1375 228,-1357 137,-1357"/> -<text text-anchor="start" x="139" y="-1362.2" font-family="Times,serif" font-size="12.00" fill="#444444">srsname</text> -<polygon fill="#ffffff" stroke="transparent" points="137,-1339 137,-1357 228,-1357 228,-1339 137,-1339"/> -<text text-anchor="start" x="139" y="-1345.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">pcode</text> -<polygon fill="#ffffff" stroke="transparent" points="137,-1321 137,-1339 228,-1339 228,-1321 137,-1321"/> -<text text-anchor="start" x="139" y="-1326.2" font-family="Times,serif" font-size="12.00" fill="#444444">parm_unit</text> -<polygon fill="#ffffff" stroke="transparent" points="137,-1303 137,-1321 228,-1321 228,-1303 137,-1303"/> -<text text-anchor="start" x="139" y="-1308.2" font-family="Times,serif" font-size="12.00" fill="#444444">mcl</text> -<polygon fill="#ffffff" stroke="transparent" points="137,-1285 137,-1303 228,-1303 228,-1285 137,-1285"/> -<text text-anchor="start" x="139" y="-1290.2" font-family="Times,serif" font-size="12.00" fill="#444444">hhbp_noncancer</text> -<polygon fill="#ffffff" stroke="transparent" points="137,-1267 137,-1285 228,-1285 228,-1267 137,-1267"/> -<text text-anchor="start" x="139" y="-1272.2" font-family="Times,serif" font-size="12.00" fill="#444444">hhbp_cancer_min</text> -<polygon fill="#ffffff" stroke="transparent" points="137,-1249 137,-1267 228,-1267 228,-1249 137,-1249"/> -<text text-anchor="start" x="138.5182" y="-1254.2" font-family="Times,serif" font-size="12.00" fill="#444444">hhbp_cancer_max</text> -<polygon fill="#ffffff" stroke="transparent" points="137,-1231 137,-1249 228,-1249 228,-1231 137,-1231"/> -<text text-anchor="start" x="139" y="-1236.2" font-family="Times,serif" font-size="12.00" fill="#444444">hbsl_noncancer</text> -<polygon fill="#ffffff" stroke="transparent" points="137,-1213 137,-1231 228,-1231 228,-1213 137,-1213"/> -<text text-anchor="start" x="139" y="-1218.2" font-family="Times,serif" font-size="12.00" fill="#444444">hbsl_cancer_min</text> -<polygon fill="#ffffff" stroke="transparent" points="137,-1195 137,-1213 228,-1213 228,-1195 137,-1195"/> -<text text-anchor="start" x="139" y="-1200.2" font-family="Times,serif" font-size="12.00" fill="#444444">hbsl_cancer_max</text> -<polygon fill="#ffffff" stroke="transparent" points="137,-1177 137,-1195 228,-1195 228,-1177 137,-1177"/> -<text text-anchor="start" x="139" y="-1182.2" font-family="Times,serif" font-size="12.00" fill="#444444">remark</text> -<polygon fill="none" stroke="#555555" points="135.5,-1176 135.5,-1394 228.5,-1394 228.5,-1176 135.5,-1176"/> +<polygon fill="#efebdd" stroke="transparent" points="213,-1339 213,-1357 304,-1357 304,-1339 213,-1339"/> +<text text-anchor="start" x="229.5116" y="-1344.2" font-family="Times,serif" font-size="12.00" fill="#000000">benchmarks</text> +<polygon fill="#ffffff" stroke="transparent" points="213,-1321 213,-1339 304,-1339 304,-1321 213,-1321"/> +<text text-anchor="start" x="215" y="-1326.2" font-family="Times,serif" font-size="12.00" fill="#444444">parm_nm</text> +<polygon fill="#ffffff" stroke="transparent" points="213,-1303 213,-1321 304,-1321 304,-1303 213,-1303"/> +<text text-anchor="start" x="215" y="-1309.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">pcode</text> +<polygon fill="#ffffff" stroke="transparent" points="213,-1285 213,-1303 304,-1303 304,-1285 213,-1285"/> +<text text-anchor="start" x="215" y="-1290.2" font-family="Times,serif" font-size="12.00" fill="#444444">mcl</text> +<polygon fill="#ffffff" stroke="transparent" points="213,-1267 213,-1285 304,-1285 304,-1267 213,-1267"/> +<text text-anchor="start" x="215" y="-1272.2" font-family="Times,serif" font-size="12.00" fill="#444444">hhbp_noncancer</text> +<polygon fill="#ffffff" stroke="transparent" points="213,-1249 213,-1267 304,-1267 304,-1249 213,-1249"/> +<text text-anchor="start" x="215" y="-1254.2" font-family="Times,serif" font-size="12.00" fill="#444444">hhbp_cancer_min</text> +<polygon fill="#ffffff" stroke="transparent" points="213,-1231 213,-1249 304,-1249 304,-1231 213,-1231"/> +<text text-anchor="start" x="214.5182" y="-1236.2" font-family="Times,serif" font-size="12.00" fill="#444444">hhbp_cancer_max</text> +<polygon fill="#ffffff" stroke="transparent" points="213,-1213 213,-1231 304,-1231 304,-1213 213,-1213"/> +<text text-anchor="start" x="215" y="-1218.2" font-family="Times,serif" font-size="12.00" fill="#444444">hbsl_noncancer</text> +<polygon fill="#ffffff" stroke="transparent" points="213,-1195 213,-1213 304,-1213 304,-1195 213,-1195"/> +<text text-anchor="start" x="215" y="-1200.2" font-family="Times,serif" font-size="12.00" fill="#444444">hbsl_cancer_min</text> +<polygon fill="#ffffff" stroke="transparent" points="213,-1177 213,-1195 304,-1195 304,-1177 213,-1177"/> +<text text-anchor="start" x="215" y="-1182.2" font-family="Times,serif" font-size="12.00" fill="#444444">hbsl_cancer_max</text> +<polygon fill="#ffffff" stroke="transparent" points="213,-1159 213,-1177 304,-1177 304,-1159 213,-1159"/> +<text text-anchor="start" x="215" y="-1164.2" font-family="Times,serif" font-size="12.00" fill="#444444">remark</text> +<polygon fill="none" stroke="#555555" points="211.5,-1158 211.5,-1358 304.5,-1358 304.5,-1158 211.5,-1158"/> </g> <!-- benchmarks->parameters --> <g id="benchmarks_1" class="edge"> <title>benchmarks:pcode->parameters:pcode</title> -<path fill="none" stroke="#555555" d="M228,-1348C254.4134,-1348 263.3242,-1344.9101 285.4987,-1344.1618"/> -<polygon fill="#555555" stroke="#555555" points="285.5579,-1347.6614 295.5,-1344 285.4447,-1340.6623 285.5579,-1347.6614"/> -</g> -<!-- benchmarks->units --> -<g id="benchmarks_2" class="edge"> -<title>benchmarks:parm_unit->units:parm_unit</title> -<path fill="none" stroke="#555555" d="M228,-1330C307.8084,-1330 231.6507,-1212.8192 294,-1163 334.2684,-1130.8242 358.1866,-1142.2226 406.2166,-1143.8256"/> -<polygon fill="#555555" stroke="#555555" points="406.4421,-1147.3299 416.5,-1144 406.5608,-1140.3309 406.4421,-1147.3299"/> +<path fill="none" stroke="#555555" d="M304,-1312C347.2428,-1312 328.2573,-1142.0293 361.777,-1115.4714"/> +<polygon fill="#555555" stroke="#555555" points="363.2591,-1118.6587 371.5,-1112 360.9054,-1112.0662 363.2591,-1118.6587"/> </g> <!-- cities --> <g id="cities" class="node"> <title>cities</title> -<polygon fill="#efebdd" stroke="transparent" points="3,-1069 3,-1087 52,-1087 52,-1069 3,-1069"/> -<text text-anchor="start" x="14.8376" y="-1074.2" font-family="Times,serif" font-size="12.00" fill="#000000">cities</text> -<polygon fill="#ffffff" stroke="transparent" points="3,-1051 3,-1069 52,-1069 52,-1051 3,-1051"/> -<text text-anchor="start" x="5" y="-1056.2" font-family="Times,serif" font-size="12.00" fill="#444444">name</text> -<polygon fill="#ffffff" stroke="transparent" points="3,-1033 3,-1051 52,-1051 52,-1033 3,-1033"/> -<text text-anchor="start" x="5" y="-1039.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">id</text> -<polygon fill="#ffffff" stroke="transparent" points="3,-1015 3,-1033 52,-1033 52,-1015 3,-1015"/> -<text text-anchor="start" x="4.841" y="-1020.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> -<polygon fill="none" stroke="#555555" points="1.5,-1014 1.5,-1088 52.5,-1088 52.5,-1014 1.5,-1014"/> +<polygon fill="#efebdd" stroke="transparent" points="94,-780 94,-798 143,-798 143,-780 94,-780"/> +<text text-anchor="start" x="105.8376" y="-785.2" font-family="Times,serif" font-size="12.00" fill="#000000">cities</text> +<polygon fill="#ffffff" stroke="transparent" points="94,-762 94,-780 143,-780 143,-762 94,-762"/> +<text text-anchor="start" x="96" y="-767.2" font-family="Times,serif" font-size="12.00" fill="#444444">name</text> +<polygon fill="#ffffff" stroke="transparent" points="94,-744 94,-762 143,-762 143,-744 94,-744"/> +<text text-anchor="start" x="96" y="-750.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">id</text> +<polygon fill="#ffffff" stroke="transparent" points="94,-726 94,-744 143,-744 143,-726 94,-726"/> +<text text-anchor="start" x="95.841" y="-731.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> +<polygon fill="none" stroke="#555555" points="92.5,-725 92.5,-799 143.5,-799 143.5,-725 92.5,-725"/> </g> <!-- counties --> <g id="counties" class="node"> <title>counties</title> -<polygon fill="#efebdd" stroke="transparent" points="3,-939 3,-957 52,-957 52,-939 3,-939"/> -<text text-anchor="start" x="7.505" y="-944.2" font-family="Times,serif" font-size="12.00" fill="#000000">counties</text> -<polygon fill="#ffffff" stroke="transparent" points="3,-921 3,-939 52,-939 52,-921 3,-921"/> -<text text-anchor="start" x="5" y="-926.2" font-family="Times,serif" font-size="12.00" fill="#444444">name</text> -<polygon fill="#ffffff" stroke="transparent" points="3,-903 3,-921 52,-921 52,-903 3,-903"/> -<text text-anchor="start" x="5" y="-909.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">id</text> -<polygon fill="#ffffff" stroke="transparent" points="3,-885 3,-903 52,-903 52,-885 3,-885"/> -<text text-anchor="start" x="4.841" y="-890.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> -<polygon fill="none" stroke="#555555" points="1.5,-884 1.5,-958 52.5,-958 52.5,-884 1.5,-884"/> +<polygon fill="#efebdd" stroke="transparent" points="94,-655 94,-673 143,-673 143,-655 94,-655"/> +<text text-anchor="start" x="98.505" y="-660.2" font-family="Times,serif" font-size="12.00" fill="#000000">counties</text> +<polygon fill="#ffffff" stroke="transparent" points="94,-637 94,-655 143,-655 143,-637 94,-637"/> +<text text-anchor="start" x="96" y="-642.2" font-family="Times,serif" font-size="12.00" fill="#444444">name</text> +<polygon fill="#ffffff" stroke="transparent" points="94,-619 94,-637 143,-637 143,-619 94,-619"/> +<text text-anchor="start" x="96" y="-625.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">id</text> +<polygon fill="#ffffff" stroke="transparent" points="94,-601 94,-619 143,-619 143,-601 94,-601"/> +<text text-anchor="start" x="95.841" y="-606.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> +<polygon fill="none" stroke="#555555" points="92.5,-600 92.5,-674 143.5,-674 143.5,-600 92.5,-600"/> </g> <!-- dl --> <g id="dl" class="node"> <title>dl</title> -<polygon fill="#efebdd" stroke="transparent" points="143,-1139 143,-1157 221,-1157 221,-1139 143,-1139"/> -<text text-anchor="start" x="177.3326" y="-1144.2" font-family="Times,serif" font-size="12.00" fill="#000000">dl</text> -<polygon fill="#ffffff" stroke="transparent" points="143,-1121 143,-1139 221,-1139 221,-1121 143,-1121"/> -<text text-anchor="start" x="145" y="-1126.2" font-family="Times,serif" font-size="12.00" fill="#444444">srsname</text> -<polygon fill="#ffffff" stroke="transparent" points="143,-1103 143,-1121 221,-1121 221,-1103 143,-1103"/> -<text text-anchor="start" x="145" y="-1108.2" font-family="Times,serif" font-size="12.00" fill="#444444">pcode</text> -<polygon fill="#ffffff" stroke="transparent" points="143,-1085 143,-1103 221,-1103 221,-1085 143,-1085"/> -<text text-anchor="start" x="145" y="-1090.2" font-family="Times,serif" font-size="12.00" fill="#444444">parm_unit</text> -<polygon fill="#ffffff" stroke="transparent" points="143,-1067 143,-1085 221,-1085 221,-1067 143,-1067"/> -<text text-anchor="start" x="144.6728" y="-1072.2" font-family="Times,serif" font-size="12.00" fill="#444444">lab_det_lim_va</text> -<polygon fill="#ffffff" stroke="transparent" points="143,-1049 143,-1067 221,-1067 221,-1049 143,-1049"/> -<text text-anchor="start" x="145" y="-1054.2" font-family="Times,serif" font-size="12.00" fill="#444444">sdate</text> -<polygon fill="#ffffff" stroke="transparent" points="143,-1031 143,-1049 221,-1049 221,-1031 143,-1031"/> -<text text-anchor="start" x="145" y="-1036.2" font-family="Times,serif" font-size="12.00" fill="#444444">reference</text> -<polygon fill="#ffffff" stroke="transparent" points="143,-1013 143,-1031 221,-1031 221,-1013 143,-1013"/> -<text text-anchor="start" x="145" y="-1019.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">pcode, sdate</text> -<polygon fill="none" stroke="#555555" points="142,-1012 142,-1158 222,-1158 222,-1012 142,-1012"/> +<polygon fill="#efebdd" stroke="transparent" points="219,-1121 219,-1139 297,-1139 297,-1121 219,-1121"/> +<text text-anchor="start" x="253.3326" y="-1126.2" font-family="Times,serif" font-size="12.00" fill="#000000">dl</text> +<polygon fill="#ffffff" stroke="transparent" points="219,-1103 219,-1121 297,-1121 297,-1103 219,-1103"/> +<text text-anchor="start" x="221" y="-1108.2" font-family="Times,serif" font-size="12.00" fill="#444444">parm_nm</text> +<polygon fill="#ffffff" stroke="transparent" points="219,-1085 219,-1103 297,-1103 297,-1085 219,-1085"/> +<text text-anchor="start" x="221" y="-1090.2" font-family="Times,serif" font-size="12.00" fill="#444444">pcode</text> +<polygon fill="#ffffff" stroke="transparent" points="219,-1067 219,-1085 297,-1085 297,-1067 219,-1067"/> +<text text-anchor="start" x="220.6728" y="-1072.2" font-family="Times,serif" font-size="12.00" fill="#444444">lab_det_lim_va</text> +<polygon fill="#ffffff" stroke="transparent" points="219,-1049 219,-1067 297,-1067 297,-1049 219,-1049"/> +<text text-anchor="start" x="221" y="-1054.2" font-family="Times,serif" font-size="12.00" fill="#444444">min_dt</text> +<polygon fill="#ffffff" stroke="transparent" points="219,-1031 219,-1049 297,-1049 297,-1031 219,-1031"/> +<text text-anchor="start" x="221" y="-1036.2" font-family="Times,serif" font-size="12.00" fill="#444444">reference</text> +<polygon fill="#ffffff" stroke="transparent" points="219,-1013 219,-1031 297,-1031 297,-1013 219,-1013"/> +<text text-anchor="start" x="221" y="-1019.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">pcode, min_dt</text> +<polygon fill="none" stroke="#555555" points="218,-1012 218,-1140 298,-1140 298,-1012 218,-1012"/> </g> <!-- dl->parameters --> <g id="dl_1" class="edge"> <title>dl:pcode->parameters:pcode</title> -<path fill="none" stroke="#555555" d="M221,-1112C250.461,-1112 246.5143,-1139.8702 258,-1167 272.2667,-1200.6985 258.3216,-1319.6792 286.0147,-1340.7866"/> -<polygon fill="#555555" stroke="#555555" points="284.9057,-1344.1062 295.5,-1344 287.1518,-1337.4763 284.9057,-1344.1062"/> -</g> -<!-- dl->units --> -<g id="dl_2" class="edge"> -<title>dl:parm_unit->units:parm_unit</title> -<path fill="none" stroke="#555555" d="M221,-1094C293.0219,-1094 309.9991,-1109.3592 379,-1130 392.1825,-1133.9434 396.7638,-1140.1617 406.3941,-1142.777"/> -<polygon fill="#555555" stroke="#555555" points="406.1519,-1146.2731 416.5,-1144 406.993,-1139.3238 406.1519,-1146.2731"/> +<path fill="none" stroke="#555555" d="M297,-1094C327.3381,-1094 335.7109,-1108.2778 361.2441,-1111.4011"/> +<polygon fill="#555555" stroke="#555555" points="361.3129,-1114.911 371.5,-1112 361.7211,-1107.9229 361.3129,-1114.911"/> </g> <!-- esrp --> <g id="esrp" class="node"> <title>esrp</title> -<polygon fill="#efebdd" stroke="transparent" points="3,-825 3,-843 52,-843 52,-825 3,-825"/> -<text text-anchor="start" x="17.5058" y="-830.2" font-family="Times,serif" font-size="12.00" fill="#000000">esrp</text> -<polygon fill="#ffffff" stroke="transparent" points="3,-807 3,-825 52,-825 52,-807 3,-807"/> -<text text-anchor="start" x="4.841" y="-812.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> -<polygon fill="none" stroke="#555555" points="1.5,-806 1.5,-844 52.5,-844 52.5,-806 1.5,-806"/> +<polygon fill="#efebdd" stroke="transparent" points="69,-544 69,-562 118,-562 118,-544 69,-544"/> +<text text-anchor="start" x="83.5058" y="-549.2" font-family="Times,serif" font-size="12.00" fill="#000000">esrp</text> +<polygon fill="#ffffff" stroke="transparent" points="69,-526 69,-544 118,-544 118,-526 69,-526"/> +<text text-anchor="start" x="70.841" y="-531.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> +<polygon fill="none" stroke="#555555" points="67.5,-525 67.5,-563 118.5,-563 118.5,-525 67.5,-525"/> </g> <!-- facilities --> <g id="facilities" class="node"> <title>facilities</title> -<polygon fill="#efebdd" stroke="transparent" points="419,-809 419,-827 468,-827 468,-809 419,-809"/> -<text text-anchor="start" x="422.842" y="-814.2" font-family="Times,serif" font-size="12.00" fill="#000000">facilities</text> -<polygon fill="#ffffff" stroke="transparent" points="419,-791 419,-809 468,-809 468,-791 419,-791"/> -<text text-anchor="start" x="421" y="-796.2" font-family="Times,serif" font-size="12.00" fill="#444444">name</text> -<polygon fill="#ffffff" stroke="transparent" points="419,-773 419,-791 468,-791 468,-773 419,-773"/> -<text text-anchor="start" x="421" y="-779.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">id</text> -<polygon fill="#ffffff" stroke="transparent" points="419,-755 419,-773 468,-773 468,-755 419,-755"/> -<text text-anchor="start" x="420.841" y="-760.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> -<polygon fill="none" stroke="#555555" points="417.5,-754 417.5,-828 468.5,-828 468.5,-754 417.5,-754"/> +<polygon fill="#efebdd" stroke="transparent" points="94,-1041 94,-1059 143,-1059 143,-1041 94,-1041"/> +<text text-anchor="start" x="97.842" y="-1046.2" font-family="Times,serif" font-size="12.00" fill="#000000">facilities</text> +<polygon fill="#ffffff" stroke="transparent" points="94,-1023 94,-1041 143,-1041 143,-1023 94,-1023"/> +<text text-anchor="start" x="96" y="-1028.2" font-family="Times,serif" font-size="12.00" fill="#444444">name</text> +<polygon fill="#ffffff" stroke="transparent" points="94,-1005 94,-1023 143,-1023 143,-1005 94,-1005"/> +<text text-anchor="start" x="96" y="-1011.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">id</text> +<polygon fill="#ffffff" stroke="transparent" points="94,-987 94,-1005 143,-1005 143,-987 94,-987"/> +<text text-anchor="start" x="95.841" y="-992.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> +<polygon fill="none" stroke="#555555" points="92.5,-986 92.5,-1060 143.5,-1060 143.5,-986 92.5,-986"/> </g> <!-- gwl --> <g id="gwl" class="node"> <title>gwl</title> -<polygon fill="#efebdd" stroke="transparent" points="111,-487 111,-505 253,-505 253,-487 111,-487"/> -<text text-anchor="start" x="173.0012" y="-492.2" font-family="Times,serif" font-size="12.00" fill="#000000">gwl</text> -<polygon fill="#ffffff" stroke="transparent" points="111,-469 111,-487 253,-487 253,-469 111,-469"/> -<text text-anchor="start" x="113" y="-474.2" font-family="Times,serif" font-size="12.00" fill="#444444">site_nm</text> -<polygon fill="#ffffff" stroke="transparent" points="111,-451 111,-469 253,-469 253,-451 111,-451"/> -<text text-anchor="start" x="113" y="-456.2" font-family="Times,serif" font-size="12.00" fill="#444444">site_no</text> -<polygon fill="#ffffff" stroke="transparent" points="111,-433 111,-451 253,-451 253,-433 111,-433"/> -<text text-anchor="start" x="113" y="-438.2" font-family="Times,serif" font-size="12.00" fill="#444444">lev_dt</text> -<polygon fill="#ffffff" stroke="transparent" points="111,-415 111,-433 253,-433 253,-415 111,-415"/> -<text text-anchor="start" x="113" y="-420.2" font-family="Times,serif" font-size="12.00" fill="#444444">lev_meth_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="111,-397 111,-415 253,-415 253,-397 111,-397"/> -<text text-anchor="start" x="113" y="-402.2" font-family="Times,serif" font-size="12.00" fill="#444444">lev_status_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="111,-379 111,-397 253,-397 253,-379 111,-379"/> -<text text-anchor="start" x="113" y="-384.2" font-family="Times,serif" font-size="12.00" fill="#444444">lev_age_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="111,-361 111,-379 253,-379 253,-361 111,-361"/> -<text text-anchor="start" x="113" y="-366.2" font-family="Times,serif" font-size="12.00" fill="#444444">lev_va</text> -<polygon fill="#ffffff" stroke="transparent" points="111,-343 111,-361 253,-361 253,-343 111,-343"/> -<text text-anchor="start" x="113" y="-348.2" font-family="Times,serif" font-size="12.00" fill="#444444">sl_lev_va</text> -<polygon fill="#ffffff" stroke="transparent" points="111,-325 111,-343 253,-343 253,-325 111,-325"/> -<text text-anchor="start" x="113" y="-330.2" font-family="Times,serif" font-size="12.00" fill="#444444">lev_acy_va</text> -<polygon fill="#ffffff" stroke="transparent" points="111,-307 111,-325 253,-325 253,-307 111,-307"/> -<text text-anchor="start" x="113" y="-312.2" font-family="Times,serif" font-size="12.00" fill="#444444">sl_lev_acy_va</text> -<polygon fill="#ffffff" stroke="transparent" points="111,-289 111,-307 253,-307 253,-289 111,-289"/> -<text text-anchor="start" x="112.6778" y="-295.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">site_no, lev_dt, lev_meth_cd</text> -<polygon fill="none" stroke="#555555" points="110,-288 110,-506 254,-506 254,-288 110,-288"/> +<polygon fill="#efebdd" stroke="transparent" points="187,-487 187,-505 329,-505 329,-487 187,-487"/> +<text text-anchor="start" x="249.0012" y="-492.2" font-family="Times,serif" font-size="12.00" fill="#000000">gwl</text> +<polygon fill="#ffffff" stroke="transparent" points="187,-469 187,-487 329,-487 329,-469 187,-469"/> +<text text-anchor="start" x="189" y="-474.2" font-family="Times,serif" font-size="12.00" fill="#444444">site_nm</text> +<polygon fill="#ffffff" stroke="transparent" points="187,-451 187,-469 329,-469 329,-451 187,-451"/> +<text text-anchor="start" x="189" y="-456.2" font-family="Times,serif" font-size="12.00" fill="#444444">site_no</text> +<polygon fill="#ffffff" stroke="transparent" points="187,-433 187,-451 329,-451 329,-433 187,-433"/> +<text text-anchor="start" x="189" y="-438.2" font-family="Times,serif" font-size="12.00" fill="#444444">lev_dt</text> +<polygon fill="#ffffff" stroke="transparent" points="187,-415 187,-433 329,-433 329,-415 187,-415"/> +<text text-anchor="start" x="189" y="-420.2" font-family="Times,serif" font-size="12.00" fill="#444444">lev_meth_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="187,-397 187,-415 329,-415 329,-397 187,-397"/> +<text text-anchor="start" x="189" y="-402.2" font-family="Times,serif" font-size="12.00" fill="#444444">lev_status_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="187,-379 187,-397 329,-397 329,-379 187,-379"/> +<text text-anchor="start" x="189" y="-384.2" font-family="Times,serif" font-size="12.00" fill="#444444">lev_age_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="187,-361 187,-379 329,-379 329,-361 187,-361"/> +<text text-anchor="start" x="189" y="-366.2" font-family="Times,serif" font-size="12.00" fill="#444444">lev_va</text> +<polygon fill="#ffffff" stroke="transparent" points="187,-343 187,-361 329,-361 329,-343 187,-343"/> +<text text-anchor="start" x="189" y="-348.2" font-family="Times,serif" font-size="12.00" fill="#444444">sl_lev_va</text> +<polygon fill="#ffffff" stroke="transparent" points="187,-325 187,-343 329,-343 329,-325 187,-325"/> +<text text-anchor="start" x="189" y="-330.2" font-family="Times,serif" font-size="12.00" fill="#444444">lev_acy_va</text> +<polygon fill="#ffffff" stroke="transparent" points="187,-307 187,-325 329,-325 329,-307 187,-307"/> +<text text-anchor="start" x="189" y="-312.2" font-family="Times,serif" font-size="12.00" fill="#444444">sl_lev_acy_va</text> +<polygon fill="#ffffff" stroke="transparent" points="187,-289 187,-307 329,-307 329,-289 187,-289"/> +<text text-anchor="start" x="188.6778" y="-295.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">site_no, lev_dt, lev_meth_cd</text> +<polygon fill="none" stroke="#555555" points="186,-288 186,-506 330,-506 330,-288 186,-288"/> </g> <!-- sites --> <g id="sites" class="node"> <title>sites</title> -<polygon fill="#efebdd" stroke="transparent" points="297.5,-469 297.5,-487 375.5,-487 375.5,-469 297.5,-469"/> -<text text-anchor="start" x="325.835" y="-474.2" font-family="Times,serif" font-size="12.00" fill="#000000">sites</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-451 297.5,-469 375.5,-469 375.5,-451 297.5,-451"/> -<text text-anchor="start" x="299.5" y="-457.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">site_no</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-433 297.5,-451 375.5,-451 375.5,-433 297.5,-433"/> -<text text-anchor="start" x="299.5" y="-438.2" font-family="Times,serif" font-size="12.00" fill="#444444">site_nm</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-415 297.5,-433 375.5,-433 375.5,-415 297.5,-415"/> -<text text-anchor="start" x="299.5" y="-420.2" font-family="Times,serif" font-size="12.00" fill="#444444">station_nm</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-397 297.5,-415 375.5,-415 375.5,-397 297.5,-397"/> -<text text-anchor="start" x="299.1776" y="-402.2" font-family="Times,serif" font-size="12.00" fill="#444444">coord_meth_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-379 297.5,-397 375.5,-397 375.5,-379 297.5,-379"/> -<text text-anchor="start" x="299.5" y="-384.2" font-family="Times,serif" font-size="12.00" fill="#444444">coord_acy_va</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-361 297.5,-379 375.5,-379 375.5,-361 297.5,-361"/> -<text text-anchor="start" x="299.5" y="-366.2" font-family="Times,serif" font-size="12.00" fill="#444444">alt_va</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-343 297.5,-361 375.5,-361 375.5,-343 297.5,-343"/> -<text text-anchor="start" x="299.5" y="-348.2" font-family="Times,serif" font-size="12.00" fill="#444444">alt_meth_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-325 297.5,-343 375.5,-343 375.5,-325 297.5,-325"/> -<text text-anchor="start" x="299.5" y="-330.2" font-family="Times,serif" font-size="12.00" fill="#444444">alt_acy_va</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-307 297.5,-325 375.5,-325 375.5,-307 297.5,-307"/> -<text text-anchor="start" x="299.5" y="-312.2" font-family="Times,serif" font-size="12.00" fill="#444444">huc_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-289 297.5,-307 375.5,-307 375.5,-289 297.5,-289"/> -<text text-anchor="start" x="299.1728" y="-294.2" font-family="Times,serif" font-size="12.00" fill="#444444">construction_dt</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-271 297.5,-289 375.5,-289 375.5,-271 297.5,-271"/> -<text text-anchor="start" x="299.5" y="-276.2" font-family="Times,serif" font-size="12.00" fill="#444444">reliability_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-253 297.5,-271 375.5,-271 375.5,-253 297.5,-253"/> -<text text-anchor="start" x="299.5" y="-258.2" font-family="Times,serif" font-size="12.00" fill="#444444">nat_aqfr_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-235 297.5,-253 375.5,-253 375.5,-235 297.5,-235"/> -<text text-anchor="start" x="299.5" y="-240.2" font-family="Times,serif" font-size="12.00" fill="#444444">aqfr_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-217 297.5,-235 375.5,-235 375.5,-217 297.5,-217"/> -<text text-anchor="start" x="299.5" y="-222.2" font-family="Times,serif" font-size="12.00" fill="#444444">aqfr_type_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-199 297.5,-217 375.5,-217 375.5,-199 297.5,-199"/> -<text text-anchor="start" x="299.5" y="-204.2" font-family="Times,serif" font-size="12.00" fill="#444444">well_depth_va</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-181 297.5,-199 375.5,-199 375.5,-181 297.5,-181"/> -<text text-anchor="start" x="299.5" y="-186.2" font-family="Times,serif" font-size="12.00" fill="#444444">hole_depth_va</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-163 297.5,-181 375.5,-181 375.5,-163 297.5,-163"/> -<text text-anchor="start" x="299.5" y="-168.2" font-family="Times,serif" font-size="12.00" fill="#444444">depth_src_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-145 297.5,-163 375.5,-163 375.5,-145 297.5,-145"/> -<text text-anchor="start" x="299.5" y="-150.2" font-family="Times,serif" font-size="12.00" fill="#444444">completion_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-127 297.5,-145 375.5,-145 375.5,-127 297.5,-127"/> -<text text-anchor="start" x="299.5" y="-132.2" font-family="Times,serif" font-size="12.00" fill="#444444">network_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-109 297.5,-127 375.5,-127 375.5,-109 297.5,-109"/> -<text text-anchor="start" x="299.5" y="-114.2" font-family="Times,serif" font-size="12.00" fill="#444444">pos</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-91 297.5,-109 375.5,-109 375.5,-91 297.5,-91"/> -<text text-anchor="start" x="299.5" y="-96.2" font-family="Times,serif" font-size="12.00" fill="#444444">min_dt</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-73 297.5,-91 375.5,-91 375.5,-73 297.5,-73"/> -<text text-anchor="start" x="299.5" y="-78.2" font-family="Times,serif" font-size="12.00" fill="#444444">max_dt</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-55 297.5,-73 375.5,-73 375.5,-55 297.5,-55"/> -<text text-anchor="start" x="299.5" y="-60.2" font-family="Times,serif" font-size="12.00" fill="#444444">nmeas</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-37 297.5,-55 375.5,-55 375.5,-37 297.5,-37"/> -<text text-anchor="start" x="299.5" y="-42.2" font-family="Times,serif" font-size="12.00" fill="#444444">nsamples</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-19 297.5,-37 375.5,-37 375.5,-19 297.5,-19"/> -<text text-anchor="start" x="299.5" y="-24.2" font-family="Times,serif" font-size="12.00" fill="#444444">nreps</text> -<polygon fill="#ffffff" stroke="transparent" points="297.5,-1 297.5,-19 375.5,-19 375.5,-1 297.5,-1"/> -<text text-anchor="start" x="299.5" y="-6.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> -<polygon fill="none" stroke="#555555" points="296.5,0 296.5,-488 376.5,-488 376.5,0 296.5,0"/> +<polygon fill="#efebdd" stroke="transparent" points="373.5,-469 373.5,-487 451.5,-487 451.5,-469 373.5,-469"/> +<text text-anchor="start" x="401.835" y="-474.2" font-family="Times,serif" font-size="12.00" fill="#000000">sites</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-451 373.5,-469 451.5,-469 451.5,-451 373.5,-451"/> +<text text-anchor="start" x="375.5" y="-457.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">site_no</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-433 373.5,-451 451.5,-451 451.5,-433 373.5,-433"/> +<text text-anchor="start" x="375.5" y="-438.2" font-family="Times,serif" font-size="12.00" fill="#444444">site_nm</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-415 373.5,-433 451.5,-433 451.5,-415 373.5,-415"/> +<text text-anchor="start" x="375.5" y="-420.2" font-family="Times,serif" font-size="12.00" fill="#444444">station_nm</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-397 373.5,-415 451.5,-415 451.5,-397 373.5,-397"/> +<text text-anchor="start" x="375.1776" y="-402.2" font-family="Times,serif" font-size="12.00" fill="#444444">coord_meth_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-379 373.5,-397 451.5,-397 451.5,-379 373.5,-379"/> +<text text-anchor="start" x="375.5" y="-384.2" font-family="Times,serif" font-size="12.00" fill="#444444">coord_acy_va</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-361 373.5,-379 451.5,-379 451.5,-361 373.5,-361"/> +<text text-anchor="start" x="375.5" y="-366.2" font-family="Times,serif" font-size="12.00" fill="#444444">alt_va</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-343 373.5,-361 451.5,-361 451.5,-343 373.5,-343"/> +<text text-anchor="start" x="375.5" y="-348.2" font-family="Times,serif" font-size="12.00" fill="#444444">alt_meth_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-325 373.5,-343 451.5,-343 451.5,-325 373.5,-325"/> +<text text-anchor="start" x="375.5" y="-330.2" font-family="Times,serif" font-size="12.00" fill="#444444">alt_acy_va</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-307 373.5,-325 451.5,-325 451.5,-307 373.5,-307"/> +<text text-anchor="start" x="375.5" y="-312.2" font-family="Times,serif" font-size="12.00" fill="#444444">huc_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-289 373.5,-307 451.5,-307 451.5,-289 373.5,-289"/> +<text text-anchor="start" x="375.1728" y="-294.2" font-family="Times,serif" font-size="12.00" fill="#444444">construction_dt</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-271 373.5,-289 451.5,-289 451.5,-271 373.5,-271"/> +<text text-anchor="start" x="375.5" y="-276.2" font-family="Times,serif" font-size="12.00" fill="#444444">reliability_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-253 373.5,-271 451.5,-271 451.5,-253 373.5,-253"/> +<text text-anchor="start" x="375.5" y="-258.2" font-family="Times,serif" font-size="12.00" fill="#444444">nat_aqfr_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-235 373.5,-253 451.5,-253 451.5,-235 373.5,-235"/> +<text text-anchor="start" x="375.5" y="-240.2" font-family="Times,serif" font-size="12.00" fill="#444444">aqfr_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-217 373.5,-235 451.5,-235 451.5,-217 373.5,-217"/> +<text text-anchor="start" x="375.5" y="-222.2" font-family="Times,serif" font-size="12.00" fill="#444444">aqfr_type_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-199 373.5,-217 451.5,-217 451.5,-199 373.5,-199"/> +<text text-anchor="start" x="375.5" y="-204.2" font-family="Times,serif" font-size="12.00" fill="#444444">well_depth_va</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-181 373.5,-199 451.5,-199 451.5,-181 373.5,-181"/> +<text text-anchor="start" x="375.5" y="-186.2" font-family="Times,serif" font-size="12.00" fill="#444444">hole_depth_va</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-163 373.5,-181 451.5,-181 451.5,-163 373.5,-163"/> +<text text-anchor="start" x="375.5" y="-168.2" font-family="Times,serif" font-size="12.00" fill="#444444">depth_src_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-145 373.5,-163 451.5,-163 451.5,-145 373.5,-145"/> +<text text-anchor="start" x="375.5" y="-150.2" font-family="Times,serif" font-size="12.00" fill="#444444">completion_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-127 373.5,-145 451.5,-145 451.5,-127 373.5,-127"/> +<text text-anchor="start" x="375.5" y="-132.2" font-family="Times,serif" font-size="12.00" fill="#444444">network_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-109 373.5,-127 451.5,-127 451.5,-109 373.5,-109"/> +<text text-anchor="start" x="375.5" y="-114.2" font-family="Times,serif" font-size="12.00" fill="#444444">pos</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-91 373.5,-109 451.5,-109 451.5,-91 373.5,-91"/> +<text text-anchor="start" x="375.5" y="-96.2" font-family="Times,serif" font-size="12.00" fill="#444444">min_dt</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-73 373.5,-91 451.5,-91 451.5,-73 373.5,-73"/> +<text text-anchor="start" x="375.5" y="-78.2" font-family="Times,serif" font-size="12.00" fill="#444444">max_dt</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-55 373.5,-73 451.5,-73 451.5,-55 373.5,-55"/> +<text text-anchor="start" x="375.5" y="-60.2" font-family="Times,serif" font-size="12.00" fill="#444444">nmeas</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-37 373.5,-55 451.5,-55 451.5,-37 373.5,-37"/> +<text text-anchor="start" x="375.5" y="-42.2" font-family="Times,serif" font-size="12.00" fill="#444444">nsamples</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-19 373.5,-37 451.5,-37 451.5,-19 373.5,-19"/> +<text text-anchor="start" x="375.5" y="-24.2" font-family="Times,serif" font-size="12.00" fill="#444444">nreps</text> +<polygon fill="#ffffff" stroke="transparent" points="373.5,-1 373.5,-19 451.5,-19 451.5,-1 373.5,-1"/> +<text text-anchor="start" x="375.5" y="-6.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> +<polygon fill="none" stroke="#555555" points="372.5,0 372.5,-488 452.5,-488 452.5,0 372.5,0"/> </g> <!-- gwl->sites --> <g id="gwl_1" class="edge"> <title>gwl:site_no->sites:site_no</title> -<path fill="none" stroke="#555555" d="M253,-460C268.9149,-460 275.225,-460 287.388,-460"/> -<polygon fill="#555555" stroke="#555555" points="287.5,-463.5001 297.5,-460 287.5,-456.5001 287.5,-463.5001"/> +<path fill="none" stroke="#555555" d="M329,-460C344.9149,-460 351.225,-460 363.388,-460"/> +<polygon fill="#555555" stroke="#555555" points="363.5,-463.5001 373.5,-460 363.5,-456.5001 363.5,-463.5001"/> </g> <!-- idaho --> <g id="idaho" class="node"> <title>idaho</title> -<polygon fill="#efebdd" stroke="transparent" points="419,-565 419,-583 468,-583 468,-565 419,-565"/> -<text text-anchor="start" x="430.1692" y="-570.2" font-family="Times,serif" font-size="12.00" fill="#000000">idaho</text> -<polygon fill="#ffffff" stroke="transparent" points="419,-547 419,-565 468,-565 468,-547 419,-547"/> -<text text-anchor="start" x="420.841" y="-552.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> -<polygon fill="none" stroke="#555555" points="417.5,-546 417.5,-584 468.5,-584 468.5,-546 417.5,-546"/> +<polygon fill="#efebdd" stroke="transparent" points="519,-769 519,-787 568,-787 568,-769 519,-769"/> +<text text-anchor="start" x="530.1692" y="-774.2" font-family="Times,serif" font-size="12.00" fill="#000000">idaho</text> +<polygon fill="#ffffff" stroke="transparent" points="519,-751 519,-769 568,-769 568,-751 519,-751"/> +<text text-anchor="start" x="520.841" y="-756.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> +<polygon fill="none" stroke="#555555" points="517.5,-750 517.5,-788 568.5,-788 568.5,-750 517.5,-750"/> </g> <!-- inl --> <g id="inl" class="node"> <title>inl</title> -<polygon fill="#efebdd" stroke="transparent" points="315,-565 315,-583 364,-583 364,-565 315,-565"/> -<text text-anchor="start" x="333.1652" y="-570.2" font-family="Times,serif" font-size="12.00" fill="#000000">inl</text> -<polygon fill="#ffffff" stroke="transparent" points="315,-547 315,-565 364,-565 364,-547 315,-547"/> -<text text-anchor="start" x="316.841" y="-552.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> -<polygon fill="none" stroke="#555555" points="313.5,-546 313.5,-584 364.5,-584 364.5,-546 313.5,-546"/> +<polygon fill="#efebdd" stroke="transparent" points="369,-544 369,-562 418,-562 418,-544 369,-544"/> +<text text-anchor="start" x="387.1652" y="-549.2" font-family="Times,serif" font-size="12.00" fill="#000000">inl</text> +<polygon fill="#ffffff" stroke="transparent" points="369,-526 369,-544 418,-544 418,-526 369,-526"/> +<text text-anchor="start" x="370.841" y="-531.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> +<polygon fill="none" stroke="#555555" points="367.5,-525 367.5,-563 418.5,-563 418.5,-525 367.5,-525"/> </g> <!-- iwd --> <g id="iwd" class="node"> <title>iwd</title> -<polygon fill="#efebdd" stroke="transparent" points="471,-643 471,-661 520,-661 520,-643 471,-643"/> -<text text-anchor="start" x="486.5012" y="-648.2" font-family="Times,serif" font-size="12.00" fill="#000000">iwd</text> -<polygon fill="#ffffff" stroke="transparent" points="471,-625 471,-643 520,-643 520,-625 471,-625"/> -<text text-anchor="start" x="472.841" y="-630.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> -<polygon fill="none" stroke="#555555" points="469.5,-624 469.5,-662 520.5,-662 520.5,-624 469.5,-624"/> +<polygon fill="#efebdd" stroke="transparent" points="519,-844 519,-862 568,-862 568,-844 519,-844"/> +<text text-anchor="start" x="534.5012" y="-849.2" font-family="Times,serif" font-size="12.00" fill="#000000">iwd</text> +<polygon fill="#ffffff" stroke="transparent" points="519,-826 519,-844 568,-844 568,-826 519,-826"/> +<text text-anchor="start" x="520.841" y="-831.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> +<polygon fill="none" stroke="#555555" points="517.5,-825 517.5,-863 568.5,-863 568.5,-825 517.5,-825"/> </g> <!-- lakes --> <g id="lakes" class="node"> <title>lakes</title> -<polygon fill="#efebdd" stroke="transparent" points="339,-993 339,-1011 391,-1011 391,-993 339,-993"/> -<text text-anchor="start" x="352.6724" y="-998.2" font-family="Times,serif" font-size="12.00" fill="#000000">lakes</text> -<polygon fill="#ffffff" stroke="transparent" points="339,-975 339,-993 391,-993 391,-975 339,-975"/> -<text text-anchor="start" x="341" y="-980.2" font-family="Times,serif" font-size="12.00" fill="#444444">gnis_nm</text> -<polygon fill="#ffffff" stroke="transparent" points="339,-957 339,-975 391,-975 391,-957 339,-957"/> -<text text-anchor="start" x="341" y="-963.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">id</text> -<polygon fill="#ffffff" stroke="transparent" points="339,-939 339,-957 391,-957 391,-939 339,-939"/> -<text text-anchor="start" x="341" y="-944.2" font-family="Times,serif" font-size="12.00" fill="#444444">reach_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="339,-921 339,-939 391,-939 391,-921 339,-921"/> -<text text-anchor="start" x="341" y="-926.2" font-family="Times,serif" font-size="12.00" fill="#444444">gnis_id</text> -<polygon fill="#ffffff" stroke="transparent" points="339,-903 339,-921 391,-921 391,-903 339,-903"/> -<text text-anchor="start" x="340.6802" y="-908.2" font-family="Times,serif" font-size="12.00" fill="#444444">feature_tp</text> -<polygon fill="#ffffff" stroke="transparent" points="339,-885 339,-903 391,-903 391,-885 339,-885"/> -<text text-anchor="start" x="341" y="-890.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> -<polygon fill="none" stroke="#555555" points="338,-884 338,-1012 392,-1012 392,-884 338,-884"/> +<polygon fill="#efebdd" stroke="transparent" points="417,-859 417,-877 469,-877 469,-859 417,-859"/> +<text text-anchor="start" x="430.6724" y="-864.2" font-family="Times,serif" font-size="12.00" fill="#000000">lakes</text> +<polygon fill="#ffffff" stroke="transparent" points="417,-841 417,-859 469,-859 469,-841 417,-841"/> +<text text-anchor="start" x="419" y="-846.2" font-family="Times,serif" font-size="12.00" fill="#444444">gnis_nm</text> +<polygon fill="#ffffff" stroke="transparent" points="417,-823 417,-841 469,-841 469,-823 417,-823"/> +<text text-anchor="start" x="419" y="-829.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">id</text> +<polygon fill="#ffffff" stroke="transparent" points="417,-805 417,-823 469,-823 469,-805 417,-805"/> +<text text-anchor="start" x="419" y="-810.2" font-family="Times,serif" font-size="12.00" fill="#444444">reach_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="417,-787 417,-805 469,-805 469,-787 417,-787"/> +<text text-anchor="start" x="419" y="-792.2" font-family="Times,serif" font-size="12.00" fill="#444444">gnis_id</text> +<polygon fill="#ffffff" stroke="transparent" points="417,-769 417,-787 469,-787 469,-769 417,-769"/> +<text text-anchor="start" x="418.6802" y="-774.2" font-family="Times,serif" font-size="12.00" fill="#444444">feature_tp</text> +<polygon fill="#ffffff" stroke="transparent" points="417,-751 417,-769 469,-769 469,-751 417,-751"/> +<text text-anchor="start" x="419" y="-756.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> +<polygon fill="none" stroke="#555555" points="416,-750 416,-878 470,-878 470,-750 416,-750"/> +</g> +<!-- units --> +<g id="units" class="node"> +<title>units</title> +<polygon fill="#efebdd" stroke="transparent" points="499,-976 499,-994 538,-994 538,-976 499,-976"/> +<text text-anchor="start" x="506.8318" y="-981.2" font-family="Times,serif" font-size="12.00" fill="#000000">units</text> +<polygon fill="#ffffff" stroke="transparent" points="499,-958 499,-976 538,-976 538,-958 499,-958"/> +<text text-anchor="start" x="500.5018" y="-964.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">unit_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="499,-940 499,-958 538,-958 538,-940 499,-940"/> +<text text-anchor="start" x="500.8318" y="-945.2" font-family="Times,serif" font-size="12.00" fill="#444444">unit_ds</text> +<polygon fill="#ffffff" stroke="transparent" points="499,-922 499,-940 538,-940 538,-922 499,-922"/> +<text text-anchor="start" x="501" y="-927.2" font-family="Times,serif" font-size="12.00" fill="#444444">siunitx</text> +<polygon fill="none" stroke="#555555" points="497.5,-921 497.5,-995 538.5,-995 538.5,-921 497.5,-921"/> </g> <!-- parameters->units --> <g id="parameters_1" class="edge"> -<title>parameters:parm_unit->units:parm_unit</title> -<path fill="none" stroke="#555555" d="M378.5,-1254C426.1829,-1254 374.2872,-1160.5161 406.411,-1145.9093"/> -<polygon fill="#555555" stroke="#555555" points="407.3252,-1149.2984 416.5,-1144 406.0236,-1142.4205 407.3252,-1149.2984"/> +<title>parameters:unit_cd->units:unit_cd</title> +<path fill="none" stroke="#555555" d="M454.5,-1022C481.7674,-1022 471.5616,-980.6392 488.8752,-969.6528"/> +<polygon fill="#555555" stroke="#555555" points="490.2136,-972.9203 499,-967 488.4394,-966.1489 490.2136,-972.9203"/> </g> <!-- percponds --> <g id="percponds" class="node"> <title>percponds</title> -<polygon fill="#efebdd" stroke="transparent" points="326.5,-809 326.5,-827 379.5,-827 379.5,-809 326.5,-809"/> -<text text-anchor="start" x="328.3424" y="-814.2" font-family="Times,serif" font-size="12.00" fill="#000000">percponds</text> -<polygon fill="#ffffff" stroke="transparent" points="326.5,-791 326.5,-809 379.5,-809 379.5,-791 326.5,-791"/> -<text text-anchor="start" x="328.5" y="-796.2" font-family="Times,serif" font-size="12.00" fill="#444444">name</text> -<polygon fill="#ffffff" stroke="transparent" points="326.5,-773 326.5,-791 379.5,-791 379.5,-773 326.5,-773"/> -<text text-anchor="start" x="328.3388" y="-778.2" font-family="Times,serif" font-size="12.00" fill="#444444">facility_id</text> -<polygon fill="#ffffff" stroke="transparent" points="326.5,-755 326.5,-773 379.5,-773 379.5,-755 326.5,-755"/> -<text text-anchor="start" x="328.5" y="-760.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> -<polygon fill="none" stroke="#555555" points="325,-754 325,-828 380,-828 380,-754 325,-754"/> +<polygon fill="#efebdd" stroke="transparent" points="1.5,-1041 1.5,-1059 54.5,-1059 54.5,-1041 1.5,-1041"/> +<text text-anchor="start" x="3.3424" y="-1046.2" font-family="Times,serif" font-size="12.00" fill="#000000">percponds</text> +<polygon fill="#ffffff" stroke="transparent" points="1.5,-1023 1.5,-1041 54.5,-1041 54.5,-1023 1.5,-1023"/> +<text text-anchor="start" x="3.5" y="-1028.2" font-family="Times,serif" font-size="12.00" fill="#444444">name</text> +<polygon fill="#ffffff" stroke="transparent" points="1.5,-1005 1.5,-1023 54.5,-1023 54.5,-1005 1.5,-1005"/> +<text text-anchor="start" x="3.3388" y="-1010.2" font-family="Times,serif" font-size="12.00" fill="#444444">facility_id</text> +<polygon fill="#ffffff" stroke="transparent" points="1.5,-987 1.5,-1005 54.5,-1005 54.5,-987 1.5,-987"/> +<text text-anchor="start" x="3.5" y="-992.2" font-family="Times,serif" font-size="12.00" fill="#444444">min_dt</text> +<polygon fill="#ffffff" stroke="transparent" points="1.5,-969 1.5,-987 54.5,-987 54.5,-969 1.5,-969"/> +<text text-anchor="start" x="3.5" y="-974.2" font-family="Times,serif" font-size="12.00" fill="#444444">max_dt</text> +<polygon fill="#ffffff" stroke="transparent" points="1.5,-951 1.5,-969 54.5,-969 54.5,-951 1.5,-951"/> +<text text-anchor="start" x="3.5" y="-956.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> +<polygon fill="none" stroke="#555555" points="0,-950 0,-1060 55,-1060 55,-950 0,-950"/> </g> <!-- percponds->facilities --> <g id="percponds_1" class="edge"> <title>percponds:facility_id->facilities:id</title> -<path fill="none" stroke="#555555" d="M379.5,-782C393.0781,-782 398.7799,-782 408.789,-782"/> -<polygon fill="#555555" stroke="#555555" points="409,-785.5001 419,-782 409,-778.5001 409,-785.5001"/> +<path fill="none" stroke="#555555" d="M54.5,-1014C68.0781,-1014 73.7799,-1014 83.789,-1014"/> +<polygon fill="#555555" stroke="#555555" points="84,-1017.5001 94,-1014 84,-1010.5001 84,-1017.5001"/> </g> <!-- roads --> <g id="roads" class="node"> <title>roads</title> -<polygon fill="#efebdd" stroke="transparent" points="367,-697 367,-715 416,-715 416,-697 367,-697"/> -<text text-anchor="start" x="378.5058" y="-702.2" font-family="Times,serif" font-size="12.00" fill="#000000">roads</text> -<polygon fill="#ffffff" stroke="transparent" points="367,-679 367,-697 416,-697 416,-679 367,-679"/> -<text text-anchor="start" x="369" y="-684.2" font-family="Times,serif" font-size="12.00" fill="#444444">name</text> -<polygon fill="#ffffff" stroke="transparent" points="367,-661 367,-679 416,-679 416,-661 367,-661"/> -<text text-anchor="start" x="369" y="-667.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">id</text> -<polygon fill="#ffffff" stroke="transparent" points="367,-643 367,-661 416,-661 416,-643 367,-643"/> -<text text-anchor="start" x="369" y="-648.2" font-family="Times,serif" font-size="12.00" fill="#444444">prisec_fl</text> -<polygon fill="#ffffff" stroke="transparent" points="367,-625 367,-643 416,-643 416,-625 367,-625"/> -<text text-anchor="start" x="368.841" y="-630.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> -<polygon fill="none" stroke="#555555" points="365.5,-624 365.5,-716 416.5,-716 416.5,-624 365.5,-624"/> +<polygon fill="#efebdd" stroke="transparent" points="94,-923 94,-941 143,-941 143,-923 94,-923"/> +<text text-anchor="start" x="105.5058" y="-928.2" font-family="Times,serif" font-size="12.00" fill="#000000">roads</text> +<polygon fill="#ffffff" stroke="transparent" points="94,-905 94,-923 143,-923 143,-905 94,-905"/> +<text text-anchor="start" x="96" y="-910.2" font-family="Times,serif" font-size="12.00" fill="#444444">name</text> +<polygon fill="#ffffff" stroke="transparent" points="94,-887 94,-905 143,-905 143,-887 94,-887"/> +<text text-anchor="start" x="96" y="-893.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">id</text> +<polygon fill="#ffffff" stroke="transparent" points="94,-869 94,-887 143,-887 143,-869 94,-869"/> +<text text-anchor="start" x="96" y="-874.2" font-family="Times,serif" font-size="12.00" fill="#444444">prisec_fl</text> +<polygon fill="#ffffff" stroke="transparent" points="94,-851 94,-869 143,-869 143,-851 94,-851"/> +<text text-anchor="start" x="95.841" y="-856.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> +<polygon fill="none" stroke="#555555" points="92.5,-850 92.5,-942 143.5,-942 143.5,-850 92.5,-850"/> </g> <!-- samples --> <g id="samples" class="node"> <title>samples</title> -<polygon fill="#efebdd" stroke="transparent" points="107,-975 107,-993 257,-993 257,-975 107,-975"/> -<text text-anchor="start" x="162.6716" y="-980.2" font-family="Times,serif" font-size="12.00" fill="#000000">samples</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-957 107,-975 257,-975 257,-957 107,-957"/> -<text text-anchor="start" x="109" y="-962.2" font-family="Times,serif" font-size="12.00" fill="#444444">site_nm</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-939 107,-957 257,-957 257,-939 107,-939"/> -<text text-anchor="start" x="109" y="-944.2" font-family="Times,serif" font-size="12.00" fill="#444444">sample_dt</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-921 107,-939 257,-939 257,-921 107,-921"/> -<text text-anchor="start" x="109" y="-926.2" font-family="Times,serif" font-size="12.00" fill="#444444">parm_short_nm</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-903 107,-921 257,-921 257,-903 107,-903"/> -<text text-anchor="start" x="109" y="-908.2" font-family="Times,serif" font-size="12.00" fill="#444444">parm_unit</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-885 107,-903 257,-903 257,-885 107,-885"/> -<text text-anchor="start" x="109" y="-890.2" font-family="Times,serif" font-size="12.00" fill="#444444">remark_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-867 107,-885 257,-885 257,-867 107,-867"/> -<text text-anchor="start" x="109" y="-872.2" font-family="Times,serif" font-size="12.00" fill="#444444">result_va</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-849 107,-867 257,-867 257,-849 107,-849"/> -<text text-anchor="start" x="109" y="-854.2" font-family="Times,serif" font-size="12.00" fill="#444444">lab_sd_va</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-831 107,-849 257,-849 257,-831 107,-831"/> -<text text-anchor="start" x="109" y="-836.2" font-family="Times,serif" font-size="12.00" fill="#444444">lab_li_va</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-813 107,-831 257,-831 257,-813 107,-813"/> -<text text-anchor="start" x="109" y="-818.2" font-family="Times,serif" font-size="12.00" fill="#444444">lab_ui_va</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-795 107,-813 257,-813 257,-795 107,-795"/> -<text text-anchor="start" x="109" y="-800.2" font-family="Times,serif" font-size="12.00" fill="#444444">rpt_lev_va</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-777 107,-795 257,-795 257,-777 107,-777"/> -<text text-anchor="start" x="109" y="-782.2" font-family="Times,serif" font-size="12.00" fill="#444444">rpt_lev_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-759 107,-777 257,-777 257,-759 107,-759"/> -<text text-anchor="start" x="109" y="-764.2" font-family="Times,serif" font-size="12.00" fill="#444444">medium_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-741 107,-759 257,-759 257,-741 107,-741"/> -<text text-anchor="start" x="109" y="-746.2" font-family="Times,serif" font-size="12.00" fill="#444444">anl_ent_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-723 107,-741 257,-741 257,-723 107,-723"/> -<text text-anchor="start" x="109" y="-728.2" font-family="Times,serif" font-size="12.00" fill="#444444">dqi_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-705 107,-723 257,-723 257,-705 107,-705"/> -<text text-anchor="start" x="109" y="-710.2" font-family="Times,serif" font-size="12.00" fill="#444444">meth_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-687 107,-705 257,-705 257,-687 107,-687"/> -<text text-anchor="start" x="109" y="-692.2" font-family="Times,serif" font-size="12.00" fill="#444444">sample_type_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-669 107,-687 257,-687 257,-669 107,-669"/> -<text text-anchor="start" x="109" y="-674.2" font-family="Times,serif" font-size="12.00" fill="#444444">db_no</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-651 107,-669 257,-669 257,-651 107,-651"/> -<text text-anchor="start" x="109" y="-656.2" font-family="Times,serif" font-size="12.00" fill="#444444">sample_id</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-633 107,-651 257,-651 257,-633 107,-633"/> -<text text-anchor="start" x="109" y="-638.2" font-family="Times,serif" font-size="12.00" fill="#444444">site_no</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-615 107,-633 257,-633 257,-615 107,-615"/> -<text text-anchor="start" x="109" y="-620.2" font-family="Times,serif" font-size="12.00" fill="#444444">pcode</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-597 107,-615 257,-615 257,-597 107,-597"/> -<text text-anchor="start" x="109" y="-602.2" font-family="Times,serif" font-size="12.00" fill="#444444">rep_pair_id</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-579 107,-597 257,-597 257,-579 107,-579"/> -<text text-anchor="start" x="109" y="-584.2" font-family="Times,serif" font-size="12.00" fill="#444444">result_tx</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-561 107,-579 257,-579 257,-561 107,-561"/> -<text text-anchor="start" x="109" y="-566.2" font-family="Times,serif" font-size="12.00" fill="#444444">remark</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-543 107,-561 257,-561 257,-543 107,-543"/> -<text text-anchor="start" x="109" y="-548.2" font-family="Times,serif" font-size="12.00" fill="#444444">anl_dt</text> -<polygon fill="#ffffff" stroke="transparent" points="107,-525 107,-543 257,-543 257,-525 107,-525"/> -<text text-anchor="start" x="108.6818" y="-531.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">sample_id, pcode, medium_cd</text> -<polygon fill="none" stroke="#555555" points="106,-524 106,-994 258,-994 258,-524 106,-524"/> +<polygon fill="#efebdd" stroke="transparent" points="183,-975 183,-993 333,-993 333,-975 183,-975"/> +<text text-anchor="start" x="238.6716" y="-980.2" font-family="Times,serif" font-size="12.00" fill="#000000">samples</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-957 183,-975 333,-975 333,-957 183,-957"/> +<text text-anchor="start" x="185" y="-962.2" font-family="Times,serif" font-size="12.00" fill="#444444">site_nm</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-939 183,-957 333,-957 333,-939 183,-939"/> +<text text-anchor="start" x="185" y="-944.2" font-family="Times,serif" font-size="12.00" fill="#444444">sample_dt</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-921 183,-939 333,-939 333,-921 183,-921"/> +<text text-anchor="start" x="185" y="-926.2" font-family="Times,serif" font-size="12.00" fill="#444444">parm_short_nm</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-903 183,-921 333,-921 333,-903 183,-903"/> +<text text-anchor="start" x="185" y="-908.2" font-family="Times,serif" font-size="12.00" fill="#444444">unit_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-885 183,-903 333,-903 333,-885 183,-885"/> +<text text-anchor="start" x="185" y="-890.2" font-family="Times,serif" font-size="12.00" fill="#444444">remark_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-867 183,-885 333,-885 333,-867 183,-867"/> +<text text-anchor="start" x="185" y="-872.2" font-family="Times,serif" font-size="12.00" fill="#444444">result_va</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-849 183,-867 333,-867 333,-849 183,-849"/> +<text text-anchor="start" x="185" y="-854.2" font-family="Times,serif" font-size="12.00" fill="#444444">lab_sd_va</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-831 183,-849 333,-849 333,-831 183,-831"/> +<text text-anchor="start" x="185" y="-836.2" font-family="Times,serif" font-size="12.00" fill="#444444">lab_li_va</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-813 183,-831 333,-831 333,-813 183,-813"/> +<text text-anchor="start" x="185" y="-818.2" font-family="Times,serif" font-size="12.00" fill="#444444">lab_ui_va</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-795 183,-813 333,-813 333,-795 183,-795"/> +<text text-anchor="start" x="185" y="-800.2" font-family="Times,serif" font-size="12.00" fill="#444444">rpt_lev_va</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-777 183,-795 333,-795 333,-777 183,-777"/> +<text text-anchor="start" x="185" y="-782.2" font-family="Times,serif" font-size="12.00" fill="#444444">rpt_lev_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-759 183,-777 333,-777 333,-759 183,-759"/> +<text text-anchor="start" x="185" y="-764.2" font-family="Times,serif" font-size="12.00" fill="#444444">medium_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-741 183,-759 333,-759 333,-741 183,-741"/> +<text text-anchor="start" x="185" y="-746.2" font-family="Times,serif" font-size="12.00" fill="#444444">anl_ent_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-723 183,-741 333,-741 333,-723 183,-723"/> +<text text-anchor="start" x="185" y="-728.2" font-family="Times,serif" font-size="12.00" fill="#444444">dqi_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-705 183,-723 333,-723 333,-705 183,-705"/> +<text text-anchor="start" x="185" y="-710.2" font-family="Times,serif" font-size="12.00" fill="#444444">meth_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-687 183,-705 333,-705 333,-687 183,-687"/> +<text text-anchor="start" x="185" y="-692.2" font-family="Times,serif" font-size="12.00" fill="#444444">sample_type_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-669 183,-687 333,-687 333,-669 183,-669"/> +<text text-anchor="start" x="185" y="-674.2" font-family="Times,serif" font-size="12.00" fill="#444444">db_no</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-651 183,-669 333,-669 333,-651 183,-651"/> +<text text-anchor="start" x="185" y="-656.2" font-family="Times,serif" font-size="12.00" fill="#444444">sample_id</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-633 183,-651 333,-651 333,-633 183,-633"/> +<text text-anchor="start" x="185" y="-638.2" font-family="Times,serif" font-size="12.00" fill="#444444">site_no</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-615 183,-633 333,-633 333,-615 183,-615"/> +<text text-anchor="start" x="185" y="-620.2" font-family="Times,serif" font-size="12.00" fill="#444444">pcode</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-597 183,-615 333,-615 333,-597 183,-597"/> +<text text-anchor="start" x="185" y="-602.2" font-family="Times,serif" font-size="12.00" fill="#444444">rep_pair_id</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-579 183,-597 333,-597 333,-579 183,-579"/> +<text text-anchor="start" x="185" y="-584.2" font-family="Times,serif" font-size="12.00" fill="#444444">result_tx</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-561 183,-579 333,-579 333,-561 183,-561"/> +<text text-anchor="start" x="185" y="-566.2" font-family="Times,serif" font-size="12.00" fill="#444444">remark</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-543 183,-561 333,-561 333,-543 183,-543"/> +<text text-anchor="start" x="185" y="-548.2" font-family="Times,serif" font-size="12.00" fill="#444444">anl_dt</text> +<polygon fill="#ffffff" stroke="transparent" points="183,-525 183,-543 333,-543 333,-525 183,-525"/> +<text text-anchor="start" x="184.6818" y="-531.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">sample_id, pcode, medium_cd</text> +<polygon fill="none" stroke="#555555" points="182,-524 182,-994 334,-994 334,-524 182,-524"/> </g> <!-- samples->parameters --> <g id="samples_1" class="edge"> <title>samples:pcode->parameters:pcode</title> -<path fill="none" stroke="#555555" d="M257,-624C333.6719,-624 225.4741,-1283.4543 286.2587,-1340.1262"/> -<polygon fill="#555555" stroke="#555555" points="284.9244,-1343.3619 295.5,-1344 287.6306,-1336.9061 284.9244,-1343.3619"/> +<path fill="none" stroke="#555555" d="M333,-624C438.1695,-624 274.2921,-1080.1317 361.5953,-1110.4217"/> +<polygon fill="#555555" stroke="#555555" points="361.0738,-1113.8827 371.5,-1112 362.1754,-1106.9699 361.0738,-1113.8827"/> </g> <!-- samples->sites --> <g id="samples_2" class="edge"> <title>samples:site_no->sites:site_no</title> -<path fill="none" stroke="#555555" d="M257,-642C336.1449,-642 225.4642,-475.9843 287.5544,-461.0688"/> -<polygon fill="#555555" stroke="#555555" points="287.9313,-464.5486 297.5,-460 287.1832,-457.5886 287.9313,-464.5486"/> +<path fill="none" stroke="#555555" d="M333,-642C412.1449,-642 301.4642,-475.9843 363.5544,-461.0688"/> +<polygon fill="#555555" stroke="#555555" points="363.9313,-464.5486 373.5,-460 363.1832,-457.5886 363.9313,-464.5486"/> </g> <!-- samples->units --> <g id="samples_3" class="edge"> -<title>samples:parm_unit->units:parm_unit</title> -<path fill="none" stroke="#555555" d="M257,-912C271.0525,-912 375.9759,-1099.2681 408.4866,-1137.3069"/> -<polygon fill="#555555" stroke="#555555" points="406.5813,-1140.2758 416.5,-1144 411.0686,-1134.9032 406.5813,-1140.2758"/> +<title>samples:unit_cd->units:unit_cd</title> +<path fill="none" stroke="#555555" d="M333,-912C387.8758,-912 404.896,-908.6181 455,-931 474.4652,-939.6952 474.4192,-959.3462 489.1069,-965.2748"/> +<polygon fill="#555555" stroke="#555555" points="488.5474,-968.73 499,-967 489.75,-961.834 488.5474,-968.73"/> </g> <!-- streams --> <g id="streams" class="node"> <title>streams</title> -<polygon fill="#efebdd" stroke="transparent" points="443,-993 443,-1011 495,-1011 495,-993 443,-993"/> -<text text-anchor="start" x="450.6742" y="-998.2" font-family="Times,serif" font-size="12.00" fill="#000000">streams</text> -<polygon fill="#ffffff" stroke="transparent" points="443,-975 443,-993 495,-993 495,-975 443,-975"/> -<text text-anchor="start" x="445" y="-980.2" font-family="Times,serif" font-size="12.00" fill="#444444">gnis_nm</text> -<polygon fill="#ffffff" stroke="transparent" points="443,-957 443,-975 495,-975 495,-957 443,-957"/> -<text text-anchor="start" x="445" y="-963.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">id</text> -<polygon fill="#ffffff" stroke="transparent" points="443,-939 443,-957 495,-957 495,-939 443,-939"/> -<text text-anchor="start" x="445" y="-944.2" font-family="Times,serif" font-size="12.00" fill="#444444">reach_cd</text> -<polygon fill="#ffffff" stroke="transparent" points="443,-921 443,-939 495,-939 495,-921 443,-921"/> -<text text-anchor="start" x="445" y="-926.2" font-family="Times,serif" font-size="12.00" fill="#444444">gnis_id</text> -<polygon fill="#ffffff" stroke="transparent" points="443,-903 443,-921 495,-921 495,-903 443,-903"/> -<text text-anchor="start" x="444.6802" y="-908.2" font-family="Times,serif" font-size="12.00" fill="#444444">feature_tp</text> -<polygon fill="#ffffff" stroke="transparent" points="443,-885 443,-903 495,-903 495,-885 443,-885"/> -<text text-anchor="start" x="445" y="-890.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> -<polygon fill="none" stroke="#555555" points="442,-884 442,-1012 496,-1012 496,-884 442,-884"/> +<polygon fill="#efebdd" stroke="transparent" points="467,-684 467,-702 519,-702 519,-684 467,-684"/> +<text text-anchor="start" x="474.6742" y="-689.2" font-family="Times,serif" font-size="12.00" fill="#000000">streams</text> +<polygon fill="#ffffff" stroke="transparent" points="467,-666 467,-684 519,-684 519,-666 467,-666"/> +<text text-anchor="start" x="469" y="-671.2" font-family="Times,serif" font-size="12.00" fill="#444444">gnis_nm</text> +<polygon fill="#ffffff" stroke="transparent" points="467,-648 467,-666 519,-666 519,-648 467,-648"/> +<text text-anchor="start" x="469" y="-654.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">id</text> +<polygon fill="#ffffff" stroke="transparent" points="467,-630 467,-648 519,-648 519,-630 467,-630"/> +<text text-anchor="start" x="469" y="-635.2" font-family="Times,serif" font-size="12.00" fill="#444444">reach_cd</text> +<polygon fill="#ffffff" stroke="transparent" points="467,-612 467,-630 519,-630 519,-612 467,-612"/> +<text text-anchor="start" x="469" y="-617.2" font-family="Times,serif" font-size="12.00" fill="#444444">gnis_id</text> +<polygon fill="#ffffff" stroke="transparent" points="467,-594 467,-612 519,-612 519,-594 467,-594"/> +<text text-anchor="start" x="468.6802" y="-599.2" font-family="Times,serif" font-size="12.00" fill="#444444">feature_tp</text> +<polygon fill="#ffffff" stroke="transparent" points="467,-576 467,-594 519,-594 519,-576 467,-576"/> +<text text-anchor="start" x="469" y="-581.2" font-family="Times,serif" font-size="12.00" fill="#444444">geometry</text> +<polygon fill="none" stroke="#555555" points="466,-575 466,-703 520,-703 520,-575 466,-575"/> </g> <!-- swm --> <g id="swm" class="node"> <title>swm</title> -<polygon fill="#efebdd" stroke="transparent" points="140,-251 140,-269 224,-269 224,-251 140,-251"/> -<text text-anchor="start" x="170.6678" y="-256.2" font-family="Times,serif" font-size="12.00" fill="#000000">swm</text> -<polygon fill="#ffffff" stroke="transparent" points="140,-233 140,-251 224,-251 224,-233 140,-233"/> -<text text-anchor="start" x="142" y="-238.2" font-family="Times,serif" font-size="12.00" fill="#444444">site_nm</text> -<polygon fill="#ffffff" stroke="transparent" points="140,-215 140,-233 224,-233 224,-215 140,-215"/> -<text text-anchor="start" x="142" y="-220.2" font-family="Times,serif" font-size="12.00" fill="#444444">site_no</text> -<polygon fill="#ffffff" stroke="transparent" points="140,-197 140,-215 224,-215 224,-197 140,-197"/> -<text text-anchor="start" x="142" y="-202.2" font-family="Times,serif" font-size="12.00" fill="#444444">stage_dt</text> -<polygon fill="#ffffff" stroke="transparent" points="140,-179 140,-197 224,-197 224,-179 140,-179"/> -<text text-anchor="start" x="142" y="-184.2" font-family="Times,serif" font-size="12.00" fill="#444444">stage_va</text> -<polygon fill="#ffffff" stroke="transparent" points="140,-161 140,-179 224,-179 224,-161 140,-161"/> -<text text-anchor="start" x="142" y="-166.2" font-family="Times,serif" font-size="12.00" fill="#444444">disch_va</text> -<polygon fill="#ffffff" stroke="transparent" points="140,-143 140,-161 224,-161 224,-143 140,-143"/> -<text text-anchor="start" x="142" y="-148.2" font-family="Times,serif" font-size="12.00" fill="#444444">stage_acy_va</text> -<polygon fill="#ffffff" stroke="transparent" points="140,-125 140,-143 224,-143 224,-125 140,-125"/> -<text text-anchor="start" x="142" y="-130.2" font-family="Times,serif" font-size="12.00" fill="#444444">disch_acy_va</text> -<polygon fill="#ffffff" stroke="transparent" points="140,-107 140,-125 224,-125 224,-107 140,-107"/> -<text text-anchor="start" x="141.6734" y="-113.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">site_no, stage_dt</text> -<polygon fill="none" stroke="#555555" points="139,-106 139,-270 225,-270 225,-106 139,-106"/> +<polygon fill="#efebdd" stroke="transparent" points="216,-251 216,-269 300,-269 300,-251 216,-251"/> +<text text-anchor="start" x="246.6678" y="-256.2" font-family="Times,serif" font-size="12.00" fill="#000000">swm</text> +<polygon fill="#ffffff" stroke="transparent" points="216,-233 216,-251 300,-251 300,-233 216,-233"/> +<text text-anchor="start" x="218" y="-238.2" font-family="Times,serif" font-size="12.00" fill="#444444">site_nm</text> +<polygon fill="#ffffff" stroke="transparent" points="216,-215 216,-233 300,-233 300,-215 216,-215"/> +<text text-anchor="start" x="218" y="-220.2" font-family="Times,serif" font-size="12.00" fill="#444444">site_no</text> +<polygon fill="#ffffff" stroke="transparent" points="216,-197 216,-215 300,-215 300,-197 216,-197"/> +<text text-anchor="start" x="218" y="-202.2" font-family="Times,serif" font-size="12.00" fill="#444444">stage_dt</text> +<polygon fill="#ffffff" stroke="transparent" points="216,-179 216,-197 300,-197 300,-179 216,-179"/> +<text text-anchor="start" x="218" y="-184.2" font-family="Times,serif" font-size="12.00" fill="#444444">stage_va</text> +<polygon fill="#ffffff" stroke="transparent" points="216,-161 216,-179 300,-179 300,-161 216,-161"/> +<text text-anchor="start" x="218" y="-166.2" font-family="Times,serif" font-size="12.00" fill="#444444">disch_va</text> +<polygon fill="#ffffff" stroke="transparent" points="216,-143 216,-161 300,-161 300,-143 216,-143"/> +<text text-anchor="start" x="218" y="-148.2" font-family="Times,serif" font-size="12.00" fill="#444444">stage_acy_va</text> +<polygon fill="#ffffff" stroke="transparent" points="216,-125 216,-143 300,-143 300,-125 216,-125"/> +<text text-anchor="start" x="218" y="-130.2" font-family="Times,serif" font-size="12.00" fill="#444444">disch_acy_va</text> +<polygon fill="#ffffff" stroke="transparent" points="216,-107 216,-125 300,-125 300,-107 216,-107"/> +<text text-anchor="start" x="217.6734" y="-113.2" font-family="Times,serif" text-decoration="underline" font-size="12.00" fill="#444444">site_no, stage_dt</text> +<polygon fill="none" stroke="#555555" points="215,-106 215,-270 301,-270 301,-106 215,-106"/> </g> <!-- swm->sites --> <g id="swm_1" class="edge"> <title>swm:site_no->sites:site_no</title> -<path fill="none" stroke="#555555" d="M224,-224C252.7381,-224 247.2265,-252.3578 258,-279 272.047,-313.7375 259.1416,-435.1795 287.7489,-456.7207"/> -<polygon fill="#555555" stroke="#555555" points="286.906,-460.1298 297.5,-460 289.1373,-453.4949 286.906,-460.1298"/> +<path fill="none" stroke="#555555" d="M300,-224C328.7381,-224 323.2265,-252.3578 334,-279 348.047,-313.7375 335.1416,-435.1795 363.7489,-456.7207"/> +<polygon fill="#555555" stroke="#555555" points="362.906,-460.1298 373.5,-460 365.1373,-453.4949 362.906,-460.1298"/> </g> </g> </svg> diff --git a/man/get_cache_dir.Rd b/man/get_cache_dir.Rd index e534b521265d998e112651ca9c9d1129f36f8d77..938809fc55634b1289672a0cfc02662887da5caa 100644 --- a/man/get_cache_dir.Rd +++ b/man/get_cache_dir.Rd @@ -22,7 +22,7 @@ Defaults to the temporary directory if the \pkg{rappdirs} package is unavailable You can specify the path to the cache directory by setting an environment variable named "CACHE_DIR". } \examples{ -get_cache_dir("test") +dir <- get_cache_dir("test") clear_cache_dir("test") } diff --git a/man/get_file_ext.Rd b/man/get_file_ext.Rd new file mode 100644 index 0000000000000000000000000000000000000000..3c7d96c3a50445bafe53233f4570ffbd5f1892c4 --- /dev/null +++ b/man/get_file_ext.Rd @@ -0,0 +1,29 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils.R +\name{get_file_ext} +\alias{get_file_ext} +\title{Extract File Extension} +\usage{ +get_file_ext(x, compression = TRUE) +} +\arguments{ +\item{x}{'character' vector. +File path(s).} + +\item{compression}{'logical' flag. +Whether to account for the compression extension '.gz', '.bz2' or '.xz'.} +} +\value{ +Returns the file (name) extensions (excluding the leading dot). +} +\description{ +Extract the extension of a file. +} +\examples{ +c("dir/file.txt", "file.txt.gz") |> + get_file_ext() +} +\author{ +J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center +} +\keyword{internal} diff --git a/man/inldata-package.Rd b/man/inldata-package.Rd index bcd0f1668df0e8598e9412de3e0035d8225aca30..a138764a28b4b2059cd9058fbcded947e7b16017 100644 --- a/man/inldata-package.Rd +++ b/man/inldata-package.Rd @@ -6,7 +6,7 @@ \alias{inldata-package} \title{inldata: Collection of Datasets for the USGS-INL Monitoring Networks} \description{ -A collection of analysis-ready datasets for the U.S. Geological Survey - Idaho National Laboratory (USGS-INL) groundwater and surface-water monitoring networks, administered by the USGS-INL Project Office in cooperation with the U.S. Department of Energy. The data collected from wells and surface-water stations at the Idaho National Laboratory and surrounding areas have been used to describe the effects of waste disposal on water contained in the eastern Snake River Plain aquifer, located in the southeastern part of Idaho, and the availability of water for long-term consumptive and industrial use. The package includes long-term monitoring records dating back to measurements from 1949. Geospatial data describing the areas from which samples were collected or observations were made are also included in the package. Bundling this data into a single package significantly reduces the magnitude of data processing for researchers and provides a way to distribute the data along with its documentation in a standard format. Geospatial datasets are made available in a common projection and datum, and geohydrologic data have been structured to facilitate analysis. +A collection of analysis-ready datasets for the U.S. Geological Survey - Idaho National Laboratory (USGS-INL) groundwater and surface-water monitoring networks, administered by the USGS-INL Project Office in cooperation with the U.S. Department of Energy. The data collected from wells and surface-water stations at the Idaho National Laboratory and surrounding areas have been used to describe the effects of waste disposal on water contained in the eastern Snake River Plain aquifer, located in the southeastern part of Idaho, and the availability of water for long-term consumptive and industrial use. The package includes long-term monitoring records dating back to measurements from 1922. Geospatial data describing the areas from which samples were collected or observations were made are also included in the package. Bundling this data into a single package significantly reduces the magnitude of data processing for researchers and provides a way to distribute the data along with its documentation in a standard format. Geospatial datasets are made available in a common projection and datum, and geohydrologic data have been structured to facilitate analysis. } \seealso{ Useful links: diff --git a/man/make_datasets.Rd b/man/make_datasets.Rd index 4336fef49ebc4c4d697b07b54516c078b4c51e1d..faf1f67979b501ae408bdd0fb66da0bfad2edd7f 100644 --- a/man/make_datasets.Rd +++ b/man/make_datasets.Rd @@ -11,10 +11,12 @@ make_datasets( tz = "America/Denver", census_yr = 2023, buffer_dist = 1000, + resolution = 100, warn = 1, timeout = 10, compress = "xz", - seed = 0L + seed = 0L, + quiet = FALSE ) } \arguments{ @@ -41,8 +43,11 @@ United States census year.} \item{buffer_dist}{'numeric' number. Buffer distance for the study area defined by the bounding of the sample \code{\link{sites}} dataset. -The buffer distance is measured in units of the coordinate reference system -(\code{\link[sf:st_crs]{crs$units}}).} +Specified in units of the coordinate reference system (\code{crs$units}).} + +\item{resolution}{'numeric' number. +Spatial resolution of the raster grid, in meters. +Specify in units of the coordinate reference system (\code{crs$units}).} \item{warn}{'integer' value. Sets the handling of warning messages. @@ -60,6 +65,9 @@ See the \code{\link{save}} function for details on compression types.} \item{seed}{'integer' count. Random number generator state, used to create reproducible results.} + +\item{quiet}{'logical' flag. +Whether to suppress printing of debugging information.} } \value{ Returns the paths to the newly created R Data files invisibly. diff --git a/man/parameters.Rd b/man/parameters.Rd index 625d8c97200ee0ad937a7377adaba19d9bebf972..4c981f54e0b2590ef68cef00007cdb643ee25dde 100644 --- a/man/parameters.Rd +++ b/man/parameters.Rd @@ -32,7 +32,7 @@ such as "10098-97-2" for Strontium-90.} \item{\code{srsname}}{Substance Registry Services (\href{https://sor.epa.gov/sor_internet/registry/substreg/home/overview/home.do}{SRS}) name, such as "Strontium-90".} -\item{\code{parm_unit}}{Parameter units of measure, see \code{\link{units}} dataset for unit descriptions.} +\item{\code{unit_cd}}{Units of measurement, see \code{\link{units}} dataset for unit descriptions.} \item{\code{min_dt}}{Collection date of first sample analyzed for the parameter.} \item{\code{max_dt}}{Collection date of last sample analyzed for the parameter.} \item{\code{nrecords}}{Number of records associated with the parameter.} diff --git a/man/percponds.Rd b/man/percponds.Rd index 91b0d4f388e6ef820c741bd2b35968cefece56c1..38a22e5d1febb7822133ded421ef5715a4156406 100644 --- a/man/percponds.Rd +++ b/man/percponds.Rd @@ -11,10 +11,16 @@ A \href{https://r-spatial.github.io/sf/articles/sf1.html}{simple feature} with f \item{\code{facility_id}}{INL facility the percolation pond is located at. Abbreviations and descriptions are as follows: "ATRC" is the Advanced Test Reactor Complex, +"CFA" is the Central Facilites Area, "INTEC" is the Idaho Nuclear Technology and Engineering Center, "MFC" is the Materials and Fuels Complex, -"NRF" is the Nuclear Reactors Facility, and +"NRF" is the Nuclear Reactors Facility, +"RWMC" is the Radoiactive WAste Management Complex, and "TAN" is the Test Area North facility.} +\item{\code{min_dt}}{Approximate year when the percolation pond was activated, +with missing values indicating that the information is not available.} +\item{\code{max_dt}}{Approximate year when the percolation pond was decommissioned, +with missing values indicating that the pond is still in operation.} \item{\code{geometry}}{Polygon geometry with a positive area (two-dimensional); sequence of points that form a closed, non-self-intersecting ring; the first ring denotes the exterior ring, zero or more subsequent rings denote holes in this exterior ring.} @@ -22,7 +28,9 @@ zero or more subsequent rings denote holes in this exterior ring.} } \source{ U.S. Geological Survey -\href{https://www.usgs.gov/centers/idaho-water-science-center/science/idaho-national-laboratory-project-office}{Idaho National Laboratory Project Office} +\href{https://www.usgs.gov/centers/idaho-water-science-center/science/idaho-national-laboratory-project-office}{Idaho National Laboratory Project Office}. +Polygons representing percolation ponds were digitized from historical Google Earth imagery, +dating as far back as 1985. } \usage{ percponds diff --git a/man/read_rdb.Rd b/man/read_rdb.Rd new file mode 100644 index 0000000000000000000000000000000000000000..c352c4d17a0be7a0e59931d455fac64dd09b0483 --- /dev/null +++ b/man/read_rdb.Rd @@ -0,0 +1,31 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/read_rdb.R +\name{read_rdb} +\alias{read_rdb} +\title{Read USGS RDB file} +\usage{ +read_rdb(file, na_strings = "") +} +\arguments{ +\item{file}{'character' string. +Path to file which the data are to be read from.} + +\item{na_strings}{'character' vector. +Strings which are interpreted as \code{NA} values.} +} +\value{ +A data frame containing a representation of the data in the file. +} +\description{ +Reads a RDB (Relational Database) file in table format and creates a data frame from it. +The USGS (U.S. Geological Survey) RDB file is a variant of a tab-delimited ASCII file structure. +} +\examples{ +file <- system.file("extdata", "test.rdb", package = "inldata") +d <- read_rdb(file) +str(d) +} +\author{ +J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center +} +\keyword{internal} diff --git a/man/round_usgs.Rd b/man/round_numbers.Rd similarity index 83% rename from man/round_usgs.Rd rename to man/round_numbers.Rd index 3abffc2b3951142daeab7c1820702440b8a59756..663571d784b25d53e682f8520480f9428933b5c0 100644 --- a/man/round_usgs.Rd +++ b/man/round_numbers.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R -\name{round_usgs} -\alias{round_usgs} +\name{round_numbers} +\alias{round_numbers} \title{Round Numbers} \usage{ -round_usgs(x, digits = 0) +round_numbers(x, digits = 0) } \arguments{ \item{x}{'numeric' vector. @@ -22,7 +22,7 @@ Rounds the values in its first argument to the specified number of decimal place This function uses the U.S. Geological Survey rounding method. } \examples{ -round_usgs(x = rep(pi, 3), digits = c(1, 2, 3)) +round_numbers(x = rep(pi, 3), digits = c(1, 2, 3)) } \author{ J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center diff --git a/man/samples.Rd b/man/samples.Rd index 98de4f645da9e7e4c604d4618139a9a5f3f87e01..fe7ea5dda8b5d294ac38169b0c868d1c4b58a139 100644 --- a/man/samples.Rd +++ b/man/samples.Rd @@ -11,10 +11,10 @@ A data frame with columns: \item{\code{sample_dt}}{Date and time the sample was collected, in "America/Denver" time zone. Missing values of time were substituted with "12:00".} \item{\code{parm_short_nm}}{Parameter short name assigned by the USGS, such as "pH".} -\item{\code{parm_unit}}{Parameter units of measure, see \code{\link{units}} dataset for unit descriptions.} +\item{\code{unit_cd}}{Units of measurement, see \code{\link{units}} dataset for unit descriptions.} \item{\code{remark_cd}}{Remark code (result level) used to qualify the parameter value. The codes and their meanings are as follows: -"" is a quantified value; +\link{NA} (missing value) is a quantified value; "<" is where the actual value is known to be less than the value reported, that is, the measured concentration is below the reporting limit (RL) and represented as a censored (or nondetection) value. diff --git a/man/test_pkg_dir.Rd b/man/test_pkg_dir.Rd new file mode 100644 index 0000000000000000000000000000000000000000..a16f333c6c540a697ff7348abd1b716f82034dd8 --- /dev/null +++ b/man/test_pkg_dir.Rd @@ -0,0 +1,25 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils.R +\name{test_pkg_dir} +\alias{test_pkg_dir} +\title{Test Location is Package Directory} +\usage{ +test_pkg_dir(pkg) +} +\arguments{ +\item{pkg}{'character' string. +Package name.} +} +\value{ +Formatted file size(s). +} +\description{ +Test whether the working directory is located at the top level directory of the package. +} +\examples{ +test_pkg_dir("inldata") +} +\author{ +J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center +} +\keyword{internal} diff --git a/man/units.Rd b/man/units.Rd index 072bf306f95f6c4e56b599952a2ca538c087f226..67acdebd50bd313d8d1ab0a8025dbc8dde33d4b0 100644 --- a/man/units.Rd +++ b/man/units.Rd @@ -3,13 +3,13 @@ \docType{data} \name{units} \alias{units} -\title{Parameter Units} +\title{Units of Measurement} \format{ A data frame with columns: \describe{ -\item{\code{parm_unit}}{Parameter units abbreviation.} -\item{\code{desc}}{Parameter units description.} -\item{\code{siunitx}}{Parameter units formatted for LaTeX using the +\item{\code{unit_cd}}{Measurment abbreviation for units.} +\item{\code{unit_ds}}{Description for units of measurement.} +\item{\code{siunitx}}{Units formatted for LaTeX using the \href{https://ctan.org/pkg/siunitx}{siunitx} package notation.} } } @@ -20,7 +20,7 @@ Idaho National Laboratory Project Office units } \description{ -Information describing the parameter units of measure. +Descriptive information about the measurement units. } \examples{ str(units) diff --git a/man/write_datasets.Rd b/man/write_datasets.Rd index c6c7b10b8a0b4a6fc10da1d98b94b7e549eda412..c99654b37583ca7e9f53ac96c4811550c5e1efd3 100644 --- a/man/write_datasets.Rd +++ b/man/write_datasets.Rd @@ -8,10 +8,12 @@ write_datasets( package, destdir = getwd(), formats = NULL, + gzip = NULL, overwrite = TRUE, include = NULL, exclude = NULL, pretty = TRUE, + full_names = TRUE, quiet = FALSE ) } @@ -25,10 +27,14 @@ Destination directory to write files, with tilde-expansion performed.} \item{formats}{'character' vector. Formats for saving datasets. Choose from one or more of the following formats: -\code{csv}, \code{geojson}, \code{json}, \code{parquet}, \code{shp}, \code{tiff}, \code{txt}, and \code{xlsx}. -Please refer to the \emph{details} section for a description of each format. +\code{txt}, \code{json}, \code{csv}, \code{xlsx}, \code{parquet}, \code{geojson}, \code{shp}, and \code{tiff}. +Please refer to the \emph{Details} section for a description of each format. All file formats are saved to the disk by default.} +\item{gzip}{'character' vector. +File \code{formats} that are eligible for Gzip compression. +At present, it accommodates \code{txt}, \code{json}, and \code{geojson} formats exclusively.} + \item{overwrite}{'logical' flag. Whether to overwrite an existing file.} @@ -45,6 +51,9 @@ Whether to add indentation, whitespace, and newlines to JSON output (default is See \code{\link[jsonlite:prettify]{prettify}} function for details. The tradeoff for human-readable output is a much larger file size.} +\item{full_names}{'logical' flag. +Whether the full paths of the files are returned (default).} + \item{quiet}{'logical' flag. Whether to suppress printing of debugging information.} } diff --git a/man/write_lines.Rd b/man/write_lines.Rd new file mode 100644 index 0000000000000000000000000000000000000000..bb8f2ba04e4a6b0fd957676e3b03abb9a80cf2b0 --- /dev/null +++ b/man/write_lines.Rd @@ -0,0 +1,38 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils.R +\name{write_lines} +\alias{write_lines} +\title{Write Lines to a File} +\usage{ +write_lines(text, path, gz = FALSE) +} +\arguments{ +\item{text}{'character' vector. +Text to write to file.} + +\item{path}{'character' string. +Path to the file.} + +\item{gz}{'logical' flag. +Whether to compress the file using Gzip. +The \code{.gz} extension is added to the file \code{path}.} +} +\value{ +Invisibly returns the extracted path(s). +} +\description{ +Write text lines to a file. +} +\examples{ +path <- write_lines( + text = "Test", + path = tempfile(fileext = ".txt"), + gz = TRUE +) + +unlink(path) +} +\author{ +J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center +} +\keyword{internal} diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index 13799994c5cd14766837013ef66b24bd41b04135..30d08ed90f668b52a6ad8384846090493c43825c 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -7,6 +7,10 @@ navbar: href: reference/index.html - text: Explore menu: + - text: Background Concentrations + href: articles/background.html + - text: Benchmark Concentrations + href: articles/benchmarks.html - text: Cities and Towns href: articles/cities.html - text: County Boundaries @@ -21,6 +25,8 @@ navbar: href: articles/facilities.html - text: Industrial Waste Ditch href: articles/iwd.html + - text: Laboratory Detection Limits + href: articles/dl.html - text: Lakes and Ponds href: articles/lakes.html - text: Parameter Information @@ -35,6 +41,10 @@ navbar: href: articles/sites.html - text: State of Idaho Boundary href: articles/idaho.html + - text: Units of Measurement + href: articles/units.html + - text: Download + href: articles/download.html - text: ERD href: articles/erd.html - text: Changelog diff --git a/vignettes/background.Rmd b/vignettes/background.Rmd new file mode 100644 index 0000000000000000000000000000000000000000..c8ea3015495c07cf6a89ade9523e1645c6f04fe5 --- /dev/null +++ b/vignettes/background.Rmd @@ -0,0 +1,106 @@ +--- +title: "Background Concentrations" +--- + +```{r, child="../man/rmd/JS.Rmd"} +``` + +Water-quality background concentrations for selected radionuclides, organic compounds, and chemical constituents that were analyzed for in water from the eastern Snake River Plain aquifer at and near the Idaho National Laboratory (INL). For additional details, refer to the package documentation associated with the [`background`](../reference/background.html) dataset. + +```{r, echo=FALSE} + +data <- inldata::background + +filter_input <- function(values, name) { + choices <- values |> unique() |> stats::na.omit() |> as.character() |> sort() + htmltools::tags$select( + onchange = sprintf("Reactable.setFilter('background-table', '%s', event.target.value || undefined)", name), + htmltools::tags$option(value = "", "All"), + lapply(choices, FUN = htmltools::tags$option), + "aria-label" = paste("Filter", name), + style = "width: 100%; height: 28px;" + ) +} + +urls <- c( + "Bartholomay and Hall (2016)" = "https://doi.org/10.3133/sir20165056", + "Knobel and others (1992)" = NA_character_, + "Michel (1989)" = "https://doi.org/10.3133/wri894072", + "Orr and others (1991)" = "https://doi.org/10.3133/wri914015" +) +hrefs <- urls[as.character(data$reference)] |> as.character() + +columns <- list( + + "parm_nm" = reactable::colDef( + header = htmltools::tags$div("Parameter name", + title = "A long parameter name assigned by the USGS." + ), + minWidth = 200, + sticky = "left" + ), + + "pcode" = reactable::colDef( + header = htmltools::tags$div("Parameter code", + title = "Parameter code assigned by the USGS." + ) + ), + + "bkgrd_min" = reactable::colDef( + header = htmltools::tags$div("Background minimum", + title = "Minimum limit of background concentration." + ), + filterMethod = htmlwidgets::JS("filterMinValue"), + filterInput = htmlwidgets::JS("rangeFilter") + ), + + "bkgrd_max" = reactable::colDef( + header = htmltools::tags$div("Background maximum", + title = "Maximum limit of background concentration." + ), + filterMethod = htmlwidgets::JS("filterMinValue"), + filterInput = htmlwidgets::JS("rangeFilter") + ), + + "reference" = reactable::colDef( + header = htmltools::tags$div("Reference", + title = "Source of background concentration limits." + ), + cell = function(value, index) { + href <- hrefs[index] + if (is.na(href)) { + value + } else { + htmltools::tags$a(href = href, target = "_blank", value) + } + }, + filterInput = filter_input + ) +) + +data[, names(columns)] |> + reactable::reactable( + columns = columns, + rownames = FALSE, + filterable = TRUE, + showPageSizeOptions = TRUE, + pageSizeOptions = c(5, 10, 25, 50, 100), + striped = TRUE, + compact = TRUE, + elementId = "background-table" + ) + +``` + +```{r, echo=FALSE, results="asis"} + +fontawesome::fa("download") |> + htmltools::tagList("Download as CSV") |> + htmltools::tags$button( + onclick = "Reactable.downloadDataCSV('background-table', 'background.csv')", + title = "Download the filtered data table as a Comma-Separated Values (CSV) formatted file." + ) |> + htmltools::tagList() |> + htmltools::p() + +``` diff --git a/vignettes/benchmarks.Rmd b/vignettes/benchmarks.Rmd new file mode 100644 index 0000000000000000000000000000000000000000..18ab8e12645528efbd28e2f14c5059770a91d942 --- /dev/null +++ b/vignettes/benchmarks.Rmd @@ -0,0 +1,147 @@ +--- +title: "Benchmark Concentrations" +--- + +```{r, child="../man/rmd/JS.Rmd"} +``` + +Water-quality benchmark concentrations of selected radionuclides, organic compounds, and chemical constituents. For additional details, refer to the package documentation associated with the [`benchmarks`](../reference/benchmarks.html) dataset. + +```{r, echo=FALSE} + +data <- inldata::benchmarks + +columns <- list( + + "parm_nm" = reactable::colDef( + header = htmltools::tags$div("Parameter name", + title = "A long parameter name assigned by the USGS." + ), + minWidth = 200, + sticky = "left" + ), + + "pcode" = reactable::colDef( + header = htmltools::tags$div("Parameter code", + title = "Parameter code assigned by the USGS." + ) + ), + + "mcl" = reactable::colDef( + header = htmltools::tags$div("MCL", + title = "Maximum Contaminant Level (MCL), a standard set by the EPA for drinking water quality." + ), + cell = function(value) { + format(value, big.mark = ",", scientific = FALSE) + }, + na = "NA", + filterMethod = htmlwidgets::JS("filterMinValue"), + filterInput = htmlwidgets::JS("rangeFilter") + ), + + "hhbp_noncancer" = reactable::colDef( + header = htmltools::tags$div("Chronic Noncancer HHBP", + title = "EPA Chronic Noncancer HHBPs." + ), + cell = function(value) { + format(value, big.mark = ",", scientific = FALSE) + }, + na = "NA", + filterMethod = htmlwidgets::JS("filterMinValue"), + filterInput = htmlwidgets::JS("rangeFilter") + ), + + "hhbp_cancer_min" = reactable::colDef( + header = htmltools::tags$div("Minimum carcinogenic HHBP", + title = "EPA Carcinogenic HHBPs for a one-in-one million cancer risk." + ), + cell = function(value) { + format(value, big.mark = ",", scientific = FALSE) + }, + na = "NA", + filterMethod = htmlwidgets::JS("filterMinValue"), + filterInput = htmlwidgets::JS("rangeFilter") + ), + + "hhbp_cancer_max" = reactable::colDef( + header = htmltools::tags$div("Maximum carcinogenic HHBP", + title = "EPA Carcinogenic HHBPs for a one-in-ten thousand cancer risk." + ), + cell = function(value) { + format(value, big.mark = ",", scientific = FALSE) + }, + na = "NA", + filterMethod = htmlwidgets::JS("filterMinValue"), + filterInput = htmlwidgets::JS("rangeFilter") + ), + + "hbsl_noncancer" = reactable::colDef( + header = htmltools::tags$div("Noncancer HBSL", + title = "USGS Noncancer HBSLs." + ), + cell = function(value) { + format(value, big.mark = ",", scientific = FALSE) + }, + na = "NA", + filterMethod = htmlwidgets::JS("filterMinValue"), + filterInput = htmlwidgets::JS("rangeFilter") + ), + + "hbsl_cancer_min" = reactable::colDef( + header = htmltools::tags$div("Minimum cancer HBSL", + title = "USGS Cancer HBSLs for a one-in-one million cancer risk." + ), + cell = function(value) { + format(value, big.mark = ",", scientific = FALSE) + }, + na = "NA", + filterMethod = htmlwidgets::JS("filterMinValue"), + filterInput = htmlwidgets::JS("rangeFilter") + ), + + "hbsl_cancer_max" = reactable::colDef( + header = htmltools::tags$div("Maximum cancer HBSL", + title = "USGS Cancer HBSLs for a one-in-ten thousand cancer risk." + ), + cell = function(value) { + format(value, big.mark = ",", scientific = FALSE) + }, + na = "NA", + filterMethod = htmlwidgets::JS("filterMinValue"), + filterInput = htmlwidgets::JS("rangeFilter") + ), + + "remark" = reactable::colDef( + header = htmltools::tags$div("Remark", + title = "Benchmark remarks that provide additional information about some MCLs, HHBPs, and HBSLs." + ), + minWidth = 400 + ) +) + +data[, names(columns)] |> + reactable::reactable( + columns = columns, + rownames = FALSE, + filterable = TRUE, + showPageSizeOptions = TRUE, + pageSizeOptions = c(5, 10, 25, 50, 100), + striped = TRUE, + compact = TRUE, + elementId = "benchmarks-table" + ) + +``` + +```{r, echo=FALSE, results="asis"} + +fontawesome::fa("download") |> + htmltools::tagList("Download as CSV") |> + htmltools::tags$button( + onclick = "Reactable.downloadDataCSV('benchmarks-table', 'benchmarks.csv')", + title = "Download the filtered data table as a Comma-Separated Values (CSV) formatted file." + ) |> + htmltools::tagList() |> + htmltools::p() + +``` diff --git a/vignettes/cities.Rmd b/vignettes/cities.Rmd index 5b348cd6e183b9119ce9cc249bb51977abdc4a2e..4d41e24b15f7339fa66000eae6f4f6e7eaef881b 100644 --- a/vignettes/cities.Rmd +++ b/vignettes/cities.Rmd @@ -2,7 +2,7 @@ title: "Cities and Towns" --- -Cities and towns (populated places) in the vicinity of Idaho National Laboratory, eastern Idaho as of January 1, 2022. +Cities and towns (populated places) in the vicinity of Idaho National Laboratory, eastern Idaho as of January 1, 2022. For additional details, refer to the package documentation associated with the [`cities`](../reference/cities.html) dataset. ```{r, map, echo=FALSE, out.height="350px", out.width="100%"} diff --git a/vignettes/counties.Rmd b/vignettes/counties.Rmd index 6f97b984115dc3a141a4b3fedb60bd6012ac34d7..ddd9c122ad806e70bd5b8c917c06fddab699b6ef 100644 --- a/vignettes/counties.Rmd +++ b/vignettes/counties.Rmd @@ -2,7 +2,7 @@ title: "County Boundaries" --- -County boundaries in the vicinity of Idaho National Laboratory, eastern Idaho, as of January 1, 2022. +County boundaries in the vicinity of Idaho National Laboratory, eastern Idaho, as of January 1, 2022. For additional details, refer to the package documentation associated with the [`counties`](../reference/counties.html) dataset. ```{r, map, echo=FALSE, out.height="350px", out.width="100%"} diff --git a/vignettes/dem.Rmd b/vignettes/dem.Rmd index 00f3174f97d432b49b70aef3c6f52e0f3059a0d2..9a0626eba6c3b1a739e640e1fbcdd5779173cd47 100644 --- a/vignettes/dem.Rmd +++ b/vignettes/dem.Rmd @@ -12,10 +12,7 @@ res <- terra::res(r) |> formatC(big.mark = ",") ``` The digital elevation model (DEM) for the Idaho National Laboratory and its vicinity in eastern Idaho. -A DEM is a representation of the land surface that uses a digital grid to describe the elevation values of the terrain. -The spatial grid is composed of `r dim[1]` rows and `r dim[2]` columns, -and has cell sizes that are constant at `r res[1]` meters by `r res[2]` meters. -Land-surface elevations are shown in feet above the North American Vertical Datum of 1988 (NAVD 88). +For additional details, refer to the package documentation associated with the [`dem`](../reference/dem.html) dataset. ```{r, map, echo=FALSE, out.height="350px", out.width="100%"} diff --git a/vignettes/dl.Rmd b/vignettes/dl.Rmd new file mode 100644 index 0000000000000000000000000000000000000000..7d87efdd3ac5b8365f3bf4de15de97bc100191e4 --- /dev/null +++ b/vignettes/dl.Rmd @@ -0,0 +1,105 @@ +--- +title: "Laboratory Detection Limits" +--- + +```{r, child="../man/rmd/JS.Rmd"} +``` + +Analytical method detection limits of selected radionuclides based on laboratory procedures. For additional details, refer to the package documentation associated with the [`dl`](../reference/dl.html) dataset. + +```{r, echo=FALSE} + +data <- inldata::dl + +filter_input <- function(values, name) { + choices <- values |> unique() |> stats::na.omit() |> as.character() |> sort() + htmltools::tags$select( + onchange = sprintf("Reactable.setFilter('dl-table', '%s', event.target.value || undefined)", name), + htmltools::tags$option(value = "", "All"), + lapply(choices, FUN = htmltools::tags$option), + "aria-label" = paste("Filter", name), + style = "width: 100%; height: 28px;" + ) +} + +urls <- c( + "Bartholomay and others (2003, table 9)" = "https://doi.org/10.3133/ofr0342", + "Bartholomay and others (2014, table D1)" = "https://pubs.usgs.gov/of/2014/1146/", + "Bartholomay and others (2021, table 4.1)" = "https://doi.org/10.3133/ofr20211004", + "Bodnar and Percival (1982)" = NA_character_ +) +hrefs <- urls[as.character(data$reference)] |> as.character() + +columns <- list( + + "parm_nm" = reactable::colDef( + header = htmltools::tags$div("Parameter name", + title = "A long parameter name assigned by the USGS." + ), + minWidth = 200, + sticky = "left" + ), + + "pcode" = reactable::colDef( + header = htmltools::tags$div("Parameter code", + title = "Parameter code assigned by the USGS." + ) + ), + + "lab_det_lim_va" = reactable::colDef( + header = htmltools::tags$div("Laboratory DL", + title = "Laboratory detection limit (DL) concentration." + ), + filterMethod = htmlwidgets::JS("filterMinValue"), + filterInput = htmlwidgets::JS("rangeFilter") + ), + + "min_dt" = reactable::colDef( + header = htmltools::tags$div("Start date", + title = "Date that the detection limit went into effect." + ) + ), + + "reference" = reactable::colDef( + header = htmltools::tags$div("Reference", + title = "Source of dl concentration limits." + ), + minWidth = 200, + cell = function(value, index) { + href <- hrefs[index] + if (is.na(href)) { + value + } else { + htmltools::tags$a(href = href, target = "_blank", value) + } + }, + filterInput = filter_input + ) +) + +data[, names(columns)] |> + reactable::reactable( + columns = columns, + rownames = FALSE, + filterable = TRUE, + showPageSizeOptions = TRUE, + pageSizeOptions = c(5, 10, 25, 50, 100), + striped = TRUE, + compact = TRUE, + elementId = "dl-table" + ) + +``` + +```{r, echo=FALSE, results="asis"} + +fontawesome::fa("download") |> + htmltools::tagList("Download as CSV") |> + htmltools::tags$button( + onclick = "Reactable.downloadDataCSV('dl-table', 'dl.csv')", + title = "Download the filtered data table as a Comma-Separated Values (CSV) formatted file." + ) |> + htmltools::tagList() |> + htmltools::p() + +``` diff --git a/vignettes/download.Rmd b/vignettes/download.Rmd new file mode 100644 index 0000000000000000000000000000000000000000..34df8f24abf59b95602a05943ebe017fc9320672 --- /dev/null +++ b/vignettes/download.Rmd @@ -0,0 +1,166 @@ +--- +title: "Download" +resource_files: + - download_files +--- + +The **inldata** package offers a comprehensive collection of datasets in various formats. Users may download individual files for specific data needs, or all datasets in a compressed ZIP file for efficiency. These datasets can be easily imported into data analysis software or programming languages for further analysis. + +```{r include=FALSE} + +destdir <- "download_files" +paste0(destdir, "/*") |> unlink() + +files <- inldata::write_datasets( + package = "inldata", + destdir = destdir, + gzip = c("json", "geojson"), + pretty = FALSE, + full_names = FALSE +) +exts <- inldata::get_file_ext(files) +fmts <- exts |> unique() |> sort() +paths <- lapply(fmts, FUN = function(x) files[exts %in% x]) +names(paths) <- fmts + +cols <- rbind( + c( + "txt", + "Text", + "Text-based format." + ), + c( + "csv", + "CSV", + "Text-based format storing tabular data, commonly used for data exchange due to its simplicity." + ), + c( + "xlsx", + "Spreadsheet", + "A Microsoft Excel file, part of the Office Open XML standard, used for storing and processing tabular data." + ), + c( + "parquet", + "Parquet", + "An Arrow Parquet file, used for efficient storage and high-speed processing of big data." + ), + c( + "json.gz", + "JSON", + paste( + "A text-based format compressed using Gzip.", + "Widely used for system interoperability due to its readability." + ) + ), + c( + "geojson.gz", + "GeoJSON", + paste( + "A text-based format compressed using Gzip.", + "Used for encoding geographic features and their nonspatial attributes." + ) + ), + c( + "zip", + "Shapefile", + paste( + "A compressed (ZIP format) file serving as a container for storing geographical features", + "and their associated attributes, optimizing transfer efficiency." + ) + ), + c( + "tiff", + "GeoTIFF", + paste( + "A standard TIFF (Tagged Image File Format) with embedded geospatial metadata", + "allowing geographic information to be associated with the image data." + ) + ) +) |> + as.data.frame() +colnames(cols) <- c("ext", "header", "title") +cols <- cols[cols$ext %in% exts, ] + +paths <- paths[cols$ext] +rows <- unlist(paths) |> + basename() |> + tools::file_path_sans_ext(compression = TRUE) |> + unique() + +m <- matrix( + nrow = length(rows), + ncol = nrow(cols), + dimnames = list(rows, cols$ext) +) + +hrefs <- unlist(paths) |> + as.character() +sizes <- inldata::get_file_size(hrefs) +titles <- sprintf("%s (%s)", basename(hrefs), sizes) +icon <- fontawesome::fa( + name = "file", + fill = "steelblue", + prefer_type = "solid" +) +data <- sprintf( + fmt = "<a href='%s' title='%s' target='_blank'>%s</a>", + hrefs, titles, icon +) + +i <- basename(hrefs) |> + tools::file_path_sans_ext(compression = TRUE) |> + match(rownames(m)) +j <- inldata::get_file_ext(hrefs) |> + match(colnames(m)) +m[cbind(i, j)] <- data +tbl <- m + +m <- utils::data(package = "inldata")$results +titles <- m[, "Title"] +names(titles) <- m[, "Item"] +titles <- titles[rownames(tbl)] + +ds_nm <- sprintf( + fmt = "<a href='../reference/%s.html' title='%s'>%s</a>", + rownames(tbl), titles, rownames(tbl) +) +tbl <- cbind(ds_nm, tbl) +rownames(tbl) <- NULL + +headers <- c("Dataset", cols$header) +titles <- c("Name of the package dataset.", cols$title) +col_names <- sprintf( + fmt = "<span title='%s'>%s</span>", + titles, headers +) + +ver <- utils::packageVersion(pkg = "inldata") |> format() +archive <- sprintf("%s/inldata-datasets-%s.zip", destdir, ver) +checkmate::assert_path_for_output(archive, overwrite = TRUE) +archive::archive_write_dir(archive, dir = destdir, format = "zip") +archive_size <- inldata::get_file_size(archive) + +``` + +```{r echo=FALSE, results="asis"} + +options(knitr.kable.NA = '-') +knitr::kable(tbl, row.names = FALSE, col.names = col_names) + +``` + +```{r echo=FALSE, results="asis"} + +fontawesome::fa("download") |> + htmltools::tagList( + sprintf("Download all (%s)", archive_size) + ) |> + htmltools::a( + href = archive, + target = "_blank", + title = "Download a unified ZIP file that contains all compressed files.", + ) |> + htmltools::tagList() |> + htmltools::p() + +``` diff --git a/vignettes/esrp.Rmd b/vignettes/esrp.Rmd index 3d47dd6741e2154a475dfed6dc63edd0349bfe6f..a387400d99b64f4064e0b9c2d3488bbadd56aedd 100644 --- a/vignettes/esrp.Rmd +++ b/vignettes/esrp.Rmd @@ -3,11 +3,7 @@ title: "Eastern Snake River Plain Boundary" --- Boundary of the eastern Snake River Plain (ESPR), Idaho. -The ESPR is a structural basin that extends about 200 miles in a northeast direction and is 50-70 miles wide. -The basin is bounded by faults on the northwest and by down warping and faulting on the southeast. -It has been filled with basaltic lava flows interbedded with terrestrial sediments. -The combination of basaltic rock and sedimentary deposits forms the ESRP aquifer, -which is the primary source of groundwater in the basin +For additional details, refer to the package documentation associated with the [`esrp`](../reference/esrp.html) dataset. ```{r, map, echo=FALSE, out.height="350px", out.width="100%"} diff --git a/vignettes/facilities.Rmd b/vignettes/facilities.Rmd index 20bf0fbaff54695690dab2999893abeb8793cf3b..9fed9536c4491fefce9b9d27cb582a388860300e 100644 --- a/vignettes/facilities.Rmd +++ b/vignettes/facilities.Rmd @@ -2,7 +2,7 @@ title: "Idaho National Laboratory Facilities" --- -Federal research facilities at the Idaho National Laboratory (INL). The INL facilities have been the primary source of radioactive and chemical waste constituents in the water from the eastern Snake River Plain aquifer and in perched groundwater zones at or near the INL. This is due to the wastewater disposal practices at the INL facilities. +Federal research facilities at the Idaho National Laboratory (INL). For additional details, refer to the package documentation associated with the [`facilities`](../reference/facilities.html) dataset. ```{r, map, echo=FALSE, out.height="350px", out.width="100%"} diff --git a/vignettes/idaho.Rmd b/vignettes/idaho.Rmd index 72bae6f486883ec0a7d7d3303ed7524e2ae74f5d..2f0f8770f191551421b51f8bee43b44ce9ea7411 100644 --- a/vignettes/idaho.Rmd +++ b/vignettes/idaho.Rmd @@ -2,8 +2,7 @@ title: "State of Idaho Boundary" --- -A simplified representation of the boundary of Idaho, -a state located in the northwestern region of the United States. +A simplified representation of the boundary of Idaho, a state located in the northwestern region of the United States. For additional details, refer to the package documentation associated with the [`idaho`](../reference/idaho.html) dataset. ```{r, map, echo=FALSE, out.height="350px", out.width="100%"} diff --git a/vignettes/inl.Rmd b/vignettes/inl.Rmd index b351f209d6653479ca8f28467b009a5db094a77c..5815cfd1e5b6b5d3683fdaa15bf2f2d0ba8e542c 100644 --- a/vignettes/inl.Rmd +++ b/vignettes/inl.Rmd @@ -2,11 +2,7 @@ title: "Idaho National Laboratory Boundary" --- -Geographic limits of the Idaho National Laboratory ([INL](https://inl.gov/)). -The INL is located on the west-central part of the eastern Snake River Plain -and covers an area of approximately 890 square miles. -It was established in 1949 to develop atomic energy, nuclear safety, defense programs, -environmental research, and advanced energy concepts. +Geographic limits of the Idaho National Laboratory ([INL](https://inl.gov/)). For additional details, refer to the package documentation associated with the [`inl`](../reference/inl.html) dataset. ```{r, map, echo=FALSE, out.height="350px", out.width="100%"} diff --git a/vignettes/iwd.Rmd b/vignettes/iwd.Rmd index dbf1010fa933ad18332c20a4acae76f2f4e075fe..50f65890a5843c54d9d4256b79a9d139d57426b0 100644 --- a/vignettes/iwd.Rmd +++ b/vignettes/iwd.Rmd @@ -2,9 +2,7 @@ title: "Industrial Waste Ditch" --- -An industrial waste ditch located near the Naval Reactors Facility (NRF) in eastern Idaho. -The NRF discharges its wastewater to this 1.65-mile-long waste ditch. -The waste ditch was initially used in 1953 to dispose of non-radioactive, non-sewage industrial wastewater. +An industrial waste ditch located near the Naval Reactors Facility (NRF) in eastern Idaho. For additional details, refer to the package documentation associated with the [`iwd`](../reference/iwd.html) dataset. ```{r, map, echo=FALSE, out.height="350px", out.width="100%"} diff --git a/vignettes/lakes.Rmd b/vignettes/lakes.Rmd index 34a1591bdab40561881303d157de05d7ce48e687..74df55608c368299ccc53c9d875eb5e7a55dc072 100644 --- a/vignettes/lakes.Rmd +++ b/vignettes/lakes.Rmd @@ -2,7 +2,7 @@ title: "Lakes and Ponds" --- -Perennial lakes and ponds in the vicinity of the Idaho National Laboratory (INL) in eastern Idaho. +Perennial lakes and ponds in the vicinity of the Idaho National Laboratory (INL) in eastern Idaho. For additional details, refer to the package documentation associated with the [`lakes`](../reference/lakes.html) dataset. ```{r, map, echo=FALSE, out.height="350px", out.width="100%"} diff --git a/vignettes/parameters.Rmd b/vignettes/parameters.Rmd index 6d9015192d69255f2fa190747467d49f53e3dbbf..30314cbac19779159c0ed825883b3eaa26dbd622 100644 --- a/vignettes/parameters.Rmd +++ b/vignettes/parameters.Rmd @@ -14,7 +14,7 @@ nparameters <- nrow(inldata::parameters) |> format(big.mark = ",") ``` -Parameter information for `r nparameters` chemical constituents, organic compounds, and radionuclides measured for in water samples collected from monitoring sites in the U.S. Geological Survey (USGS) water-quality monitoring network, Idaho National Laboratory and vicinity, Idaho, `r dt_range[1]`--`r dt_range[2]`. +Parameter information for `r nparameters` chemical constituents, organic compounds, and radionuclides measured for in water samples collected from monitoring sites in the U.S. Geological Survey (USGS) water-quality monitoring network, Idaho National Laboratory and vicinity, Idaho, `r dt_range[1]`--`r dt_range[2]`. For additional details, refer to the package documentation associated with the [`parameters`](../reference/parameters.html) dataset. ```{r, echo=FALSE} @@ -70,9 +70,9 @@ columns <- list( minWidth = 140 ), - "parm_unit" = reactable::colDef( - header = htmltools::tags$div("Parameter units", - title = "Parameter units of measure." + "unit_cd" = reactable::colDef( + header = htmltools::tags$div("Measurment Units", + title = "Parameter units of measurement." ), minWidth = 120, filterInput = filter_input @@ -95,7 +95,7 @@ columns <- list( title = "Number of records associated with the parameter." ), cell = function(value) { - format(value, big.mark = ",") + format(value, big.mark = ",", scientific = FALSE) }, filterMethod = htmlwidgets::JS("filterMinValue"), filterInput = htmlwidgets::JS("rangeFilter") @@ -106,7 +106,7 @@ columns <- list( title = "Number of sampling sites where the parameter was observed." ), cell = function(value) { - format(value, big.mark = ",") + format(value, big.mark = ",", scientific = FALSE) }, filterMethod = htmlwidgets::JS("filterMinValue"), filterInput = htmlwidgets::JS("rangeFilter") diff --git a/vignettes/percponds.Rmd b/vignettes/percponds.Rmd index ddf1a39fa7d3fc5170cac14a1b29ad0d50d4431e..78b8c94ef2cc346480dbcbda0a45b839cec41241 100644 --- a/vignettes/percponds.Rmd +++ b/vignettes/percponds.Rmd @@ -2,9 +2,7 @@ title: "Percolation Ponds" --- -Percolation ponds in the vicinity of Idaho National Laboratory (INL), eastern Idaho. -Wastewater from facilities at the INL has been and is currently disposed of in percolation (infiltration), -evaporation (lined and unlined), and infiltration ponds. +Percolation ponds in the vicinity of Idaho National Laboratory (INL), eastern Idaho. Wastewater from facilities at the INL has been and is currently disposed of in percolation (infiltration), evaporation (lined and unlined), and infiltration ponds. For additional details, refer to the package documentation associated with the [`percponds`](../reference/percponds.html) dataset. ```{r, map, echo=FALSE, out.height="350px", out.width="100%"} @@ -13,9 +11,11 @@ spdf <- inldata::percponds |> sf::st_transform("+proj=longlat +datum=WGS84") spdf$popup <- paste( "<b>Name:</b> %s", "<b>Facility:</b> %s", + "<b>Start year:</b> %s", + "<b>End year:</b> %s", sep = "<br>" ) |> - sprintf(spdf$name, spdf$facility_id) + sprintf(spdf$name, spdf$facility, spdf$min_dt, spdf$max_dt) map <- webmap::make_map( maps = c("Shaded Relief", "Topo", "Imagery", "OSM", "Hydrography"), diff --git a/vignettes/roads.Rmd b/vignettes/roads.Rmd index 3ef56b82562269960ba42b996e63f361e3f8b526..730219012b5cea570c08beb390fb5b721043e482 100644 --- a/vignettes/roads.Rmd +++ b/vignettes/roads.Rmd @@ -2,7 +2,7 @@ title: "Road Network" --- -Road network in the vicinity of Idaho National Laboratory, eastern Idaho. +Road network in the vicinity of Idaho National Laboratory, eastern Idaho. For additional details, refer to the package documentation associated with the [`roads`](../reference/roads.html) dataset. ```{r, map, echo=FALSE, out.height="350px", out.width="100%"} diff --git a/vignettes/sites.Rmd b/vignettes/sites.Rmd index 2b2f717299e38b96ee409ebe8f7ceb285e73f895..cd205f7c0d9bbd2cc2107ea85a3d1d7fd920fd29 100644 --- a/vignettes/sites.Rmd +++ b/vignettes/sites.Rmd @@ -23,6 +23,7 @@ The monitoring networks comprise a total of `r nsites` sites: `r naquifer` wells within the aquifer monitoring network, `r nperched` wells in the perched-groundwater monitoring network, and `r nsurface` stream or lake sites in the surface-water monitoring network. +For additional details, refer to the package documentation associated with the [`sites`](../reference/sites.html) dataset. ```{r, map, echo=FALSE, out.height="350px", out.width="100%"} @@ -130,7 +131,10 @@ columns <- list( "coord_acy_va" = reactable::colDef( header = htmltools::tags$div("Coordinate accuracy (sec)", title = "Accuracy of latitude/longitude value in seconds (sec)." - ) + ), + na = "NA", + filterMethod = htmlwidgets::JS("filterMinValue"), + filterInput = htmlwidgets::JS("rangeFilter") ), "alt_va" = reactable::colDef( @@ -141,7 +145,7 @@ columns <- list( ) ), cell = function(value) { - format(value, big.mark = ",") + format(value, big.mark = ",", scientific = FALSE) }, na = "NA", filterMethod = htmlwidgets::JS("filterMinValue"), @@ -153,7 +157,7 @@ columns <- list( title = "Accuracy of the land surface reference point elevation, in feet." ), cell = function(value) { - format(value, big.mark = ",") + format(value, big.mark = ",", scientific = FALSE) }, na = "NA", filterMethod = htmlwidgets::JS("filterMinValue"), @@ -169,7 +173,7 @@ columns <- list( ) ), cell = function(value) { - format(value, big.mark = ",") + format(value, big.mark = ",", scientific = FALSE) }, na = "NA", filterMethod = htmlwidgets::JS("filterMinValue"), @@ -184,7 +188,7 @@ columns <- list( ) ), cell = function(value) { - format(value, big.mark = ",") + format(value, big.mark = ",", scientific = FALSE) }, na = "NA", filterMethod = htmlwidgets::JS("filterMinValue"), @@ -254,7 +258,7 @@ columns <- list( ) ), cell = function(value) { - format(value, big.mark = ",") + format(value, big.mark = ",", scientific = FALSE) }, filterMethod = htmlwidgets::JS("filterMinValue"), filterInput = htmlwidgets::JS("rangeFilter") @@ -265,7 +269,7 @@ columns <- list( title = "Number of water-quality samples collected from the site." ), cell = function(value) { - format(value, big.mark = ",") + format(value, big.mark = ",", scientific = FALSE) }, filterMethod = htmlwidgets::JS("filterMinValue"), filterInput = htmlwidgets::JS("rangeFilter") @@ -276,7 +280,7 @@ columns <- list( title = "Number of replicate samples collected from the site." ), cell = function(value) { - format(value, big.mark = ",") + format(value, big.mark = ",", scientific = FALSE) }, filterMethod = htmlwidgets::JS("filterMinValue"), filterInput = htmlwidgets::JS("rangeFilter") diff --git a/vignettes/streams.Rmd b/vignettes/streams.Rmd index 227a406274576956c1e3c0dab4de292ba8b82e7a..8a80438a4603424eaa00a26463e6b0691ff89e7a 100644 --- a/vignettes/streams.Rmd +++ b/vignettes/streams.Rmd @@ -2,8 +2,7 @@ title: "Rivers and Streams" --- -Stream segments in the vicinity of Idaho National Laboratory (INL), eastern Idaho. -Surface water infiltrated to the eastern Snake River Plain aquifer through river and streams. +Stream segments in the vicinity of Idaho National Laboratory (INL), eastern Idaho. For additional details, refer to the package documentation associated with the [`streams`](../reference/streams.html) dataset. ```{r, map, echo=FALSE, out.height="350px", out.width="100%"} diff --git a/vignettes/units.Rmd b/vignettes/units.Rmd new file mode 100644 index 0000000000000000000000000000000000000000..5dffb2a90025626c32cc70fae81b8ef1497044a9 --- /dev/null +++ b/vignettes/units.Rmd @@ -0,0 +1,55 @@ +--- +title: "Units of Measurement" +--- + +```{r, child="../man/rmd/JS.Rmd"} +``` + +Information describing the units of measurement. For additional details, refer to the package documentation associated with the [`units`](../reference/units.html) dataset. + +```{r, echo=FALSE} + +data <- inldata::units + +columns <- list( + + "unit_cd" = reactable::colDef( + header = htmltools::tags$div("Units", + title = "Measurment abbreviation for units." + ) + ), + + "unit_ds" = reactable::colDef( + header = htmltools::tags$div("Description", + title = "Description for units of measurement." + ), + minWidth = 200 + ) +) + +data[, names(columns)] |> + reactable::reactable( + columns = columns, + rownames = FALSE, + filterable = TRUE, + showPageSizeOptions = TRUE, + pageSizeOptions = c(5, 10, 25, 50, 100), + striped = TRUE, + compact = TRUE, + elementId = "units-table" + ) + +``` + +```{r, echo=FALSE, results="asis"} + +fontawesome::fa("download") |> + htmltools::tagList("Download as CSV") |> + htmltools::tags$button( + onclick = "Reactable.downloadDataCSV('units-table', 'units.csv')", + title = "Download the filtered data table as a Comma-Separated Values (CSV) formatted file." + ) |> + htmltools::tagList() |> + htmltools::p() + +```