Skip to content

Commit

Permalink
🐛 added data to start
Browse files Browse the repository at this point in the history
  • Loading branch information
ecoisilva committed Aug 10, 2022
1 parent 34946f3 commit ce5bd15
Show file tree
Hide file tree
Showing 13 changed files with 1,827 additions and 1,842 deletions.
107 changes: 52 additions & 55 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,55 +1,52 @@
Package: movedesign
Title: Study design of movement ecology studies
Version: 0.0.0.9001
Authors@R: person('In\u00EAs', 'Silva', email = '[email protected]', role = c('cre', 'aut'))
Description: A shiny app to design movement ecology studies.
License: MIT + file LICENSE
URL: https://ecoisilva.github.io/movedesign/
Depends:
R (>= 3.5.0)
Imports:
bsplus,
config (>= 0.3.1),
crayon,
ctmm (>= 0.6.1),
dplyr,
DT,
data.table,
fontawesome,
ggiraph,
ggplot2,
golem (>= 0.3.2),
mapboxer,
minpack.lm,
pkgload,
plyr,
reactable,
rintrojs,
scales,
shiny (>= 1.7.1),
shinyalert,
shinycssloaders,
shinydashboard,
shinydashboardPlus,
shinyFeedback,
shinybusy,
shinyjs,
shinyWidgets,
sparkline,
stats,
stringr,
utils,
viridis,
waiter
Suggests:
covr,
knitr,
rmarkdown,
testthat (>= 3.0.0),
shinytest2
VignetteBuilder:
knitr
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.1
Package: movedesign
Title: Study design of movement ecology studies
Version: 0.0.9002
Authors@R: person('In\u00EAs', 'Silva', email = '[email protected]', role = c('cre', 'aut'))
Description: A shiny app to design movement ecology studies.
License: MIT + file LICENSE
URL: https://ecoisilva.github.io/movedesign/
Depends:
R (>= 3.5.0)
Imports:
bayestestR,
bsplus,
config (>= 0.3.1),
crayon,
ctmm (>= 0.6.1),
dplyr,
data.table,
fontawesome,
ggiraph,
ggplot2,
golem (>= 0.3.2),
minpack.lm,
pkgload,
plyr,
reactable,
rintrojs,
scales,
shiny (>= 1.7.1),
shinyalert,
shinycssloaders,
shinydashboard,
shinydashboardPlus,
shinyFeedback,
shinybusy,
shinyjs,
shinyWidgets,
stats,
stringr,
utils,
viridis
Suggests:
covr,
knitr,
rmarkdown,
testthat (>= 3.0.0),
shinytest2
VignetteBuilder:
knitr
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.1
11 changes: 6 additions & 5 deletions R/app_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ app_server <- function(input, output, session) {
# Misc: -----------------------------------------------------------------

# Data viz:
mod_comp_viz_server("comp_viz_uploaded", vals = vals) # data_upload
mod_comp_viz_server("comp_viz_selected", vals = vals) # data_select
mod_comp_viz_server("comp_viz_uploaded", vals = vals) # Uploaded
mod_comp_viz_server("comp_viz_selected", vals = vals) # Selected

# Header and control tabs:
mod_comp_settings_server("comp_settings_1", vals = vals)
Expand All @@ -192,9 +192,10 @@ app_server <- function(input, output, session) {

message("Session stopped")

# if(is.null(movmods)) {
# rm("movmods", envir = .GlobalEnv) }
# print(ls(envir = .GlobalEnv))
if(!is.null(gps_fixrate)) rm("gps_fixrate", envir = .GlobalEnv)
if(!is.null(sims_hrange)) rm("sims_hrange", envir = .GlobalEnv)
if(!is.null(sims_speed)) rm("sims_speed", envir = .GlobalEnv)
print(ls(envir = .GlobalEnv))

}) # end of onStop

Expand Down
3 changes: 1 addition & 2 deletions R/app_ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ golem_add_external_resources <- function() {
),

shinyFeedback::useShinyFeedback(),
shinybrowser::detect(),


# Activate tooltips and popovers:
bsplus::use_bs_tooltip(),
bsplus::use_bs_popover(),
Expand Down
6 changes: 0 additions & 6 deletions R/mod_comp_viz.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ mod_comp_viz_ui <- function(id) {

div(class = "col-xs-12 col-sm-12 col-md-12 col-lg-6",
reactable::reactableOutput(ns("dataTable_id")),
# DT::dataTableOutput(ns("dataTable_id")) %>%
# shinycssloaders::withSpinner(
# type = getOption("spinner.type", default = 7),
# color = getOption("spinner.color",
# default = "#f4f4f4")),

uiOutput(ns("dataTable_showVars"))
)

Expand Down
2 changes: 0 additions & 2 deletions R/mod_tab_device.R
Original file line number Diff line number Diff line change
Expand Up @@ -824,8 +824,6 @@ mod_tab_device_server <- function(id, vals) {
req(vals$active_tab == 'regime',
input$device_type == 1)

# utils::data(gps_fixrate, package = "movedesign")

fixrate <- movedesign::gps_fixrate
maxrate_choices <- fixrate %>%
dplyr::filter(choices == "Y") %>%
Expand Down
2 changes: 0 additions & 2 deletions R/mod_tab_hrange.R
Original file line number Diff line number Diff line change
Expand Up @@ -1049,8 +1049,6 @@ mod_tab_hrange_server <- function(id, vals) {

output$hrInfo_dti <- shiny::renderUI({

print("output$hrInfo_dti")
print(vals$dti0_units)
dti <- as.numeric(sumdat[grep('sampling interval', nms)])
out <- fix_unit(dti, vals$dti0_units)

Expand Down
14 changes: 7 additions & 7 deletions R/mod_tab_report.R
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ mod_tab_report_server <- function(id, vals) {
input_taup <- "days" %#% vals$tau_p0 %#% vals$tau_p0_units
input_dur <- "days" %#% vals$reg$dur %#% vals$reg$dur_unit

dat <- sims_hrange[[1]] %>%
dat <- movedesign::sims_hrange[[1]] %>%
dplyr::mutate(tau_p = round("days" %#% tau_p, 1)) %>%
dplyr::mutate(duration = round("days" %#% duration, 1))

Expand Down Expand Up @@ -614,7 +614,7 @@ mod_tab_report_server <- function(id, vals) {
input_dur <- "days" %#% vals$reg$dur %#% vals$reg$dur_unit
input_dti <- vals$reg$dti %#% vals$reg$dti_unit

dat <- sims_speed[[1]] %>%
dat <- movedesign::sims_speed[[1]] %>%
dplyr::mutate(dur = round("days" %#% dur, 0))

index_tauv <- which.min(abs(dat$tau_v - input_tauv))
Expand Down Expand Up @@ -643,7 +643,7 @@ mod_tab_report_server <- function(id, vals) {

input_taup <- "days" %#% vals$tau_p0 %#% vals$tau_p0_units

dat <- sims_hrange[[1]] %>%
dat <- movedesign::sims_hrange[[1]] %>%
dplyr::mutate(tau_p = round("days" %#% tau_p, 1)) %>%
dplyr::mutate(duration = round("days" %#% duration, 1))

Expand All @@ -668,11 +668,11 @@ mod_tab_report_server <- function(id, vals) {

input_tauv <- vals$tau_v0 %#% vals$tau_v0_units

dat <- sims_speed[[1]]
dat <- movedesign::sims_speed[[1]]
index_tauv <- which.min(abs(dat$tau_v - input_tauv))

out_tauv <- dat$tau_v[index_tauv]
opts <- sims_speed[[1]] %>%
opts <- movedesign::sims_speed[[1]] %>%
dplyr::select(dti, dti_notes) %>%
unique()
out_dti <- fix_unit(opts$dti[match(input$highlight_dti,
Expand Down Expand Up @@ -1040,7 +1040,7 @@ mod_tab_report_server <- function(id, vals) {
if (!is.na(as.numeric(input$highlight_dur))) reveal_if <- TRUE
}

dat <- sims_hrange[[1]] %>%
dat <- movedesign::sims_hrange[[1]] %>%
dplyr::mutate(tau_p = round("days" %#% tau_p, 1)) %>%
dplyr::mutate(duration = round("days" %#% duration, 1))

Expand Down Expand Up @@ -1428,7 +1428,7 @@ mod_tab_report_server <- function(id, vals) {

output$plot_hr_error <- ggiraph::renderGirafe({

dat <- sims_hrange[[2]] %>%
dat <- movedesign::sims_hrange[[2]] %>%
dplyr::mutate(tau_p = round("days" %#% tau_p, 1)) %>%
dplyr::mutate(duration = round("days" %#% duration, 1))
dat$id <- 1:nrow(dat)
Expand Down
Loading

0 comments on commit ce5bd15

Please sign in to comment.