Commit c0de7a33 authored by Virgile Baudrot's avatar Virgile Baudrot
Browse files

update documentation and fix details in graphics

parent 597401bf
......@@ -94,8 +94,13 @@ mod_tabItemDamage_ui <- function(id){
box(title = iconed("Damage", "cogs"),
solidHeader = TRUE,
width = 8, status = "success",
p("The graphic on the left is the histogram showing the probability distribution of Damage
(default example is survival probability) along the period cover by source exposure."),
p("Damage unit is the survival probability of larvae as provided by the histogram.
So here, damage is the daily probability of survival at each laying site."),
column(width = 6,
plotOutput(ns("profileDAMAGE")),
p("You can download the data just generated through the CSV and the KML files."),
downloadButton(ns("download_DAMAGE"),
"Download Damage CSV",
style="color: #fff; background-color: #33595f; border-color: #052327"),
......@@ -113,8 +118,6 @@ mod_tabItemDamage_ui <- function(id){
onInitialize = I('function() { this.setValue(""); }')
)
),
p("Legend of damage units is the survival probability of larvae as provided by the histogram.
So here, damage is the daily probability of survival at each laying site."),
plotOutput(ns("mapDAMAGE"))
)
)
......@@ -342,6 +345,8 @@ mod_tabItemDamage_server <- function(input, output, session, r){
ggplot() +
theme_minimal() +
scale_color_gradient(low = "green", high = "red", name = "Damage") +
geom_sf(data = r$landscapeSOURCE, alpha = 0.2, fill = "red", color = "red") +
geom_sf(data = r$landscapeHOST, alpha = 0.2, fill = "blue", color = "blue") +
geom_sf(data = r$individualSITE_dev) +
geom_sf(data = DFdamage(),
aes(color = tryCatch(DAMAGE, error = function(cond){"black"})), size = 4, alpha = 0.5)
......
......@@ -94,6 +94,12 @@ mod_tabItemDevelopment_ui <- function(id){
solidHeader = TRUE,
width = 8,
status = "success",
p("The graphic on the left is the histogram showing the number of
emerging individuals (in brown) and the period of living (in green).
Of course, it should cover the period you defined for emergence, but also it extends this period.
The plot on the right is the map of the laying site (in black), additional
brown points are provide to highlight the date of emergence and green points represent period of living.
You vertical red line on the left graphic correspond to the date you selected."),
column(width = 6,
plotOutput(ns("histIndDEV"))
),
......@@ -312,7 +318,7 @@ mod_tabItemDevelopment_server <- function(input, output, session, r){
req(input$ctrlDATEMapIND) # need to avoid error
ggplot() +
theme_minimal() +
geom_sf(data = r$landscapeHOST) +
geom_sf(data = r$landscapeHOST, alpha = 0.5, fill = "blue", color = "blue") +
geom_sf(data = r$individualSITE, color = "black", size = 2) +
geom_sf(data = DFmapINDIVIDUAL(), color = "#8ab600", size = 4, alpha = 0.5) +
geom_sf(data = DFmapEMERGENCE(), color = "#a95e26", size = 4, alpha = 0.5)
......
......@@ -53,6 +53,10 @@ mod_tabItemDispersal_ui <- function(id){
solidHeader = TRUE,
width = 6, status = "warning",
#
p("The shapefile provide previously needs to be convert into a raster.
Increasing this value can dramatically increase the computing time. So we fix maximum at 1024.
However, you have to keep in mind that resolution is the length of landscape border (previously defined by the square frame)
devided by the number of pixel (max 1024). For better resolution, you can upload the shiny App on your own machine."),
shinyWidgets::sliderTextInput(inputId = ns("kernelSizeRaster"),
"Number of pixels along one side:",
choices=2^(2:10),
......@@ -299,9 +303,9 @@ mod_tabItemDispersal_server <- function(input, output, session, r){
tags$br(),
"Default value is 2^8.",
tags$br(),
tags$b("Increasing this value can dramatically increase the computing time. So we fix maximum at 1024.
However, you have to keep in mind that resolution is the length of landscape border (previously defined by the square frame)
devided by the number of pixel (max 1024). For better resolution, you can upload the shiny app on your own machine.")
p("Increasing this value can dramatically increase the computing time. So we fix maximum at 1024.
However, you have to keep in mind that resolution is the length of landscape border (previously defined by the square frame)
devided by the number of pixel (max 1024). For better resolution, you can upload the shiny app on your own machine.")
),
html = TRUE
)
......
......@@ -62,11 +62,14 @@ mod_tabItemExposure_ui <- function(id){
box(title = iconed("Exposure", "cogs"),
solidHeader = TRUE,
width = 8, status = "success",
p("The graphic on the left is the histogram of the distribution of Exposure
in each laying site of the landscape along the period cover by source exposure."),
p("Exposure unit are the same as emission units."),
column(
width = 6,
plotOutput(ns("profileEXPOSURE")),
hr(),
p("Dowload the exposure data set which has been generated."),
p("Download the exposure data set which has been generated."),
downloadButton(ns("download_EXPOSURE"),
"Download Exposure CSV",
style="color: #fff; background-color: #33595f; border-color: #052327")#,
......@@ -195,7 +198,7 @@ mod_tabItemExposure_server <- function(input, output, session, r){
ggplot() +
theme_minimal() +
labs(x = "Time", y = "Probability Distribution of Exposure") +
labs(x = "Time", y = "Distribution of Exposure") +
geom_line(data = DFsumEXPOSURE,
aes(x = Date, y = mean_EXPOSURE), color = "red") +
geom_ribbon(data = DFsumEXPOSURE,
......@@ -230,6 +233,8 @@ mod_tabItemExposure_server <- function(input, output, session, r){
ggplot() +
theme_minimal() +
scale_color_gradient(low = "green", high = "red", name = "Exposure") +
geom_sf(data = r$landscapeSOURCE, alpha = 0.2, fill = "red", color = "red") +
geom_sf(data = r$landscapeHOST, alpha = 0.2, fill = "blue", color = "blue") +
geom_sf(data = r$individualSITE_dev) +
geom_sf(data = DFexposureINDIVIDUAL(),
aes(color = tryCatch(EXPOSURE, error = function(cond){"black"})), size = 4, alpha = 0.5)
......
......@@ -68,6 +68,8 @@ mod_tabItemInteractiveMap_ui <- function(id){
width = 12,
status = "success",
solidHeader = TRUE,
p("The Date you select here is the date of representation of the map hereafter,
and correspond to the vertical red bars on the two histograms. "),
selectizeInput(ns("ctrlDATEMapRISK"),
label = "Choose Column Date",
choices = NULL,
......@@ -75,10 +77,13 @@ mod_tabItemInteractiveMap_ui <- function(id){
placeholder = 'Please select column below',
onInitialize = I('function() { this.setValue(""); }')
)),
p("Histograms: (left) exposure, (right) damage."),
column(width = 6,
p("Exposure distribution in landscape as a function of time."),
plotOutput(ns("profileRISKexposure"))
),
column(width = 6,
p("Damage distribution in landscape as a function of time."),
plotOutput(ns("profileRISKdamage"))
),
column(width = 2,
......@@ -88,6 +93,14 @@ mod_tabItemInteractiveMap_ui <- function(id){
min = 0, max = 1000,
value = 50)
),
p("Risk map at the time provided. Legend of the risk map:"),
tags$ul(
tags$li(strong("large rounded square"), "landscape frame - tick 'Frame' to add/remove"),
tags$li(strong("red area"), "source area - tick 'Source' to add/remove"),
tags$li(strong("blue area"), "host area - tick 'Host' to add/remove"),
tags$li(strong("black points"), "laying site - tick 'Site' to add/remove"),
tags$li(strong("colored points"), "damage value - tick 'Damage point' to add/remove")
),
column(width = 10,
leafletOutput(ns("mapRISK"), height = 500)
)
......@@ -143,7 +156,7 @@ mod_tabItemInteractiveMap_server <- function(input, output, session, r){
req(input$ctrlDATEMapRISK)
ggplot() +
theme_minimal() +
labs(x = "Time", y = "Probability Distribution of Exposure") +
labs(x = "Time", y = "Distribution of Exposure") +
geom_line(data = DFhistogramEXPOSURE,
aes(x = Date, y = mean_EXPOSURE), color = "red") +
geom_ribbon(data = DFhistogramEXPOSURE,
......
Supports Markdown
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