Skip to content

Commit

Permalink
v2.0.0.9138
Browse files Browse the repository at this point in the history
- fix: Shiny app fuzzy model not working, change community reference
  - Also fixed thermal metrics for status message
  • Loading branch information
leppott committed Feb 1, 2024
1 parent a68ae09 commit 4616354
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 14 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: BCGcalc
Type: Package
Title: Biological Condition Gradient, calculator
Version: 2.0.0.9137
Version: 2.0.0.9138
Authors@R: c(
person("Erik W.", "Leppo", email="Erik.Leppo@tetratech.com", role=c("aut","cre")),
person("Jen", "Stamp", email="Jen.Stamp@tetratech.com", role="ctb"),
Expand Down
9 changes: 7 additions & 2 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
BCGcalc-NEWS
================
<Erik.Leppo@tetratech.com>
2024-02-01 09:36:01.859784
2024-02-01 10:23:14.339318

<!-- NEWS.md is generated from NEWS.Rmd. Please edit that file -->

#> Last Update: 2024-02-01 09:36:01.921951
#> Last Update: 2024-02-01 10:23:14.673873

# BCGcalc 2.0.0.9138 (2024-02-01)

- fix: Shiny app fuzzy model not working, change community reference
- Also fixed thermal metrics for status message

# BCGcalc 2.0.0.9137 (2024-02-01)

Expand Down
9 changes: 7 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
BCGcalc-NEWS
================
<Erik.Leppo@tetratech.com>
2024-02-01 09:36:01.859784
2024-02-01 10:23:14.339318

<!-- NEWS.md is generated from NEWS.Rmd. Please edit that file -->

#> Last Update: 2024-02-01 09:36:01.921951
#> Last Update: 2024-02-01 10:23:14.673873

# BCGcalc 2.0.0.9138 (2024-02-01)

- fix: Shiny app fuzzy model not working, change community reference
- Also fixed thermal metrics for status message

# BCGcalc 2.0.0.9137 (2024-02-01)

Expand Down
5 changes: 5 additions & 0 deletions NEWS.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ knitr::opts_chunk$set(
cat(paste0("Last Update: ",Sys.time()))
```

# BCGcalc 2.0.0.9138 (2024-02-01)

* fix: Shiny app fuzzy model not working, change community reference
+ Also fixed thermal metrics for status message

# BCGcalc 2.0.0.9137 (2024-02-01)

* fix: Update naming scheme for BCG calculation in Shiny app, Issue #87
Expand Down
2 changes: 1 addition & 1 deletion inst/shiny-examples/BCGcalc/global.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Shiny Global File

# Version ----
pkg_version <- "2.0.0.9137"
pkg_version <- "2.0.0.9138"

# Packages----
# nolint start
Expand Down
18 changes: 10 additions & 8 deletions inst/shiny-examples/BCGcalc/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -2811,7 +2811,7 @@ shinyServer(function(input, output) {
## Calc, 03, MetVal----
prog_detail <- "Calculate, Metric, Values"
message(paste0("\n", prog_detail))
message(paste0("Community = ", input$si_community))
message(paste0("Community = ", input$si_community_met_therm))
# Increment the progress bar, and update the detail text.
incProgress(1/prog_n, detail = prog_detail)
Sys.sleep(prog_sleep)
Expand Down Expand Up @@ -3090,7 +3090,7 @@ shinyServer(function(input, output) {
## Calc, 4, Rules ----
prog_detail <- "Calculate, BCG Rules"
message(paste0("\n", prog_detail))
message(paste0("Community = ", input$si_community))
message(paste0("Community = ", input$si_community_modtherm))
# Increment the progress bar, and update the detail text.
incProgress(1/prog_n, detail = prog_detail)
Sys.sleep(prog_sleep)
Expand All @@ -3103,28 +3103,29 @@ shinyServer(function(input, output) {
pn_rules <- file.path(dn_rules, fn_rules)
write.csv(df_rules, pn_rules, row.names = FALSE)


## Calc, 5, MetVal----
prog_detail <- "Calculate, Metric, Values"
message(paste0("\n", prog_detail))
message(paste0("Community = ", input$si_community))
message(paste0("Community = ", input$si_community_modtherm))
# Increment the progress bar, and update the detail text.
incProgress(1/prog_n, detail = prog_detail)
Sys.sleep(prog_sleep)
# Calc
# QC
# df_input <- read.csv(file.path("inst", "extdata", "Data_BCG_PacNW.csv"))
# df_metval <- BioMonTools::metric.values(df_input, "bugs", boo.Shiny = TRUE)

if (length(cols_flags_keep) > 0) {
# keep extra cols from Flags (non-metric)
df_metval <- BioMonTools::metric.values(df_input
, input$si_community
, input$si_community_modtherm
, fun.cols2keep = cols_flags_keep
, boo.Shiny = TRUE
, verbose = TRUE)
} else {
df_metval <- BioMonTools::metric.values(df_input
, input$si_community
, input$si_community_modtherm
, boo.Shiny = TRUE
, verbose = TRUE)
}## IF ~ length(col_rules_keep)
Expand Down Expand Up @@ -3155,7 +3156,8 @@ shinyServer(function(input, output) {
dn_metval_slim <- path_results_sub
pn_metval_slim <- file.path(dn_metval_slim, fn_metval_slim)
write.csv(df_metval_slim, pn_metval_slim, row.names = FALSE)



## Calc, 6, MetMemb----
prog_detail <- "Calculate, Metric, Membership"
message(paste0("\n", prog_detail))
Expand All @@ -3170,7 +3172,7 @@ shinyServer(function(input, output) {
pn_metmemb <- file.path(dn_metmemb, fn_metmemb)
write.csv(df_metmemb, pn_metmemb, row.names = FALSE)


## Calc, 7, LevMemb----
prog_detail <- "Calculate, Level, Membership"
message(paste0("\n", prog_detail))
Expand Down

0 comments on commit 4616354

Please sign in to comment.