From 84565e4bc36d7e39f7733cef5fd328db6c56340c Mon Sep 17 00:00:00 2001 From: cristinamullin <46969696+cristinamullin@users.noreply.github.com> Date: Tue, 28 Jan 2025 14:06:44 -0500 Subject: [PATCH] troubleshooting check errors update description and remove library calls within mods --- DESCRIPTION | 5 +++-- R/mod_query_data.R | 6 ++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 338ad43a..74198865 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -37,7 +37,8 @@ Imports: shinyjs, gotop, EPATADA, - golem + golem, + testthat Remotes: github::USEPA/EPATADA Suggests: @@ -51,7 +52,7 @@ Suggests: stringr, utils Depends: - R (>= 3.5.0) + R (>= 3.5.0), R (<= 4.4.1) Encoding: UTF-8 Language: en-US diff --git a/R/mod_query_data.R b/R/mod_query_data.R index 8e694560..0d205b8e 100644 --- a/R/mod_query_data.R +++ b/R/mod_query_data.R @@ -14,11 +14,9 @@ load("inst/extdata/statecodes_df.Rdata") load("inst/extdata/query_choices.Rdata") # new (2024-05-23) list for new Country/Ocean(s) Query the Water Quality Portal option. Not included in saved query_choices file -library(jsonlite) -library(dplyr) countrycode_url <- 'https://www.waterqualitydata.us/Codes/countrycode?mimeType=json' -countryocean_source <- fromJSON(txt=countrycode_url) -countryocean_source <- countryocean_source$codes %>% select(-one_of('providers')) +countryocean_source <- jsonlite::fromJSON(txt=countrycode_url) +countryocean_source <- countryocean_source$codes %>% dplyr::select(-one_of('providers')) countryocean_source <- countryocean_source[order(countryocean_source$desc),] countryocean_choices <- countryocean_source$value names(countryocean_choices) <- countryocean_source$desc