Skip to content

Commit f4df9ff

Browse files
authored
Merge pull request #118 from The-Strategy-Unit/107_heatmap_nee
107 heatmap nee
2 parents 84c6865 + b867dc7 commit f4df9ff

7 files changed

+668
-101
lines changed

R/app_server.R

+7-2
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,11 @@ app_server <- function(input, output, session) {
286286
scheme_codes = input$schemes,
287287
focal_scheme_code = input$focus_scheme,
288288
heatmap_type = input$heatmap_type,
289-
standardise_heatmap = input$toggle_horizon_heatmap,
290289
scheme_order = input$heatmap_scheme_order,
291290
mitigator_order = input$heatmap_mitigator_order,
292-
values_displayed = input$values_displayed
291+
values_displayed = input$values_displayed,
292+
toggle_heatmap_nee = input$toggle_heatmap_nee,
293+
toggle_heatmap_aggregate_summaries = input$toggle_heatmap_aggregate_summaries
293294
)
294295

295296
return(dat)
@@ -383,6 +384,8 @@ app_server <- function(input, output, session) {
383384
# disable
384385
shinyjs::disable("toggle_horizon_heatmap")
385386
shinyjs::disable("toggle_heatmap_scale_fill_by_mitigator")
387+
shinyjs::disable("toggle_heatmap_nee")
388+
shinyjs::disable("toggle_heatmap_aggregate_summaries")
386389

387390
# show
388391
shinyjs::show("heatmap_binary_colour")
@@ -396,6 +399,8 @@ app_server <- function(input, output, session) {
396399
# enable
397400
shinyjs::enable("toggle_horizon_heatmap")
398401
shinyjs::enable("toggle_heatmap_scale_fill_by_mitigator")
402+
shinyjs::enable("toggle_heatmap_nee")
403+
shinyjs::enable("toggle_heatmap_aggregate_summaries")
399404

400405
# disable
401406

R/app_ui.R

+22-11
Original file line numberDiff line numberDiff line change
@@ -399,17 +399,6 @@ app_ui <- function(request) {
399399
selected = "value_mid",
400400
multiple = FALSE
401401
),
402-
shiny::checkboxInput(
403-
inputId = "toggle_horizon_heatmap",
404-
label = bslib::tooltip(
405-
trigger = list(
406-
"Standardise by horizon?",
407-
bsicons::bs_icon("info-circle")
408-
),
409-
"Divides the scheme's chosen mitigator values by the number of years between the chosen start and final year."
410-
),
411-
value = FALSE
412-
),
413402
shiny::checkboxInput(
414403
inputId = "toggle_mitigator_name",
415404
label = bslib::tooltip(
@@ -432,6 +421,28 @@ app_ui <- function(request) {
432421
),
433422
value = TRUE
434423
),
424+
shiny::checkboxInput(
425+
inputId = "toggle_heatmap_nee",
426+
label = bslib::tooltip(
427+
trigger = list(
428+
"Add NEE?",
429+
bsicons::bs_icon("info-circle")
430+
),
431+
"Controls whether the National Elicitation Exercise (NEE) estimates are included. Toggle on to add the NEE value as an additional column."
432+
),
433+
value = FALSE
434+
),
435+
shiny::checkboxInput(
436+
inputId = "toggle_heatmap_aggregate_summaries",
437+
label = bslib::tooltip(
438+
trigger = list(
439+
"Add aggregate summaries?",
440+
bsicons::bs_icon("info-circle")
441+
),
442+
"Controls whether the minimum, maximum and average mitigator values are displayed. Toggle on to see these values as additional columns and rows."
443+
),
444+
value = FALSE
445+
),
435446
shiny::selectInput(
436447
inputId = "heatmap_scheme_order",
437448
label = bslib::tooltip(

0 commit comments

Comments
 (0)