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
e6a085b0
Commit
e6a085b0
authored
3 years ago
by
thierrychambert
Browse files
Options
Downloads
Patches
Plain Diff
Added buttons show_distri
parent
649fd557
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
inst/ShinyApp/runApp.R
+1
-0
1 addition, 0 deletions
inst/ShinyApp/runApp.R
inst/ShinyApp/server.R
+12
-12
12 additions, 12 deletions
inst/ShinyApp/server.R
inst/ShinyApp/ui.R
+12
-13
12 additions, 13 deletions
inst/ShinyApp/ui.R
with
25 additions
and
25 deletions
inst/ShinyApp/runApp.R
+
1
−
0
View file @
e6a085b0
rm
(
list
=
ls
(
all.names
=
TRUE
))
setwd
(
paste0
(
getwd
(),
"/inst/ShinyApp/"
)
)
getwd
()
...
...
This diff is collapsed.
Click to expand it.
inst/ShinyApp/server.R
+
12
−
12
View file @
e6a085b0
...
...
@@ -765,7 +765,7 @@ server <- function(input, output, session){
##----------------------
observeEvent
({
input
$
analysis_choice
input
$
button
_fatalities
input
$
show_ditri
_fatalities
input
$
fatalities_input_type
input
$
fatalities_run_expert
input
$
farm_number_cumulated
...
...
@@ -776,7 +776,7 @@ server <- function(input, output, session){
if
(
input
$
analysis_choice
==
"single_farm"
){
# Show from input values: if button is ON and input_type is set on "value" or "itvl" (thus not "eli_exp")
if
(
input
$
button_fatalities
%%
2
==
1
&
input
$
fatalities_input_type
!=
"eli_exp"
){
if
(
input
$
fatalities_input_type
!=
"eli_exp"
){
output
$
title_distri_plot
<-
renderText
({
"Mortalits annuelles"
})
output
$
distri_plot
<-
renderPlot
({
...
...
@@ -792,7 +792,7 @@ server <- function(input, output, session){
}
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
(
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
)
})
...
...
@@ -835,11 +835,11 @@ server <- function(input, output, session){
## Population size
##----------------------
observeEvent
({
input
$
button
_pop_size
input
$
show_ditri
_pop_size
input
$
pop_size_input_type
},{
# Show from input values: if button is ON and input_type is set on "value"
if
(
input
$
button_pop_size
%%
2
==
1
&
input
$
pop_size_input_type
!=
"eli_exp"
){
if
(
input
$
pop_size_input_type
!=
"eli_exp"
){
output
$
title_distri_plot
<-
renderText
({
"Taille initiale de la population"
})
output
$
distri_plot
<-
renderPlot
({
...
...
@@ -849,7 +849,7 @@ server <- function(input, output, session){
}
else
{
# Show from elicitation expert: if button is ON and input_type is set on "expert elicitation"
if
(
input
$
button_pop_size
%%
2
==
1
&
input
$
pop_size_input_type
==
"eli_exp"
){
if
(
input
$
pop_size_input_type
==
"eli_exp"
){
if
(
!
is.null
(
param
$
pop_size_eli_result
)){
output
$
title_distri_plot
<-
renderText
({
"Taille initiale de la population"
})
output
$
distri_plot
<-
renderPlot
({
plot_expert
(
param
$
pop_size_eli_result
$
out
)
})
...
...
@@ -871,11 +871,11 @@ server <- function(input, output, session){
##----------------------
observeEvent
({
input
$
pop_growth_input_type
input
$
button
_pop_growth
input
$
show_ditri
_pop_growth
},{
# Show from input values: if button is ON and input_type is set on "value" or "interval"
if
(
input
$
button_pop_growth
%%
2
==
1
&
input
$
pop_growth_input_type
!=
"eli_exp"
&
input
$
pop_growth_input_type
!=
"trend"
){
if
(
input
$
pop_growth_input_type
!=
"eli_exp"
&
input
$
pop_growth_input_type
!=
"trend"
){
output
$
title_distri_plot
<-
renderText
({
"Taux de croissance de la population"
})
output
$
distri_plot
<-
renderPlot
({
...
...
@@ -885,7 +885,7 @@ server <- function(input, output, session){
}
else
{
# Show from elicitation expert: if button is ON and input_type is set on "expert elicitation"
if
(
input
$
button_pop_growth
%%
2
==
1
&
input
$
pop_growth_input_type
==
"eli_exp"
){
if
(
input
$
pop_growth_input_type
==
"eli_exp"
){
if
(
!
is.null
(
param
$
pop_growth_eli_result
)){
output
$
title_distri_plot
<-
renderText
({
"Taux de croissance de la population"
})
output
$
distri_plot
<-
renderPlot
({
plot_expert
(
param
$
pop_growth_eli_result
$
out
)
})
...
...
@@ -906,10 +906,10 @@ server <- function(input, output, session){
##----------------------
observeEvent
({
input
$
carrying_cap_input_type
input
$
button
_carrying_cap
input
$
show_ditri
_carrying_cap
},{
# Show from input values: if button is ON and input_type is set on "value"
if
(
input
$
button_carrying_cap
%%
2
==
1
&
input
$
carrying_cap_input_type
!=
"eli_exp"
){
if
(
input
$
carrying_cap_input_type
!=
"eli_exp"
){
output
$
title_distri_plot
<-
renderText
({
"Capacit de charge"
})
output
$
distri_plot
<-
renderPlot
({
...
...
@@ -919,7 +919,7 @@ server <- function(input, output, session){
}
else
{
# Show from elicitation expert: if button is ON and input_type is set on "expert elicitation"
if
(
input
$
button_carrying_cap
%%
2
==
1
&
input
$
carrying_cap_input_type
==
"eli_exp"
){
if
(
input
$
carrying_cap_input_type
==
"eli_exp"
){
if
(
!
is.null
(
param
$
carrying_cap_eli_result
)){
if
(
!
is.na
(
param
$
carrying_cap_eli_result
$
out
)){
output
$
title_distri_plot
<-
renderText
({
"Capacit de charge"
})
...
...
This diff is collapsed.
Click to expand it.
inst/ShinyApp/ui.R
+
12
−
13
View file @
e6a085b0
...
...
@@ -444,7 +444,6 @@ h4{
## Modify vital rates, if needed (actionButton and matrixInput)
{
column
(
width
=
4
,
tags
$
style
(
HTML
(
'#button_vital_rates{background-color:#C2C8D3}'
)),
actionButton
(
inputId
=
"button_vital_rates"
,
label
=
tags
$
span
(
"Modifier les paramtres dmographiques"
,
style
=
"font-weight: bold; font-size: 18px;"
)
...
...
@@ -501,7 +500,6 @@ h4{
##~~~~~~~~~~~~~~~~~~~~~~~~~
{
column
(
width
=
3
,
tags
$
style
(
HTML
(
'#button_fatalities{background-color:#C2C8D3}'
)),
actionButton
(
inputId
=
"button_fatalities"
,
width
=
'100%'
,
label
=
tags
$
span
(
"Mortalits annuelles"
,
style
=
"font-weight: bold; font-size: 18px;"
)
),
...
...
@@ -540,12 +538,12 @@ h4{
# Interval
numericInput
(
inputId
=
"fatalities_lower"
,
label
=
"Borne infrieure (mortalits annuelles)"
,
value
=
1
,
value
=
5
,
min
=
0
,
max
=
Inf
,
step
=
0.5
),
numericInput
(
inputId
=
"fatalities_upper"
,
label
=
"Borne suprieure (mortalits annuelles)"
,
value
=
1
,
value
=
1
0
,
min
=
0
,
max
=
Inf
,
step
=
0.5
),
# Values
...
...
@@ -595,9 +593,9 @@ h4{
options
=
list
(
container
=
'body'
)
)
),
value
=
matrix
(
c
(
1
,
0
,
2011
,
2
,
0
,
2012
,
3
,
0
,
2013
),
value
=
matrix
(
c
(
2
,
0
.5
,
2011
,
5
,
0
.5
,
2012
,
10
,
0
.5
,
2013
),
nrow
=
3
,
ncol
=
3
,
byrow
=
TRUE
,
dimnames
=
list
(
c
(
paste0
(
"Parc num."
,
c
(
1
:
3
))),
c
(
"Valeur centrale"
,
...
...
@@ -647,7 +645,6 @@ h4{
##~~~~~~~~~~~~~~~~~~~~~~~~~
{
column
(
width
=
3
,
tags
$
style
(
HTML
(
'#button_pop_size{background-color:#C2C8D3}'
)),
actionButton
(
inputId
=
"button_pop_size"
,
width
=
'100%'
,
label
=
tags
$
span
(
"Taille de la population"
,
style
=
"font-weight: bold; font-size: 18px;"
)
),
...
...
@@ -688,7 +685,7 @@ h4{
numericInput
(
inputId
=
"pop_size_upper"
,
label
=
"Borne suprieure (taille population)"
,
value
=
5
00
,
value
=
7
00
,
min
=
0
,
max
=
Inf
,
step
=
10
),
# Values
...
...
@@ -735,7 +732,6 @@ h4{
##~~~~~~~~~~~~~~~~~~~~~~~~~
{
column
(
width
=
3
,
tags
$
style
(
HTML
(
'#button_pop_growth{background-color:#C2C8D3}'
)),
actionButton
(
inputId
=
"button_pop_growth"
,
width
=
'100%'
,
label
=
tags
$
span
(
"Taux de croissance"
,
style
=
"font-weight: bold; font-size: 18px;"
)
),
...
...
@@ -768,7 +764,7 @@ h4{
numericInput
(
inputId
=
"pop_growth_upper"
,
label
=
HTML
(
"Borne suprieure<br>(taux d'accroissement en %)"
),
value
=
-
2
,
value
=
-
3
,
min
=
-100
,
max
=
Inf
,
step
=
1
),
## Input values: mean and se
...
...
@@ -836,7 +832,6 @@ h4{
##~~~~~~~~~~~~~~~~~~~~~~~~~
{
column
(
width
=
3
,
tags
$
style
(
HTML
(
'#button_carrying_cap{background-color:#C2C8D3}'
)),
actionButton
(
inputId
=
"button_carrying_cap"
,
width
=
'100%'
,
label
=
tags
$
span
(
"Capacit de charge"
,
style
=
"font-weight: bold; font-size: 18px;"
)
),
...
...
@@ -877,7 +872,7 @@ h4{
numericInput
(
inputId
=
"carrying_capacity_upper"
,
label
=
"Borne suprieure (capacit de charge)"
,
value
=
1
0
00
,
value
=
1
5
00
,
min
=
0
,
max
=
Inf
,
step
=
100
),
# Values
...
...
@@ -977,6 +972,10 @@ h4{
## Parameter distribution
{
tabPanel
(
title
=
"Distribution paramtres"
,
actionButton
(
"show_ditri_fatalities"
,
label
=
"Mortalits annuelles"
),
actionButton
(
"show_ditri_pop_size"
,
label
=
"Taille de la population"
),
actionButton
(
"show_ditri_pop_growth"
,
label
=
"Taux de croissance"
),
actionButton
(
"show_ditri_carrying_cap"
,
label
=
"Capacit de charge"
),
span
(
textOutput
(
outputId
=
"title_distri_plot"
),
style
=
"font-size:24px; font-weight:bold"
),
plotOutput
(
outputId
=
"distri_plot"
),
...
...
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