diff --git a/readme.md b/readme.md index 15487f8a6..9bab1856b 100644 --- a/readme.md +++ b/readme.md @@ -1,36 +1,12 @@ ---- -editor_options: - markdown: - wrap: 72 ---- - # Tools for Automated Data Assessment (TADA) -TADA is a draft R package being developed to help states, tribal -nations, and other stakeholders compile and evaluate Water Quality -Portal (WQP) data collected from surface water monitoring sites on -streams and lakes more efficiently. TADA is also being used to as -building block to support development of the TADA R Shiny application. +TADA is a draft R package being developed to help states, tribal nations, and other stakeholders compile and evaluate Water Quality Portal (WQP) data collected from surface water monitoring sites on streams and lakes more efficiently. TADA is also being used to as building block to support development of the TADA R Shiny application. -We encourage stakeholders to begin testing the functionality and -providing feedback. Moreover, open source software provides an avenue -for water quality program owners to develop and share code, and we -welcome your contributions! We hope to build a collaborative community -dedicated to this effort where contributors can discover, share and -build the package functionality over time. +We encourage stakeholders to begin testing the functionality and providing feedback. Moreover, open source software provides an avenue for water quality program owners to develop and share code, and we welcome your contributions! We hope to build a collaborative community dedicated to this effort where contributors can discover, share and build the package functionality over time. ## Water Quality Portal -In 2012, the WQP was deployed by the U.S. Geological Survey (USGS), the -U.S. Environmental Protection Agency (USEPA), and the National Water -Quality Monitoring Council to combine and serve water-quality data from -numerous sources in a standardized format. The WQP holds over 420 -million water quality sample results from over 1000 federal, state, -tribal and other partners, and is the nation's largest source for single -point of access for water-quality data. Participating organizations -submit their data to the WQP using the EPA's Water Quality Exchange -(WQX), a framework designed to map their data holdings to a common data -structure. +In 2012, the WQP was deployed by the U.S. Geological Survey (USGS), the U.S. Environmental Protection Agency (USEPA), and the National Water Quality Monitoring Council to combine and serve water-quality data from numerous sources in a standardized format. The WQP holds over 420 million water quality sample results from over 1000 federal, state, tribal and other partners, and is the nation's largest source for single point of access for water-quality data. Participating organizations submit their data to the WQP using the EPA's Water Quality Exchange (WQX), a framework designed to map their data holdings to a common data structure. ## Installation @@ -41,16 +17,9 @@ library (remotes) remotes::install_github("USEPA/TADA") ``` -To view the vignette in RStudio, run - -``` r -vignette("WQPDataHarmonization", "TADA") -``` - -## Dependencies +Dependencies -Make sure all of the packages below are installed before running the -code: +Make sure all of the packages below are installed before running the code: | | |---------------| @@ -75,18 +44,8 @@ code: ## Contact -If you have any questions, please reach out to Cristina Mullin at -mullin.cristina\@epa.gov +If you have any questions, please reach out to Cristina Mullin at mullin.cristina\@epa.gov ## Disclaimer -This United States Environmental Protection Agency (EPA) GitHub project -code is provided on an "as is" basis and the user assumes responsibility -for its use. EPA has relinquished control of the information and no -longer has responsibility to protect the integrity, confidentiality, or -availability of the information. Any reference to specific commercial -products, processes, or services by service mark, trademark, -manufacturer, or otherwise, does not constitute or imply their -endorsement, recommendation or favoring by EPA. The EPA seal and logo -shall not be used in any manner to imply endorsement of any commercial -product or activity by EPA or the United States Government. +This United States Environmental Protection Agency (EPA) GitHub project code is provided on an "as is" basis and the user assumes responsibility for its use. EPA has relinquished control of the information and no longer has responsibility to protect the integrity, confidentiality, or availability of the information. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by EPA. The EPA seal and logo shall not be used in any manner to imply endorsement of any commercial product or activity by EPA or the United States Government. diff --git a/vignettes/WQPDataHarmonization.Rmd b/vignettes/WQPDataHarmonization.Rmd index 1b9a61981..88eac8ba2 100644 --- a/vignettes/WQPDataHarmonization.Rmd +++ b/vignettes/WQPDataHarmonization.Rmd @@ -10,6 +10,46 @@ vignette: > editor_options: chunk_output_type: console --- +##Install dependency packages if needed +```{r} +list.of.packages <- c("plyr","dplyr","ggplot2","RColorBrewer","Rcpp","devtools", + "data.table","grDevices","magrittr","stringr","testthat","usethis","utils","stats","rmarkdown","knitr","remotes") +new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])] +if(length(new.packages)) install.packages(new.packages) +``` + +##Load dependency packages +```{r} +library(remotes) +library(dplyr) +library(ggplot2) +library(plyr) +library(RColorBrewer) +library(Rcpp) +library(data.table) +library(grDevices) +library(magrittr) +library(stringr) +library(testthat) +library(usethis) +library(utils) +library(stats) +library(rmarkdown) +library(knitr) +library(devtools) +``` + +#Load TADA and dataRetrieval +You can install and load the most recent versions from GitHub by running: +```{r} +remotes::install_github("USGS-R/dataRetrieval") +remotes::install_github("USEPA/TADA") +library(dataRetrieval) +library(TADA) +``` + +#Knit vignette +This code is used to knit this code to build an HTML vignette ```{r setup, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, @@ -17,35 +57,12 @@ knitr::opts_chunk$set( ) ``` -##Load dependency packages -```{r} -library("dataRetrieval") -library("plyr") -library("dplyr") -library("ggplot2") -library("RColorBrewer") -library("Rcpp") -library("data.table") -library("grDevices") -library("magrittr") -library("stringr") -library("testthat") -library("usethis") -library("utils") -library("stats") -library("remotes") -library("rmarkdown") -library("knitr") -library("devtools") -library("TADA") -``` - ## Retrieve WQP data -WQP is retrieved and processed for compatibility with TADA. This function -joins three WQP profile (station, narrow, and phys/chem), changes all data in the +WQP data is retrieved and processed for compatibility with TADA. This function +joins three WQP profiles (i.e., the station, narrow, and phys/chem), changes all data in the Characteristic, Speciation, Fraction, and Unit fields to uppercase, removes true duplicates, removes data for all non-water media types, and cleans results with special characters. -More details about this function can be found in the function documentation +More details about this functioncan be found in the function documentation by entering the following code into the console: ?TADAdataRetrieval ```{r} #Get testing data