Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
edcd26d
Update CONTRIBUTING.Rmd
katiehealy Nov 22, 2022
50fdc1d
Update WQPDataHarmonization.Rmd
katiehealy Nov 22, 2022
e01ad6f
InvalidFraction example
cristinamullin Dec 9, 2022
94ac1f9
Merge pull request #171 from USEPA/vignettes_proofreading_kh
katiehealy Dec 9, 2022
7869208
Merge pull request #172 from USEPA/exampledoc-cm
cristinamullin Dec 9, 2022
7b81576
Added examples to completed functions
katiehealy Dec 9, 2022
a854527
Update ResultFlagsIndependent.R
katiehealy Dec 16, 2022
829effc
Added comments to examples for functions.
katiehealy Dec 16, 2022
2a6bdac
small changes
cristinamullin Dec 16, 2022
9a90c83
Merge pull request #173 from USEPA/functionexamples_kh
katiehealy Dec 16, 2022
76ac3c1
Merge pull request #174 from USEPA/12142022-cm
cristinamullin Dec 16, 2022
b96eb66
Update ResultFlagsDependent.R
katiehealy Dec 22, 2022
aa416cb
updating doc
cristinamullin Dec 22, 2022
5063e99
added MonitoringLocationIdentifier to filter function
cristinamullin Dec 22, 2022
886f571
Update flag functions to include error review option
katiehealy Dec 22, 2022
e03c15a
small fix
cristinamullin Dec 23, 2022
a295509
HarmonizeData updates
cristinamullin Dec 23, 2022
82beb65
HarmonizeData update
cristinamullin Dec 23, 2022
9f3055d
update InvalidCoordinates
cristinamullin Dec 23, 2022
1e39829
update docs
cristinamullin Dec 24, 2022
73d8bc0
Merge pull request #175 from USEPA/reviewerrorsonly_kh
cristinamullin Dec 24, 2022
5319152
autoclean addition
cristinamullin Dec 28, 2022
5e8a0a3
update docs
cristinamullin Dec 28, 2022
6f8c802
update docs
cristinamullin Dec 28, 2022
499e460
documentation updates
cristinamullin Dec 28, 2022
7ad0839
update docs
cristinamullin Dec 29, 2022
028c7e1
option to change sign of lat/long outside USA
katiehealy Dec 29, 2022
27f02f5
clean_outsideUSA/Invalidcoordinates review and FIPS code ref file upd…
cristinamullin Dec 30, 2022
a936d44
added statecode reference link
cristinamullin Dec 30, 2022
76e0a92
Update vignettes
katiehealy Dec 30, 2022
122e0d9
Merge pull request #178 from USEPA/invalidcoordinates_kh
cristinamullin Jan 6, 2023
e33f000
github pages update
cristinamullin Jan 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: TADA
Type: Package
Title: Tools for Automated Data Assessment R Package
Title: Tools for Automated Data Analysis R Package
Version: 0.0.1
Organization: U.S. Environmental Protection Agency
Authors@R:
Expand All @@ -9,11 +9,11 @@ Authors@R:
role = c("aut", "cre"),
email = "[email protected]",
comment = c(ORCID = "0000-0002-0615-6087")),
person(given = "Michelle",
family = "Thawley",
role = "aut"),
person(given = "Jacob",
family = "Greif",
role = "aut"),
person(given = "Michelle",
family = "Thawley",
role = "aut"),
person(given = "Laura",
family = "Shumway",
Expand Down
8 changes: 7 additions & 1 deletion R/DataDiscoveryRetrieval.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ TADAdataRetrieval <- function(statecode = "null",
# Retrieve all 3 profiles
results.DR <- dataRetrieval::readWQPdata(WQPquery,
ignore_attributes = TRUE)
#check if any results are available
if ((nrow(results.DR) > 0) == FALSE) {
stop("Your WQP query returned no results (no data available). Try a different query. Removing some of your query filters OR broadening your search area may help.")
}

narrow.DR <- dataRetrieval::readWQPdata(WQPquery,
dataProfile = "narrowResult",
Expand Down Expand Up @@ -256,7 +260,9 @@ readWQPwebservice <- function(webservice) {
#'
#' @examples
#' \dontrun{
#' tada2 <- TADABigdataRetrieval(startDate = "2019-01-01", endDate = "2021-12-31", characteristicName = "Temperature, water", siteType = "Stream")
#' tada2 <- TADABigdataRetrieval(startDate = "2019-01-01", e
#' ndDate = "2021-12-31", characteristicName = "Temperature, water",
#' siteType = "Stream")
#' }
#'

Expand Down
40 changes: 36 additions & 4 deletions R/Filtering.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ TADA.env <- new.env()
#'
#' @export
#'
#' @examples
#' # Load example dataset:
#' data(Nutrients_Utah)
#'
#' # Create a table of fields and count of unique values in each field:
#' Fields_Nutrients_Utah <- FilterFields(Nutrients_Utah)

FilterFields <- function(.data) {
# check .data is data.frame
Expand Down Expand Up @@ -90,6 +96,12 @@ FilterFields <- function(.data) {
#'
#' @export
#'
#' @examples
#' # Load example dataset:
#' data(Nutrients_Utah)
#'
#' # Create table and pie chart of "Hydrologic Condition" unique values and counts:
#' FieldReview_HydrologicCondition <- FilterFieldReview(field = "HydrologicCondition", Nutrients_Utah)

FilterFieldReview <- function(field, .data) {
# if provided, check .data is data.frame
Expand Down Expand Up @@ -136,7 +148,14 @@ FilterFieldReview <- function(field, .data) {
#' @return A list of unique characteristics and their counts
#'
#' @export
#'
#'
#' @examples
#' # Load example dataset:
#' data(Nutrients_Utah)
#'
#' # Create a list of parameters in the dataset and the number of records of each paramter:
#' ParameterList <- FilterParList(Nutrients_Utah)

FilterParList <- function(.data) {
# count the frequency of each value in CharactersticName field
ParValueCount <- data.frame(table(list(.data$CharacteristicName)))
Expand All @@ -162,7 +181,13 @@ FilterParList <- function(.data) {
#' subset by a parameter.
#'
#' @export
#'
#'
#' @examples
#' # Load example dataset:
#' data(Nutrients_Utah)
#'
#' # Create list of fields for parameter "AMMONIA" with number of unique values in each field:
#' AmmoniaFields <- FilterParFields(Nutrients_Utah, parameter = "AMMONIA")

FilterParFields <- function(.data, parameter) {
# check .data is data.frame
Expand Down Expand Up @@ -241,7 +266,8 @@ FilterParFields <- function(.data, parameter) {
"ResultAnalyticalMethod.MethodName",
"ResultAnalyticalMethod.MethodIdentifier",
"ResultAnalyticalMethod.MethodIdentifierContext",
"AssemblageSampledName", "DetectionQuantitationLimitTypeName"
"AssemblageSampledName", "DetectionQuantitationLimitTypeName",
"MonitoringLocationIdentifier"
)]


Expand All @@ -261,7 +287,13 @@ FilterParFields <- function(.data, parameter) {
#' @return A table and pie chart of unique values in the selected field.
#'
#' @export
#'
#'
#' @examples
#' # Load example dataset:
#' data(Nutrients_Utah)
#'
#' # Create table and pie chart of monitoring locations for the parameter "AMMONIA" in dataframe:
#' AmmoniaMonitoringLocations <- FilterParFieldReview(field = "MonitoringLocationIdentifier", Nutrients_Utah, parameter = "AMMONIA")

FilterParFieldReview <- function(field, .data, parameter) {
# if provided, check .data is data.frame
Expand Down
Loading