Commit dee650b6 authored by Dorchies David's avatar Dorchies David
Browse files

feat(heatmap): scale in percent

Refs #14
parent 8b08e89e
......@@ -20,7 +20,8 @@ Imports:
ggplot2,
rvgest,
SGLdataGrabber,
shinyjs
shinyjs,
scales
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.1
......
......@@ -2,7 +2,7 @@ FROM rocker/r-ver:4.0.3
RUN apt-get update && apt-get install -y git-core libcurl4-openssl-dev libgit2-dev libicu-dev libssl-dev libxml2-dev make pandoc pandoc-citeproc zlib1g-dev && rm -rf /var/lib/apt/lists/*
RUN echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl')" >> /usr/local/lib/R/etc/Rprofile.site
RUN R -e 'install.packages(c("golem", "processx", "DT", "shinydashboardPlus", "RSQLite", "dbplyr"))'
RUN R -e 'install.packages(c("lubridate", "TSstudio"))'
RUN R -e 'install.packages(c("lubridate", "TSstudio", "scales", "shinyjs"))'
ARG COMMIT_HASH=unknown
RUN R -e 'remotes::install_gitlab("in-wop/rvgest@master", host = "gitlab.irstea.fr")'
RUN R -e 'remotes::install_gitlab("in-wop/sgldatagrabber@master", host = "gitlab.irstea.fr")'
......
......@@ -54,6 +54,7 @@ mod_one_objective_focus_ui <- function(id){
#' one_objective_focus Server Functions
#'
#' @noRd
#' @importFrom scales percent
mod_one_objective_focus_server <- function(id, con){
moduleServer( id, function(input, output, session){
ns <- session$ns
......@@ -70,7 +71,7 @@ mod_one_objective_focus_server <- function(id, con){
objCurve <- objCurve[seq.int(1, 365,3),]
p <- ggplot(dfDiscretProbs, aes(x = day, y = V)) +
geom_tile(aes(fill = prob)) +
scale_fill_continuous(low = "green", high = "red", name = "Failure probability") +
scale_fill_continuous(low = "green", high = "red", name = "Failure probability", labels = percent) +
geom_point(data = objCurve, color = "black", size = 1, shape = 21, fill = "grey") +
ggtitle(paste("Lake", lake)) +
scale_x_discrete("Calendar days", breaks = breaks, labels = labels) +
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment