Commit 7883ccf0 authored by Fisher, Jason C.'s avatar Fisher, Jason C.
Browse files

Initial commit

parents
Pipeline #20842 passed with stages
in 9 minutes and 9 seconds
^\.gitattributes$
^\.gitignore$
^\.RData$
^\.Rhistory$
^Makefile$
^vignettes/cache$
^data-raw$
^code\.json$
^DISCLAIMER\.md$
^LICENSE\.md$
^CODE_OF_CONDUCT\.md$
^README\.Rmd$
^\.gitlab-ci\.yml$
# Project
* text=auto
# Text
*.csv text
*.geojson text
*.md text
*.R text
*.Rd text
*.txt text
*.tsv text
*.json text
*.yml text
data-raw/qwdata/commands.txt text eol=lf
# Binary
*.png binary
*.rda binary
/.RData
/.Rhistory
/*.tar.gz
/*.zip
# .gitlab-ci.yml for inldata
image: rocker/geospatial
stages:
- check
variables:
_R_CHECK_CRAN_INCOMING_: "false"
_R_CHECK_SUGGESTS_ONLY: "false"
_R_CHECK_FORCE_SUGGESTS_: "true"
APT_CACHE: "$CI_PROJECT_DIR/ci/lib/apt-cache"
CRAN_MIRROR: "https://cloud.r-project.org"
R_LIBS_USER: "$CI_PROJECT_DIR/ci/lib"
R_LIBS: "$CI_PROJECT_DIR/ci/lib"
BUILD_LOGS_DIR: "$CI_PROJECT_DIR/ci/logs"
NOT_CRAN: "true"
getready:
stage: .pre
script:
- mkdir -p $R_LIBS_USER
- mkdir -p $APT_CACHE
- R -e 'install.packages(c("knitr", "dataRetrieval", "inlmisc"), repos=Sys.getenv("CRAN_MIRROR"), lib=Sys.getenv("R_LIBS_USER"))'
cache:
paths:
- $R_LIBS_USER
artifacts:
paths:
- $R_LIBS_USER
buildcheck:
stage: check
script:
- mkdir -p $BUILD_LOGS_DIR
- apt-get update
- apt-get -o dir::cache::archives=${APT_CACHE} install -y --no-install-recommends qpdf pandoc pandoc-citeproc
- R CMD build . --no-build-vignettes --no-manual
- R -e 'devtools::check(document=FALSE, args="--no-tests", error_on="warning", check_dir=Sys.getenv("BUILD_LOGS_DIR"))'
artifacts:
paths:
- $BUILD_LOGS_DIR
## Code of Conduct
All contributions to- and interactions surrounding- this project will abide by the [USGS Code of Scientific Conduct](https://www2.usgs.gov/fsp/fsp_code_of_scientific_conduct.asp).
Package: inldata
Title: Collection of Datasets for the USGS-INL Aquifer Monitoring Networks
Version: 1.0.0
Authors@R: person(given = c("Jason", "C."),
family = "Fisher", role=c("aut", "cre"),
email = "jfisher@usgs.gov",
comment = c(ORCID="0000-0001-9032-8912"))
Description: Contains data for the U.S. Geological Survey-Idaho National
Laboratory (USGS-INL) aquifer monitoring networks administrated by the
Idaho National Laboratory Project Office in cooperation with the U.S.
Department of Energy.
Depends:
R (>= 3.5.0)
Suggests:
dataRetrieval,
inlmisc,
knitr,
maptools,
raster,
rgdal,
rgeos,
sp,
stats,
tools,
utils
License: CC0
URL: https://code.usgs.gov/inl/inldata
BugReports: https://code.usgs.gov/inl/inldata/-/issues
Copyright: This software is in the public domain because it contains materials
that originally came from the United States Geological Survey (USGS), an
agency of the United States Department of Interior. For more information,
see the official USGS copyright policy at
https://www.usgs.gov/information-policies-and-instructions/copyrights-and-credits
Encoding: UTF-8
LazyData: true
LazyDataCompression: xz
RoxygenNote: 7.1.1
## Disclaimer
This software has been approved for release by the U.S. Geological Survey (USGS). Although the software has been subjected to rigorous review, the USGS reserves the right to update the software as needed pursuant to further analysis and review. No warranty, expressed or implied, is made by the USGS or the U.S. Government as to the functionality of the software and related material nor shall the fact of release constitute any such warranty. Furthermore, the software is released on condition that neither the USGS nor the U.S. Government shall be held liable for any damages resulting from its authorized or unauthorized use.
Although these data have been processed successfully on a computer system at the USGS, no warranty expressed or implied is made regarding the display or utility of the data for other purposes, nor on all computer systems, nor shall the act of distribution constitute any such warranty. The USGS or the U.S. Government shall not be held liable for improper or incorrect use of the data described and/or contained herein.
Any use of trade, product, or firm names is for descriptive purposes only and does not imply endorsement by the U.S. Government.
## License Information
This software is a product of the U.S. Geological Survey (USGS), an agency of the United States Department of Interior, which is part of the U.S. Government.
#### Cost
This software is freely distributed. There is no fee to download and (or) use this software.
#### License
Users do not need a license or permission from the USGS to use this software. Users can download and install as many copies of the software as they need. See Exceptions below.
#### Public domain
As a work of the United States Government, this USGS product is in the [public domain](http://www.usa.gov/publicdomain/label/1.0/) within the United States. You can copy, modify, distribute, and perform the work, even for commercial purposes, all without asking permission. Additionally, USGS waives copyright and related rights in the work worldwide through [CC0 1.0 Universal Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/).
#### Exceptions
This project may have numerous dependencies from other open-source software projects. The re-use and distribution of those software packages may be subject to the licenses of each of those dependencies.
# Prepare Package for Release
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGSRC := $(shell basename `pwd`)
all: docs install check clean
.PHONY: all
docs:
R -q -e 'pkgload::load_all()'
R -q -e 'roxygen2::roxygenize()'
R -q -e 'pkgbuild::clean_dll()'
.PHONY: docs
build:
cd ..
R CMD build --no-build-vignettes $(PKGSRC)
.PHONY: build
install: build
cd ..
R CMD INSTALL --build $(PKGNAME)_$(PKGVERS).tar.gz
.PHONY: install
check:
cd ..
R CMD check --no-build-vignettes --as-cran $(PKGNAME)_$(PKGVERS).tar.gz
.PHONY: check
clean:
cd ..
rm -f -r $(PKGNAME).Rcheck/
rm -f sysdata.rda
rm -f -r figures
.PHONY: clean
datasets:
cd data-raw
Rscript build-datasets.R
mv -f *.rda ../data/
.PHONY: datasets
readme:
R -q -e 'rmarkdown::render('\''README.Rmd'\'')'
.PHONY: readme
# Generated by roxygen2: do not edit by hand
# inldata 1.0.0
- Host repo on USGS OpenSource GitLab (code.usgs.gov)
#' Background Concentrations
#'
#' Water-quality background concentrations for
#' selected radionuclides, organic compounds, and chemical constituents
#' analyzed for in water from the Eastern Snake River Plain aquifer at and near
#' the Idaho National Laboratory (INL).
#' Background concentrations are either naturally occurring or anthropogenic,
#' and are not influenced by waste and wastewater disposal at the INL
#' (Bartholomay and Hall, 2016, p. 3).
#'
#' @format A data.frame with 73 records and 4 variables:
#' \describe{
#' \item{\code{parm_cd}}{U.S. Geological Survey 5-digit parameter code,
#' see \code{\link{parameters}} dataset for details.}
#' \item{\code{bkgrd_min}, \code{bkgrd_max}}{minimum and maximum limits of background concentration}
#' \item{\code{reference}}{source of background concentration limits.
#' Reference citations are:
#' \code{"Bartholomay and Hall (2016)"},
#' \code{"Knobel and others (1992)"},
#' \code{"Michel (1989)"}, and
#' \code{"Orr and others (1991)"}.}
#' }
#' Row names for the data frame indicate the Substance Registry Services
#' (\href{https://iaspub.epa.gov/sor_internet/registry/substreg/home/overview/home.do}{SRS})
#' name and parameter units.
#'
#' @references Bartholomay, R.C., and Hall, L.F., 2016, Evaluation of background concentrations
#' of selected chemical and radiochemical constituents in groundwater in the
#' eastern Snake River Plain aquifer at and near the Idaho National Laboratory, Idaho:
#' U.S. Geological Survey Scientific Investigations Report 2016--5056, (DOE/ID--22237), 19 p.,
#' \url{https://doi.org/10.3133/sir20165056}.
#'
#' Knobel, L.L., Orr, B.R., and Cecil, L.D., 1992, Summary of background concentrations of
#' selected radiochemical and chemical constituents in groundwater from the Snake River
#' Plain aquifer, Idaho: estimated from an analysis of previously published data:
#' Journal of the Idaho Academy of Science, v. 28, no. 1, p. 48--61.
#'
#' Michel, R.L., 1989, Tritium deposition in the continental United States, 1953--83:
#' U.S. Geological Survey Water Resources Investigations Report 89--4072, 46 p.,
#' \url{https://doi.org/10.3133/wri894072}.
#'
#' Orr, B.R., Cecil, L.D., and Knobel, L.L., 1991, Background concentrations of
#' selected radionuclides, organic compounds, and chemical constituents in
#' ground water in the vicinity of the Idaho National Engineering Laboratory:
#' U.S. Geological Survey Water-Resources Investigations Report 91--4015 (DOE/ID--22094), 52 p.,
#' \url{https://doi.org/10.3133/wri914015}.
#'
#' @keywords datasets
#'
#' @examples
#' str(background)
#' rownames(background)
#'
"background"
#' Benchmark Concentrations
#'
#' Water-quality benchmark concentrations of
#' selected radionuclides, organic compounds, and chemical constituents.
#' Benchmarks include:
#' the U.S. Environmental Protection Agency (USEPA) Maximum Contaminant Levels
#' (\href{https://www.epa.gov/ground-water-and-drinking-water/national-primary-drinking-water-regulations}{MCLs}) and
#' Human Health Benchmarks for Pesticides
#' (\href{https://iaspub.epa.gov/apex/pesticides/f?p=HHBP:home}{HHBPs}), and
#' the U.S. Geological Survey (USGS) Health-Based Screening Levels
#' (\href{https://water.usgs.gov/nawqa/HBSL}{HBSLs}).
#'
#' @format A data.frame with 74 records and 9 variables:
#' \describe{
#' \item{\code{parm_cd}}{USGS 5-digit parameter code, see \code{\link{parameters}} dataset for details.}
#' \item{\code{mcl}}{USEPA MCLs.}
#' \item{\code{hhbp_noncancer}}{USEPA Chronic Noncancer HHBPs}
#' \item{\code{hhbp_cancer_min}}{USEPA Carcinogenic HHBPs for a one-in-one million cancer risk.}
#' \item{\code{hhbp_cancer_max}}{USEPA Carcinogenic HHBPs for a one-in-ten thousand cancer risk.}
#' \item{\code{hbsl_noncancer}}{USGS Noncancer HBSLs}
#' \item{\code{hbsl_cancer_min}}{USGS Cancer HBSLs for a one-in-one million cancer risk.}
#' \item{\code{hbsl_cancer_max}}{USGS Cancer HBSLs for a one-in-ten thousand cancer risk.}
#' \item{\code{remark}}{comments}
#' }
#' Row names for the data frame indicate the Substance Registry Services
#' (\href{https://iaspub.epa.gov/sor_internet/registry/substreg/home/overview/home.do}{SRS})
#' name and parameter units.
#'
#' @source Many of the water-quality benchmarks were accessed from the
#' U.S. Geological Survey Health-Based Screening Levels database,
#' accessed on August 8, 2017, from \url{https://water.usgs.gov/nawqa/HBSL}.
#' Benchmarks for total Trihalomethanes, Tritium, and Strontium-90 were
#' provided by the U.S. Environmental Protection Agency (2015).
#' Note that MCL benchmark values reported in millirem per year were
#' substituted with a 50 picocuries per liter screening level.
#'
#' @references U.S. Environmental Protection Agency, 2015,
#' Protection of environment---Code of Federal Regulations 40,
#' Part 141, Subpart G, National Primary Drinking Water Regulations,
#' Maximum Contaminant Levels and Maximum Residual Disinfectant Levels:
#' Washington, D.C., Office of the Federal Register,
#' National Archives and Records Administration.
#'
#' @keywords datasets
#'
#' @examples
#' str(benchmarks)
#' rownames(benchmarks)
#'
"benchmarks"
#' Cities and Towns
#'
#' Cities and towns (populated places) in the vicinity of Idaho National Laboratory, eastern Idaho.
#'
#' @format A SpatialPointsDataFrame of the \pkg{sp} package with 24 records and 16 variables.
#' See \code{\link{projection}} dataset for coordinate reference system information.
#'
#' @source U.S. Department of Commerce, U.S. Census Bureau, Geography Division/Cartographic Products Branch.
#' Spatial extract from the Master Address File / Topologically Integrated Geographic Encoding and Referencing
#' (\href{https://catalog.data.gov/dataset/tiger-line-shapefile-2019-series-information-for-the-current-place-state-based-shapefile}{MAF/TIGER}) Database (MTDB),
#' 2019 data collection, released April 2, 2020.
#'
#' @keywords datasets
#'
#' @examples
#' inlmisc::PlotMap(cities, dms.tick = TRUE)
#' sp::plot(cities, pch = 19, add = TRUE)
#' raster::text(cities, cities@data$NAME,
#' pos = 1, cex = 0.6)
#' str(cities@data)
#'
"cities"
#' County Boundaries
#'
#' Boundaries of counties
#' in the vicinity of Idaho National Laboratory, eastern Idaho, as of January 1, 2015.
#'
#' @format A SpatialLines of the \pkg{sp} package with 48 features.
#' See \code{\link{projection}} dataset for coordinate reference system information.
#'
#' @source U.S. Department of Commerce, U.S. Census Bureau, Geography Division/Cartographic Products Branch.
#' Spatial extract from the Master Address File / Topologically Integrated Geographic Encoding and Referencing
#' (\href{https://catalog.data.gov/dataset/tiger-line-shapefile-2019-series-information-for-the-current-place-state-based-shapefile}{MAF/TIGER}) Database (MTDB),
#' 2019 data collection, released April 2, 2020.
#'
#' @keywords datasets
#'
#' @examples
#' inlmisc::PlotMap(counties, dms.tick = TRUE)
#' sp::plot(counties, lty = 5, add = TRUE)
#'
"counties"
#' Laboratory Detection Limits
#'
#' Analytical method detection limits of selected radionuclides,
#' which are based on laboratory procedures.
#'
#' @format A data.frame with 8 records and 6 variables:
#' \describe{
#' \item{\code{srsname}}{Substance Registry Services
#' (\href{https://iaspub.epa.gov/sor_internet/registry/substreg/home/overview/home.do}{SRS}) name.}
#' \item{\code{parm_cd}}{U.S. Geological Survey 5-digit parameter code.}
#' \item{\code{parameter_units}}{parameter units}
#' \item{\code{lab_det_lim_va}}{laboratory detection limit concentration}
#' \item{\code{sdate}}{date that the detection limit went into effect.}
#' \item{\code{reference}}{source of detection limit.}
#' }
#'
#' @source Detection limits reported by:
#' Bartholomay and others (2003, table 9);
#' Bartholomay and others (2014, table D1); and
#' Bodnar and Percival (1982).
#'
#' @references Bartholomay, R.C., Knobel, L.L., and Rousseau, J.P., 2003,
#' Field methods and quality-assurance plan for quality-of-water activities,
#' U.S. Geological Survey, Idaho National Engineering and Environmental Laboratory, Idaho:
#' U.S. Geological Survey Open-File Report 03--42 (DOE/ID--22182), 45 p.
#' \url{https://doi.org/10.3133/ofr0342}.
#'
#' Bartholomay, R.C., Maimer, N.V., and Wehnke, A.J., 2014,
#' Field methods and quality-assurance plan for water-quality activities and
#' water-level measurements, U.S. Geological Survey, Idaho National Laboratory, Idaho:
#' U.S. Geological Survey Open-File Report 2014--1146 (DOE/ID--22230), 64 p.
#' \url{https://pubs.usgs.gov/of/2014/1146/}.
#'
#' Bodnar, L.Z., and Percival, D.R., eds., 1982,
#' Analytical Chemistry Branch procedures manual---Radiological and Environmental Sciences Laboratory:
#' U.S. Department of Energy Report IDO--12096 [variously paged].
#'
#' @keywords datasets
#'
#' @examples
#' str(dl)
#'
"dl"
#' Eastern Snake River Plain Boundary
#'
#' Boundary of the eastern Snake River Plain, Idaho.
#'
#' @format A SpatialPolygonsDataFrame of the \pkg{sp} package object with 1 feature and 1 variable.
#' See \code{\link{projection}} dataset for coordinate reference system information.
#'
#' @source U.S. Geological Survey
#' \href{https://www.usgs.gov/centers/id-water/science/idaho-national-laboratory-project-office}{Idaho National Laboratory Project Office}
#'
#' @keywords datasets
#'
#' @examples
#' inlmisc::PlotMap(esrp, dms.tick = TRUE)
#' sp::plot(esrp, col = "red", add = TRUE)
#' str(esrp@data)
#'
"esrp"
#' Idaho National Laboratory Facilities
#'
#' Federal research facilities at the
#' Idaho National Laboratory (\href{https://www.inl.gov/}{INL}).
#'
#' @format A SpatialPolygonsDataFrame object with 7 features and 1 variable.
#' See \code{\link{projection}} dataset for coordinate reference system information.
#'
#' @source U.S. Geological Survey
#' \href{https://www.usgs.gov/centers/id-water/science/idaho-national-laboratory-project-office}{Idaho National Laboratory Project Office}
#'
#' @keywords datasets
#'
#' @examples
#' inlmisc::PlotMap(facilities, dms.tick = TRUE)
#' sp::plot(facilities, col = "red", add = TRUE)
#' raster::text(facilities, facilities@data$NAME,
#' cex = 0.6, pos = 1)
#' str(facilities@data)
#'
"facilities"
#' Groundwater Level Measurements
#'
#' Groundwater level measurements in wells in the
#' U.S. Geological Survey (USGS) water-level aquifer monitoring network,
#' Idaho National Laboratory and vicinity, Idaho.
#' Data was obtained from the National Water Information System
#' (\href{https://dx.doi.org/10.5066/F7P55KJN}{NWIS}) (U.S. Geological Survey, 2020).
#'
#' @format A data.frame with 53,858 records and 5 variables:
#' \describe{
#' \item{\code{site_no}}{USGS site number}
#' \item{\code{lev_dt}}{date the water level was measured.}
#' \item{\code{lev_va}}{water level value, in feet below land surface.
#' A water-level elevation may be calculated by subtracting the depth-to-water
#' (\code{lev_va}) from the land-surface elevation (\code{alt_va} in the \code{\link{sites}} dataset).}
#' \item{\code{lev_status_cd}}{a code indicating the status of the site
#' at the time the water level was measured.
#' The codes and their meanings are:
#' "A" water level was affected by atmospheric pressure,
#' "D" the site was dry (no water level is recorded),
#' "N" the measurement was discontinued,
#' "O" an obstruction was encountered in the well (no water level was recorded),
#' "P" the site was being pumped,
#' "R" the site had been pumped recently,
#' "S" a nearby site that taps the same aquifer was being pumped, and
#' "X" the water level was affected by stage in nearby surface-water site.}
#' \item{\code{date_time}}{date and time the water level was measured.
#' Missing values of time were substituted with \dQuote{00:00} (12:00 midnight and start of day).}
#' }
#'
#' @source Data obtained from the NWIS database (U.S. Geological Survey, 2020).
#'
#' @references U.S. Geological Survey, 2020, National Water Information System---web services,
#' accessed August 4, 2020, from \url{https://doi.org/10.5066/F7P55KJN}.
#'
#' @keywords datasets
#'
#' @examples
#' site_no <- "432700112470801" # well USGS 1
#' xlim <- as.Date(c("1989-01-01", "2019-01-01"))
#' d <- gwl[gwl$site_no == site_no, c("lev_dt", "lev_va")]
#' main <- sites@data[sites@data$site_no == site_no, "site_nm"]
#' ylab <- sprintf("Water level, in %s below land surface",
#' c("feet", "meters"))
#' inlmisc::PlotGraph(d, ylab = ylab, main = main, xlim = xlim,
#' type = "p", pch = 19, seq.date.by = "year",
#' conversion.factor = 0.3048,
#' center.date.labels = TRUE)
#' str(gwl)
#'
#' alt_va <- sites@data[sites@data$site_no == site_no, "alt_va"]
#' y <- alt_va - d$lev_va
#' ylab <- sprintf("Water level, in %s above sea level",
#' c("feet", "meters"))
#' inlmisc::PlotGraph(d$lev_dt, y, ylab = ylab, main = main,
#' xlim = xlim, type = "p", pch = 19,
#' seq.date.by = "year",
#' conversion.factor = 0.3048,
#' center.date.labels = TRUE)
#'
"gwl"
#' State of Idaho Boundary
#'
#' Simplified representation of the boundary of Idaho,
#' a state in the northwestern region of the United States.
#'
#' @format A SpatialPolygons of the \pkg{sp} package with 1 feature.
#' See \code{\link{projection}} dataset for coordinate reference system information.
#'
#' @source U.S. Department of Commerce, U.S. Census Bureau, Geography Division/Cartographic Products Branch.
#' Spatial extract from the Master Address File / Topologically Integrated Geographic Encoding and Referencing
#' (\href{https://catalog.data.gov/dataset/tiger-line-shapefile-2019-series-information-for-the-current-place-state-based-shapefile}{MAF/TIGER}) Database (MTDB),
#' 2019 data collection, released April 2, 2020.
#'
#' @keywords datasets
#'
#' @examples
#' inlmisc::PlotMap(idaho, dms.tick = TRUE)
#' sp::plot(idaho, col = "red", add = TRUE)
#'
"idaho"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment