Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Impact démographique des collisions aviaires avec les éoliennes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CEFE
Interactions Humains-Animaux
Impact démographique des collisions aviaires avec les éoliennes
Commits
61e2c151
Commit
61e2c151
authored
3 years ago
by
thierrychambert
Browse files
Options
Downloads
Patches
Plain Diff
Added distri plot (several frames) for cumulated impact fatalities
parent
ca51f00b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inst/ShinyApp/server.R
+39
-19
39 additions, 19 deletions
inst/ShinyApp/server.R
with
39 additions
and
19 deletions
inst/ShinyApp/server.R
+
39
−
19
View file @
61e2c151
...
...
@@ -119,6 +119,7 @@ server <- function(input, output, session){
# Show inputs for cumulated scenario
if
(
input
$
analysis_choice
==
"cumulated"
){
shinyjs
::
hide
(
"fatalities_input_type"
)
shinyjs
::
show
(
"farm_number_cumulated"
)
shinyjs
::
show
(
"fatalities_mat_cumulated"
)
}
...
...
@@ -290,28 +291,50 @@ server <- function(input, output, session){
## Fatalities
##----------------------
observeEvent
({
input
$
fatalities_input_typ
e
input
$
analysis_choic
e
input
$
button_fatalities
input
$
fatalities_input_type
input
$
fatalities_run_expert
input
$
farm_number_cumulated
input
$
fatalities_mat_cumulated
},{
# Show from input values: if button is ON and input_type is set on "value"
if
(
input
$
button_fatalities
%%
2
==
1
&
input
$
fatalities_input_type
==
"val"
){
output
$
title_distri_plot
<-
renderText
({
"Mortalits annuelles"
})
output
$
distri_plot
<-
renderPlot
({
plot_gamma
(
mu
=
input
$
fatalities_mean
,
se
=
input
$
fatalities_se
)
})
}
else
{
# Show from elicitation expert: if button is ON and input_type is set on "expert elicitation"
if
(
input
$
button_fatalities
%%
2
==
1
&
input
$
fatalities_input_type
==
"eli_exp"
){
if
(
!
is.null
(
param
$
fatalities_eli_result
)){
output
$
title_distri_plot
<-
renderText
({
"Mortalits annuelles"
})
output
$
distri_plot
<-
renderPlot
({
plot_expert
(
param
$
fatalities_eli_result
$
out
)
})
}
else
{
if
(
input
$
analysis_choice
!=
"cumulated"
){
# Show from input values: if button is ON and input_type is set on "value"
if
(
input
$
button_fatalities
%%
2
==
1
&
input
$
fatalities_input_type
==
"val"
){
output
$
title_distri_plot
<-
renderText
({
"Mortalits annuelles"
})
output
$
distri_plot
<-
renderPlot
({
plot_gamma
(
mu
=
input
$
fatalities_mean
,
se
=
input
$
fatalities_se
)
})
}
else
{
# Show from elicitation expert: if button is ON and input_type is set on "expert elicitation"
if
(
input
$
button_fatalities
%%
2
==
1
&
input
$
fatalities_input_type
==
"eli_exp"
){
if
(
!
is.null
(
param
$
fatalities_eli_result
)){
output
$
title_distri_plot
<-
renderText
({
"Mortalits annuelles"
})
output
$
distri_plot
<-
renderPlot
({
plot_expert
(
param
$
fatalities_eli_result
$
out
)
})
}
else
{
output
$
title_distri_plot
<-
NULL
output
$
distri_plot
<-
NULL
}
# Hide otherwise (when button is OFF)
}
else
{
output
$
title_distri_plot
<-
NULL
output
$
distri_plot
<-
NULL
}
# Hide otherwise (when button is OFF)
}
else
{
output
$
title_distri_plot
<-
NULL
output
$
distri_plot
<-
NULL
}
# Hide otherwise (when analysis = cumulated impacts)
}
else
{
output
$
title_distri_plot
<-
renderText
({
"Mortalits annuelles par parc (impacts cumuls)"
})
# output$distri_plot <- NULL
output
$
distri_plot
<-
renderPlot
({
par
(
mfrow
=
c
(
1
,
input
$
farm_number_cumulated
),
mar
=
c
(
5
,
4
,
7
,
2
)
+
0.1
,
oma
=
c
(
0
,
0
,
0
,
0
))
for
(
j
in
1
:
input
$
farm_number_cumulated
){
plot_gamma
(
mu
=
input
$
fatalities_mat_cumulated
[
j
,
1
],
se
=
input
$
fatalities_mat_cumulated
[
j
,
2
])
title
(
paste
(
"Parc"
,
j
),
line
=
5
,
outer
=
FALSE
,
cex.main
=
1.8
)
}
})
}
},
ignoreInit
=
FALSE
)
...
...
@@ -512,9 +535,6 @@ server <- function(input, output, session){
##-------------------------------
## Cumulated impacts or not ?
##-------------------------------
#observeEvent({
# input$run
#}, {
observe
({
if
(
input
$
analysis_choice
==
"scenario"
){
param
$
cumulated_impacts
=
FALSE
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment