mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
publishing with docker
This commit is contained in:
parent
4c42636faa
commit
4f0a17d821
20 changed files with 12040 additions and 68 deletions
BIN
app_docker/www/FreesearchR-logo.png
Normal file
BIN
app_docker/www/FreesearchR-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
BIN
app_docker/www/favicon.ico
Executable file
BIN
app_docker/www/favicon.ico
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
app_docker/www/favicon.png
Normal file
BIN
app_docker/www/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
3
app_docker/www/favicon.svg
Executable file
3
app_docker/www/favicon.svg
Executable file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 38 KiB |
438
app_docker/www/intro.html
Normal file
438
app_docker/www/intro.html
Normal file
File diff suppressed because one or more lines are too long
31
app_docker/www/intro.md
Normal file
31
app_docker/www/intro.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Welcome <img style="float: right;" src="FreesearchR-logo.png">
|
||||
|
||||
This is the ***FreesearchR*** data analysis tool. We intend ***FreesearchR*** to be a free tool for easy data evaluation and analysis. If you need more advanced tools, start with ***FreesearchR*** and then you'll probably be better off using *R* or similar directly.
|
||||
|
||||
Here is a brief summary of the functions:
|
||||
|
||||
1. **Import data** from a spreadsheet/file on your machine, direct export from a REDCap server, sample data or data from a your local environment if run locally.
|
||||
|
||||
1. **Data inspection** and **modification** like modifying variables or creating new (categorical from numeric or time data, or completely new variables from the data)
|
||||
|
||||
1. **Evaluate data** using descriptive analyses methods and inspect cross-correlations
|
||||
|
||||
1. **Create and export simple, clean plots** for data overview and insights
|
||||
|
||||
1. **Create regression simple models** for even more advanced data analyses
|
||||
|
||||
- Linear, dichotomous or ordinal logistic regression will be used depending on specified outcome variable
|
||||
|
||||
- Plot regression analysis coefficients
|
||||
|
||||
- Evaluate model assumptions
|
||||
|
||||
1. **Export results**
|
||||
|
||||
- Descriptive and regression analyses results for MS Word or [LibreOffice](https://www.libreoffice.org/)
|
||||
|
||||
- Modified data with preserved metadata
|
||||
|
||||
- Code to recreate all steps locally
|
||||
|
||||
The full [project documentation is here](https://agdamsbo.github.io/FreesearchR/) where you'll find detailed description of the app and link to the source code! If you want to [share feedback, please follow this link to a simple survey](https://redcap.au.dk/surveys/?s=JPCLPTXYDKFA8DA8).
|
||||
11
app_docker/www/references.bib
Normal file
11
app_docker/www/references.bib
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
@book{andreasgammelgaarddamsbo2025,
|
||||
title = {agdamsbo/FreesearchR: FreesearchR 25.4.3},
|
||||
author = {Damsbo, Andreas Gammelgaard},
|
||||
year = {2025},
|
||||
month = {04},
|
||||
date = {2025-04-24},
|
||||
publisher = {Zenodo},
|
||||
doi = {10.5281/ZENODO.14527429},
|
||||
url = {https://zenodo.org/doi/10.5281/zenodo.14527429}
|
||||
}
|
||||
83
app_docker/www/report.rmd
Normal file
83
app_docker/www/report.rmd
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
---
|
||||
title: "FreesearchR data report"
|
||||
date: "Report generated `r gsub('(\\D)0', '\\1', format(Sys.time(), '%A, %d.%m.%Y'))`"
|
||||
format: docx
|
||||
author: FreesearchR data analysis tool
|
||||
toc: false
|
||||
params:
|
||||
data.file: NA
|
||||
version: NA
|
||||
regression.p: NA
|
||||
---
|
||||
|
||||
```{r setup, echo = FALSE}
|
||||
knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
|
||||
# glue::glue("{format(lubridate::today(),'%A')}, {lubridate::day(lubridate::today())}.{lubridate::month(lubridate::today())}.{lubridate::year(lubridate::today())}")
|
||||
```
|
||||
|
||||
```{r}
|
||||
web_data <- readr::read_rds(file = params$data.file)
|
||||
# web_data <- readr::read_rds(file = "~/FreesearchR/inst/apps/FreesearchR/www/web_data.rds")
|
||||
library(gtsummary)
|
||||
library(gt)
|
||||
|
||||
tbl_merge <- function(data) {
|
||||
if (is.null(names(data))) {
|
||||
data |> gtsummary::tbl_merge()
|
||||
} else {
|
||||
data |> gtsummary::tbl_merge(tab_spanner = names(data))
|
||||
}
|
||||
}
|
||||
|
||||
vec2sentence <- function(data, sep.word = "and") {
|
||||
sep.word <- paste0(" ", gsub(" ", "", sep.word), " ")
|
||||
if (length(data) < 2) {
|
||||
out <- data
|
||||
} else if (length(data) == 2) {
|
||||
out <- paste(data, collapse = sep.word)
|
||||
} else {
|
||||
out <- paste(paste(data[-length(data)], collapse = ","), data[length(data)], sep = sep.word)
|
||||
}
|
||||
return(out)
|
||||
}
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
Research should be free and open with easy access for all. The *FreesearchR* tool attempts to help lower the bar to participate in research by making basic data exploration and analyses easily accessible.
|
||||
|
||||
## Methods
|
||||
|
||||
Analyses were conducted using the *FreesearchR* data analysis web-tool version `r params$version` based on *R* version 4.4.1.
|
||||
|
||||
## Results
|
||||
|
||||
Below are the baseline characteristics.
|
||||
|
||||
```{r, results = 'asis'}
|
||||
if ("table1" %in% names(web_data)) {
|
||||
tbl <- gtsummary::as_gt(web_data$table1)
|
||||
knitr::knit_print(tbl)
|
||||
}
|
||||
```
|
||||
|
||||
`r if (length(web_data$regression) > 0) glue::glue("Below are the results from the { tolower(vec2sentence(names(web_data$regression$regression$tables)))} {web_data$regression$regression$params$descr}.")`
|
||||
|
||||
```{r, results = 'asis'}
|
||||
if ("regression" %in% names(web_data) && length(web_data$regression) > 0) {
|
||||
reg_tbl <- web_data$regression$regression$tables
|
||||
|
||||
merged <- tbl_merge(reg_tbl)
|
||||
|
||||
if (params$regression.p == "no") {
|
||||
merged <- merged |>
|
||||
gtsummary::modify_column_hide(column = dplyr::starts_with("p.value"))
|
||||
}
|
||||
|
||||
knitr::knit_print(merged)
|
||||
}
|
||||
```
|
||||
|
||||
## Discussion
|
||||
|
||||
Good luck on your further work!
|
||||
125
app_docker/www/style.css
Normal file
125
app_docker/www/style.css
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
|
||||
/*!
|
||||
* Copyright (c) 2025 FreesearchR
|
||||
*
|
||||
* FreesearchR, CSS styles
|
||||
* https://github.com/agdamsbo/FreesearchR
|
||||
*
|
||||
* @version 0.0.1
|
||||
*/
|
||||
|
||||
.container-fluid > .nav > li >
|
||||
a[data-value='FreesearchR'] {font-size: 28px}
|
||||
|
||||
|
||||
/* from datamods */
|
||||
.show-block {
|
||||
display: block !important;
|
||||
}
|
||||
.show-inline {
|
||||
display: inline !important;
|
||||
}
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
.invisible {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.container-rule {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
height: 25px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.horizontal-rule {
|
||||
position: absolute;
|
||||
top: 11px;
|
||||
right: 0;
|
||||
left: 0;
|
||||
background-color: #d0cfcf;
|
||||
height: 1px;
|
||||
z-index: 100;
|
||||
margin: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.label-rule {
|
||||
background: #FFF;
|
||||
opacity: 1;
|
||||
z-index: 101;
|
||||
background-color: #FFF;
|
||||
position: relative;
|
||||
padding: 0 10px 0 10px;
|
||||
}
|
||||
|
||||
.datamods-table-container {
|
||||
overflow: auto;
|
||||
word-break: keep-all;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.datamods-table-container > .table {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.datamods-file-import {
|
||||
display: grid;
|
||||
grid-template-columns: auto 50px;
|
||||
grid-column-gap: 10px;
|
||||
}
|
||||
|
||||
.datamods-dt-nowrap {
|
||||
word-break: keep-all;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* validation */
|
||||
.datamods-validation-results {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-template-rows: 1fr;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
.datamods-validation-summary {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.datamods-validation-item {
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* modified from esquisse for data types */
|
||||
.btn-column-categorical {
|
||||
background-color: #00C896;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.btn-column-continuous {
|
||||
background-color: #FFB100;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.btn-column-dichotomous {
|
||||
background-color: #8A4FFF;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.btn-column-datetime {
|
||||
background-color: #11A0EC;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.btn-column-id {
|
||||
background-color: #848484;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.btn-column-text {
|
||||
background-color: #2E2E2E;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
1
app_docker/www/umami-app.html
Normal file
1
app_docker/www/umami-app.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<script defer src="https://stats.freesearchr.org/script.js" data-website-id="63976000-9836-45bc-90da-37ec5717fb22"></script>
|
||||
BIN
app_docker/www/web_data.rds
Normal file
BIN
app_docker/www/web_data.rds
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue