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
55c7dae6
Commit
55c7dae6
authored
3 years ago
by
thierrychambert
Browse files
Options
Downloads
Patches
Plain Diff
Fixed some issue
Added observe(param) in server to make sure param used in simulations keep up to date !
parent
7551911b
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
inst/ShinyApp/runApp.R
+1
-0
1 addition, 0 deletions
inst/ShinyApp/runApp.R
inst/ShinyApp/server.R
+13
-10
13 additions, 10 deletions
inst/ShinyApp/server.R
inst/ShinyApp/ui.R
+4
-3
4 additions, 3 deletions
inst/ShinyApp/ui.R
run_analysis.R
+1
-0
1 addition, 0 deletions
run_analysis.R
with
19 additions
and
13 deletions
inst/ShinyApp/runApp.R
+
1
−
0
View file @
55c7dae6
library
(
eolpop
)
source
(
"./inst/ShinyApp/ui.R"
)
source
(
"./inst/ShinyApp/server.R"
)
...
...
This diff is collapsed.
Click to expand it.
inst/ShinyApp/server.R
+
13
−
10
View file @
55c7dae6
...
...
@@ -157,6 +157,7 @@ server <- function(input, output, session){
carrying_cap_eli_result
=
NULL
)
###~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~###
observe
(
param
)
##--------------------------------------------
## Display parameter distribution --
...
...
@@ -192,7 +193,6 @@ server <- function(input, output, session){
## Run expert elicitation --
##--------------------------------------------
plot_expert
<-
function
(
out
,
show_se
=
TRUE
,
...
){
#plot_elicitation(out, ylab = "Densit de probabilit", xlab = "Valeur du paramtre", cex.lab = 1.2)
plot_elicitation
(
out
,
ylab
=
""
,
xlab
=
"Valeur du paramtre"
,
cex.lab
=
1.2
,
yaxt
=
"n"
)
mtext
(
text
=
"Densit de probabilit"
,
side
=
2
,
line
=
2
,
cex
=
1.2
)
...
...
@@ -353,6 +353,17 @@ server <- function(input, output, session){
})
###~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~##
## Survivals, fecundities and rMAX_species ###~~~~~~~~~~~~~~~~~~~~~~~~~~###
observeEvent
({
input
$
run
},
{
param
$
survivals
<-
input
$
mat_fill_vr
[,
1
]
param
$
fecundities
<-
input
$
mat_fill_vr
[,
2
]
param
$
rMAX_species
<-
rMAX_spp
(
surv
=
tail
(
param
$
survivals
,
1
),
afr
=
min
(
which
(
param
$
fecundities
!=
0
)))
})
# end observeEvent
###~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~##
## Population growth ###~~~~~~~~~~~~~~~~~~~~~~~~~~###
observeEvent
({
...
...
@@ -399,14 +410,6 @@ server <- function(input, output, session){
}
})
# Survivals and fecundities
observeEvent
({
input
$
run
},
{
param
$
survivals
<-
input
$
mat_fill_vr
[,
1
]
param
$
fecundities
<-
input
$
mat_fill_vr
[,
2
]
param
$
rMAX_species
<-
rMAX_spp
(
surv
=
tail
(
param
$
survivals
,
1
),
afr
=
min
(
which
(
param
$
fecundities
!=
0
)))
})
# end observeEvent
# Survival and fecundity calibration
observeEvent
({
input
$
run
...
...
@@ -466,7 +469,7 @@ server <- function(input, output, session){
fecundities
=
param
$
f_calibrated
,
carrying_capacity
=
param
$
carrying_capacity
,
theta
=
param
$
theta
,
theta
=
theta
,
rMAX_species
=
param
$
rMAX_species
,
model_demo
=
NULL
,
...
...
This diff is collapsed.
Click to expand it.
inst/ShinyApp/ui.R
+
4
−
3
View file @
55c7dae6
...
...
@@ -219,7 +219,8 @@ ui <- fluidPage(
radioButtons
(
inputId
=
"pop_size_type"
,
label
=
h4
(
"Unit"
),
choices
=
c
(
"Nombre de couple"
=
"Npair"
,
"Effectif total"
=
"Ntotal"
)),
choices
=
c
(
"Nombre de couple"
=
"Npair"
,
"Effectif total"
=
"Ntotal"
),
selected
=
"Ntotal"
),
radioButtons
(
inputId
=
"pop_size_input_type"
,
label
=
h4
(
"Type de saisie"
),
...
...
@@ -265,7 +266,7 @@ ui <- fluidPage(
numericInput
(
inputId
=
"pop_growth_mean"
,
label
=
"Moyenne de la croissance de la population"
,
value
=
1
,
value
=
1.
1
,
min
=
0
,
max
=
Inf
,
step
=
0.01
),
numericInput
(
inputId
=
"pop_growth_se"
,
...
...
@@ -311,7 +312,7 @@ ui <- fluidPage(
numericInput
(
inputId
=
"carrying_capacity"
,
label
=
"Capacit de charge"
,
value
=
10
00
,
value
=
5
00
,
min
=
0
,
max
=
Inf
,
step
=
100
),
matrixInput
(
inputId
=
"carrying_cap_mat_expert"
,
...
...
This diff is collapsed.
Click to expand it.
run_analysis.R
+
1
−
0
View file @
55c7dae6
...
...
@@ -69,6 +69,7 @@ lambda( build_Leslie(s = s_calibrated, f = f_calibrated) )
#fatal_constant = "M"
#cumulated_impacts = FALSE
pop_growth_mean
=
1.1
pop_size_type
=
"Ntotal"
carrying_capacity
=
500
...
...
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