diff --git a/R/theme.R b/R/theme.R index ffc3c50..d0533f8 100644 --- a/R/theme.R +++ b/R/theme.R @@ -8,20 +8,21 @@ custom_theme <- function(..., version = 5, primary = "#1E4A8F", secondary = "#FF6F61", + bootswatch = "united", + base_font = bslib::font_google("Montserrat"), + heading_font = bslib::font_google("Public Sans",wght = "700"), + code_font = bslib::font_google("Open Sans") # success = "#1E4A8F", # info = , # warning = , # danger = , # fg = "#000", # bg="#fff", - bootswatch = "united", - base_font = bslib::font_google("Montserrat"), # base_font = bslib::font_google("Alice"), # heading_font = bslib::font_google("Jost", wght = "800"), # heading_font = bslib::font_google("Noto Serif"), # heading_font = bslib::font_google("Alice"), - heading_font = bslib::font_google("Public Sans",wght = "700"), - code_font = bslib::font_google("Open Sans")){ + ){ bslib::bs_theme( ..., version = version, diff --git a/README.md b/README.md index ff2392a..867781f 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ [](https://agdamsbo.shinyapps.io/freesearcheR/) -This package is the backbone of the free and open browser based data exploration and analysis tool with publication ready output. +This package is the backbone of the ***freesearcheR***, a free and open-source browser based data exploration and analysis tool for clinicians and researchers with publication ready output. -This package and the ***freesearcheR***-tool is part of a large project to democratize health data analysis and removing barriers for clinicians to engage in health research. +This package and the ***freesearcheR***-tool is part of a larger initiative to democratize health data analysis and remove barriers for clinicians to engage in health research. the ***freesearcheR***-tool is online and accessible here: [link to the app freely hosted on shinyapps.io](https://agdamsbo.shinyapps.io/freesearcheR/). All feedback is welcome and can be shared as a GitHub issue. @@ -17,6 +17,10 @@ Initiatives for funding continued development of the tool and surrounding initia ## Roadmap +The current state of the app is considered experimental, and a lot of things are still changing. It is, however, in a usable state, with basic functions available to the user. + +Below are some (the actual list is quite long and growing) of the planned features and improvements: + - [ ] Stratified analyses - Additional study designs: @@ -32,6 +36,12 @@ Initiatives for funding continued development of the tool and surrounding initia - [x] Add histograms for data distribution. 2025-01-16 - [x] Option to edit labels. 2025-01-16 + +- More output controls + + - [ ] Theming output tables + + - [ ] Select analyses to include in report - [ ] Plot regression analyses results diff --git a/_pkgdown.yml b/_pkgdown.yml index 12b9f32..cdf5292 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,4 +1,11 @@ url: https://agdamsbo.github.io/freesearcheR/ template: - bootstrap: 5 + bslib: + version: 5 + primary: "#1E4A8F" + secondary: "#FF6F61" + bootswatch: "united" + base_font: bslib::font_google("Montserrat") + heading_font: bslib::font_google("Public Sans",wght: "700") + code_font: bslib::font_google("Open Sans") diff --git a/inst/apps/data_analysis_modules/app.R b/inst/apps/data_analysis_modules/app.R index 8b459dc..2142587 100644 --- a/inst/apps/data_analysis_modules/app.R +++ b/inst/apps/data_analysis_modules/app.R @@ -123,7 +123,7 @@ library(shiny) # structure(match(splitter, names(labs)), levels = labs, class = "factor") # } -#' Title +#' Extended cutting function #' #' @param x an object inheriting from class "hms" #' @param ... passed on @@ -808,7 +808,7 @@ add_sparkline <- function(grid, column = "vals", color.main = "#2a8484", color.s #' #' @param data vector #' -#' @returns +#' @returns logical #' @export #' #' @examples @@ -915,6 +915,10 @@ create_overview_datagrid <- function(data) { #' @export #' #' @examples +#' mtcars |> +#' overview_vars() |> +#' toastui::datagrid() |> +#' add_class_icon() add_class_icon <- function(grid, column = "class") { out <- toastui::grid_format( grid = grid, @@ -2180,20 +2184,21 @@ custom_theme <- function(..., version = 5, primary = "#1E4A8F", secondary = "#FF6F61", + bootswatch = "united", + base_font = bslib::font_google("Montserrat"), + heading_font = bslib::font_google("Public Sans",wght = "700"), + code_font = bslib::font_google("Open Sans") # success = "#1E4A8F", # info = , # warning = , # danger = , # fg = "#000", # bg="#fff", - bootswatch = "united", - base_font = bslib::font_google("Montserrat"), # base_font = bslib::font_google("Alice"), # heading_font = bslib::font_google("Jost", wght = "800"), # heading_font = bslib::font_google("Noto Serif"), # heading_font = bslib::font_google("Alice"), - heading_font = bslib::font_google("Public Sans",wght = "700"), - code_font = bslib::font_google("Open Sans")){ + ){ bslib::bs_theme( ..., version = version, @@ -2599,8 +2604,14 @@ add_var_toset <- function(data, var_name, default = "") { data[, datanames] } -#' @importFrom toastui datagrid grid_columns grid_format grid_style_column -#' grid_style_column grid_editor grid_editor_opts grid_selection_row +#' Modified from the datamods pacakge +#' +#' @param data data +#' +#' @param height height +#' @param selectionId selectionId +#' @param buttonId buttonId +#' #' @examples #' mtcars |> #' summary_vars() |> @@ -3018,9 +3029,10 @@ ui_elements <- list( shiny::column( width = 9, shiny::tags$p( - "Below is a short summary table of the provided data. + "Below is a short summary table of the provided data. On the right hand side you have the option to create filters. - At the bottom you'll find a raw overview of the original vs the modified data.") + At the bottom you'll find a raw overview of the original vs the modified data." + ) ) ), fluidRow( @@ -3121,8 +3133,8 @@ ui_elements <- list( title = "Browser", tags$h3("Browse the provided data"), shiny::tags$p( - "Below is a data table with all the modified data provided to browse and understand data." - ), + "Below is a data table with all the modified data provided to browse and understand data." + ), shinyWidgets::html_dependency_winbox(), # fluidRow( # column( @@ -3306,12 +3318,21 @@ ui_elements <- list( ######### Documentation panel ######### ############################################################################## - "docs" = bslib::nav_panel( - title = "Documentation", - # shiny::tags$iframe("www/docs.html", height=600, width=535), - shiny::htmlOutput("docs_file"), - shiny::br() + "docs" = bslib::nav_item( + # shiny::img(shiny::icon("book")), + shiny::tags$a( + href = "https://agdamsbo.github.io/freesearcheR/", + "Docs (external)", + target = "_blank", + rel = "noopener noreferrer" ) + ) + # bslib::nav_panel( + # title = "Documentation", + # # shiny::tags$iframe("www/docs.html", height=600, width=535), + # shiny::htmlOutput("docs_file"), + # shiny::br() + # ) ) # Initial attempt at creating light and dark versions @@ -3344,6 +3365,7 @@ ui <- bslib::page_fixed( ui_elements$import, ui_elements$overview, ui_elements$analyze, + bslib::nav_spacer(), ui_elements$docs, # bslib::nav_spacer(), # bslib::nav_item(shinyWidgets::circleButton(inputId = "mode", icon = icon("moon"),status = "primary")), diff --git a/inst/apps/data_analysis_modules/ui.R b/inst/apps/data_analysis_modules/ui.R index 473b809..dd88d4c 100644 --- a/inst/apps/data_analysis_modules/ui.R +++ b/inst/apps/data_analysis_modules/ui.R @@ -93,9 +93,10 @@ ui_elements <- list( shiny::column( width = 9, shiny::tags$p( - "Below is a short summary table of the provided data. + "Below is a short summary table of the provided data. On the right hand side you have the option to create filters. - At the bottom you'll find a raw overview of the original vs the modified data.") + At the bottom you'll find a raw overview of the original vs the modified data." + ) ) ), fluidRow( @@ -196,8 +197,8 @@ ui_elements <- list( title = "Browser", tags$h3("Browse the provided data"), shiny::tags$p( - "Below is a data table with all the modified data provided to browse and understand data." - ), + "Below is a data table with all the modified data provided to browse and understand data." + ), shinyWidgets::html_dependency_winbox(), # fluidRow( # column( @@ -381,12 +382,21 @@ ui_elements <- list( ######### Documentation panel ######### ############################################################################## - "docs" = bslib::nav_panel( - title = "Documentation", - # shiny::tags$iframe("www/docs.html", height=600, width=535), - shiny::htmlOutput("docs_file"), - shiny::br() + "docs" = bslib::nav_item( + # shiny::img(shiny::icon("book")), + shiny::tags$a( + href = "https://agdamsbo.github.io/freesearcheR/", + "Docs (external)", + target = "_blank", + rel = "noopener noreferrer" ) + ) + # bslib::nav_panel( + # title = "Documentation", + # # shiny::tags$iframe("www/docs.html", height=600, width=535), + # shiny::htmlOutput("docs_file"), + # shiny::br() + # ) ) # Initial attempt at creating light and dark versions @@ -419,6 +429,7 @@ ui <- bslib::page_fixed( ui_elements$import, ui_elements$overview, ui_elements$analyze, + bslib::nav_spacer(), ui_elements$docs, # bslib::nav_spacer(), # bslib::nav_item(shinyWidgets::circleButton(inputId = "mode", icon = icon("moon"),status = "primary")), diff --git a/inst/apps/data_analysis_modules/www/docs.html b/inst/apps/data_analysis_modules/www/docs.html deleted file mode 100644 index 9c2ae4b..0000000 --- a/inst/apps/data_analysis_modules/www/docs.html +++ /dev/null @@ -1,69 +0,0 @@ - -
- - - - - - - -So glad to see you here! Welcome to test this early concept of a platform to easily explore, manipulate and analyse clinical data.
-Below will be a more detailed description of the included features and possibilities, as well as the planned and possible feature additions.
-Contributions are very welcome. If you find anything odd, or you think of features to add or remove, please share and report on the project page on GitHub.
-Additional study designs:
-More detailed variable browser
-This is the freesearchR web data analysis -tool. We intend the freesearchR to be a +
This is the freesearcheR web data analysis +tool. We intend the freesearcheR to be a powerful and free tool for easy data evaluation and analysis at the hands of the clinician.
By intention, this tool has been designed to be simple to use with a minimum of mandatory options to keep the workflow streamlined, while also including a few options to go even further.
-There are four simple steps to go through:
+There are four simple steps to go through (see corresponding tabs in +the top):
“Import -data” (a spreadsheet/file on your machine, direct export from a -REDCap server, or a local file provided with a package) to get +
Import data (a spreadsheet/file on your machine, direct export +from a REDCap server, or a local file provided with a package) to get started.
An optional step of data modification (change variable classes and creating categorical variables (factors) from numeric or @@ -379,8 +379,16 @@ compare variables)
Evaluation of model assumptions
Export the the analyses results as for MS Word or LibreOffice.
Export the the analyses results for MS Word or LibreOffice as well as the data +with preserved metadata.
Have a look at the documentations page for further +project description. If you’re interested in the source code, then go +on, have a +look!
+If you encounter anything strange or the app doesn’t act as expected. +Please report +on Github.