Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
^CRAN-RELEASE$
^customSettings$
^\.github$
^LICENSE\.md$
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ Package: safetyGraphics
Title: Create Interactive Graphics Related to Clinical Trial Safety
Version: 2.0.0
Authors@R: c(
person("Jeremy", "Wildfire", email = "jeremy_wildfire@rhoworld.com", role = c("cre","aut")),
person("Jeremy", "Wildfire", email = "jwildfire@gmail.com", role = c("cre","aut")),
person("Becca", "Krouse", role="aut"),
person("Preston","Burns", role="aut"),
person("Xiao","Ni", role = "aut"),
person("James","Buchanan", role="aut"),
person("Susan","Duke", role="aut"),
person("Interactive Safety Graphics Working Group", role = "aut"))
person("Susan","Duke", role="aut"))
Maintainer: Jeremy Wildfire <jeremy_wildfire@gmail.com>
Description: A framework for evaluation of clinical trial safety. Users can interactively explore their data using the 'Shiny' application or create standalone 'htmlwidget' charts. Interactive charts are built using 'd3.js' and 'webcharts.js' 'JavaScript' libraries.
URL: https://github.com/SafetyGraphics/safetyGraphics
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
YEAR: 2018
COPYRIGHT HOLDER: Rho Inc.
YEAR: 2021
COPYRIGHT HOLDER: safetyGraphics authors
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MIT License

Copyright (c) 2021 safetyGraphics authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,3 @@ importFrom(stringr,str_to_upper)
importFrom(utils,hasName)
importFrom(utils,zip)
importFrom(yaml,as.yaml)
importFrom(yaml,write_yaml)

2 changes: 0 additions & 2 deletions R/meta.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#' meta
#'
#' Metadata data frame containing information about the data mapping used to configure safetyGraphics charts. One record per unique data mapping
#'
#' @format A data frame with 31 rows and 7 columns
Expand Down
2 changes: 1 addition & 1 deletion R/mod_chartsNav.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Add a navbar tab that initializes the Chart Module UI
#' Adds a navbar tab that initializes the Chart Module UI
#'
#' @param chart chart metadata
#' @param ns namespace
Expand Down
10 changes: 4 additions & 6 deletions R/mod_chartsTab.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#' @title Charts Tab
#' @description Charting module
#' @title UI for chart module, designed to be re-used for each chart generated.
#'
#' @param id module id
#' @param chart list containing chart specifications
#' @param chart list containing chart specifications like those returned by \link{makeChartConfig}.
#'
#' @importFrom stringr str_to_title
#' @importFrom purrr map2
Expand All @@ -17,13 +16,12 @@ chartsTabUI <- function(id, chart){
return(list(header, chartWrap))
}

#' @title home tab - server
#' @description server for the display of the chart tab
#' @title Server for chart module, designed to be re-used for each chart generated.
#'
#' @param input Input objects from module namespace
#' @param output Output objects from module namespace
#' @param session An environment that can be used to access information and functionality relating to the session
#' @param chart list containing a safetyGraphics chart object. see custom chart vignette for details.
#' @param chart list containing a safetyGraphics chart object like those returned by \link{makeChartConfig}.
#' @param data named list of current data sets (Reactive).
#' @param mapping tibble capturing the current data mappings (Reactive).
#'
Expand Down
6 changes: 2 additions & 4 deletions R/mod_filterTab.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#' @title filterTabUI
#' @description UI that facilitates the filtering data with datamods::filter_data_ui
#' @title UI for the filter module in datamods::filter_data_ui
#'
#' @param id module id
#'
Expand Down Expand Up @@ -39,8 +38,7 @@ filterTabUI <- function(id){
}


#' @title filter module server
#' @description server function that facilitates the data filtering with the datamods::filter_data_server module
#' @title Server for the filter module in datamods::filter_data_ui
#'
#' @param input Shiny input object
#' @param output Shiny output object
Expand Down
3 changes: 1 addition & 2 deletions R/mod_filterTabChecks.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#' @title filter module checks
#' @description function that checks whether the current data and settings are appropriate for the filter tab
#' @title Checks for whether the current data and settings support a filter tab
#'
#' @param domainData list of data files for each domain
#' @param filterDomain domain to use for filtering (typically "dm")
Expand Down
6 changes: 2 additions & 4 deletions R/mod_homeTab.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#' @title Home Tab
#' @description Home Tab - sub-module showing details for the data loaded in the app - UI
#' @title UI for the home module
#'
#' @param id module id
#'
Expand All @@ -13,8 +12,7 @@ homeTabUI <- function(id){
)
}

#' @title home tab - server
#' @description server for the display of the home tab
#' @title Server for the filter module in datamods::filter_data_ui
#'
#' @param input mod input
#' @param output mod output
Expand Down
13 changes: 6 additions & 7 deletions R/mod_loadCharts.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#' @title loadChartsUI
#' @description UI that helps users pick charts
#' @title UI for the chart loading module used in safetyGraphicsInit()
#'
#' @param id module id
#' @param charts list of charts
#' @param charts list containing chart specifications like those returned by \link{makeChartConfig}.
#'
#' @importFrom purrr keep
#' @importFrom sortable bucket_list add_rank_list
Expand All @@ -21,15 +20,15 @@ loadChartsUI <- function(id, charts=makeChartConfig()){
)
}

#' @title loadCharts
#' @description server that facilitates selection of charts for safetyGraphicsApp
#' @title Server for the chart loading module used in safetyGraphicsInit()
#'
#' @param input Shiny input object
#' @param output Shiny output object
#' @param session Shiny session object
#' @param charts Initial list of charts

#' @param charts list containing chart specifications like those returned by \link{makeChartConfig}.
#'
#' @export

loadCharts <- function(input, output, session, charts=makeChartConfig()) {
ns<-session$ns
labels<-charts%>%map(~makeChartSummary(.x,showLinks=FALSE,class="chart-sortable"))
Expand Down
6 changes: 2 additions & 4 deletions R/mod_loadData.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#' @title loadDataUI
#' @description UI that facilitates the mapping of a column data domain
#' @title UI for the data loading module used in safetyGraphicsInit()
#'
#' @param id module id
#' @param domain character vector with domains to be loaded
Expand All @@ -19,8 +18,7 @@ loadDataUI <- function(id, domain=NULL){
)
}

#' @title loadDataServer
#' @description UI that facilitates the mapping of a column data domain
#' @title Server for the data loading module used in safetyGraphicsInit()
#'
#' @param domain data domain to be loaded
#' @param input Shiny input object
Expand Down
6 changes: 2 additions & 4 deletions R/mod_mappingColumn.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#' @title mappingColumnUI
#' @description UI that facilitates the mapping of a column data domain
#' @title UI that facilitates the mapping of a column data (and any associated fields)
#'
#' @param id module id
#' @param meta metadata for the column (and related fields)
Expand Down Expand Up @@ -66,8 +65,7 @@ mappingColumnUI <- function(id, meta, data, mapping=NULL){
col_ui
}

#' @title mappingColumn
#' @description server function that facilitates the mapping of a single data element (column of field) with a simple select UI
#' @title Server that facilitates the mapping of a column data (and any associated fields)
#'
#' @param input Shiny input object
#' @param output Shiny output object
Expand Down
6 changes: 2 additions & 4 deletions R/mod_mappingDomain.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#' @title mappingDomainUI
#' @description UI that facilitates the mapping of a full data domain
#' @title UI that facilitates the mapping of a full data domain
#'
#' @param id module id
#' @param meta metadata for the domain
Expand Down Expand Up @@ -37,8 +36,7 @@ mappingDomainUI <- function(id, meta, data, mapping=NULL){
}


#' @title mappingDomain
#' @description server function that facilitates the mapping of a single data domain
#' @title Server that facilitates the mapping of a full data domain
#'
#' @param input Shiny input object
#' @param output Shiny output object
Expand Down
7 changes: 2 additions & 5 deletions R/mod_mappingSelect.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#' Mapping Select UI
#' @title UI that facilitates the mapping of a single data element (column or field) with a simple select UI
#'
#' UI that facilitates the mapping of a single data element (column or field) with a simple select UI
#'
#' @param id unique id for the UI
#' @param label label associated with the control
#' @param choices a list of options for the control
Expand Down Expand Up @@ -33,8 +31,7 @@ mappingSelectUI <- function(id, label, choices=NULL, default=NULL){
)
}

#' @title mappingSelect
#' @description server function that facilitates the mapping of a single data element (column of field) with a simple select UI
#' @title Server that facilitates the mapping of a single data element (column or field) with a simple select UI
#'
#' @param input Shiny input object
#' @param output Shiny output object
Expand Down
6 changes: 2 additions & 4 deletions R/mod_mappingTab.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#' @title mappingTabUI
#' @description UI that facilitates the mapping of all data domain
#' @title UI for mapping tab covering of all data domains
#'
#' @param id module id
#' @param meta metadata for all domains
Expand Down Expand Up @@ -68,8 +67,7 @@ mappingTabUI <- function(id, meta, domainData, mappings=NULL, standards=NULL){
}


#' @title mapping module server
#' @description server function that facilitates the mapping of a single data domain
#' @title Server for mapping tab covering of all data domains
#'
#' @param input Shiny input object
#' @param output Shiny output object
Expand Down
2 changes: 1 addition & 1 deletion R/mod_safetyGraphicsServer.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Server for the default safetyGraphics shiny app
#' Server for core safetyGraphics app including Home, Mapping, Filter, Charts and Settings modules.
#'
#' This function returns a server function suitable for use in shiny::runApp()
#'
Expand Down
3 changes: 2 additions & 1 deletion R/mod_safetyGraphicsUI.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#' UI for the default safetyGraphics shiny app
#' UI for the core safetyGraphics app including Home, Mapping, Filter, Charts and Settings modules.
#'
#'
#' @param id module ID
#' @param meta data frame containing the metadata for use in the app. See the preloaded file (\code{?safetyGraphics::meta}) for more data specifications and details. Defaults to \code{safetyGraphics::meta}.
Expand Down
6 changes: 2 additions & 4 deletions R/mod_settingsCharts.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#' @title Settings Module - chart details
#' @description Settings Module - sub-module showing details for the charts loaded in the app - UI
#' @title UI for settings tab showing details for the charts loaded in the app
#'
#' @param id module id
#'
Expand All @@ -23,8 +22,7 @@ settingsChartsUI <- function(id){
)
}

#' @title Settings Module - charts details - server
#' @description server for the display of the charts
#' @title Server for settings tab showing details for the charts loaded in the app
#'
#' @param input Shiny input object
#' @param output Shiny output object
Expand Down
8 changes: 4 additions & 4 deletions R/mod_settingsCode.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#' UI for the settings page
#'
#' @title UI for settings tab providing code to re-start the app with current data/settings
#'
#' @param id module ID
#'
#' @export
Expand Down Expand Up @@ -92,8 +92,8 @@ settingsCodeUI <- function(id){

}

#' @title Server for the setting code page
#'
#' @title Server for settings tab providing code to re-start the app with current data/settings
#'
#' @param input Shiny input object
#' @param output Shiny output object
#' @param session Shiny session object
Expand Down
6 changes: 2 additions & 4 deletions R/mod_settingsData.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#' @title Settings Module - data details
#' @description Settings Module - sub-module showing details for the data loaded in the app - UI
#' @title UI for settings tab showing current data
#'
#' @param id module id
#'
Expand All @@ -20,8 +19,7 @@ settingsDataUI <- function(id){
)
}

#' @title Settings Module - data details - server
#' @description server for the display of the loaded data
#' @title Server for settings tab showing current data
#'
#' @param input Shiny input object
#' @param output Shiny output object
Expand Down
8 changes: 3 additions & 5 deletions R/mod_settingsMapping.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#' @title Settings view of Metadata/Mapping - UI
#' @description UI that displays the data mapping metadata.
#'
#' @title UI for settings tab showing current mapping
#'
#' @param id module id
#'
#' @import rclipboard
Expand All @@ -19,8 +18,7 @@ settingsMappingUI <- function(id){
)
}

#' @title Settings view of Metadata/Mapping - server
#' @description server for the display of the data mapping metadata.
#' @title Server for settings tab showing current mapping
#'
#' @param input Shiny input object
#' @param output Shiny output object
Expand Down
4 changes: 2 additions & 2 deletions R/mod_settingsTab.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' UI for the settings page
#' @title UI for the settings tab
#'
#' @param id module ID
#'
Expand All @@ -16,7 +16,7 @@ settingsTabUI <- function(id){
}


#' @title Server for the setting page
#' @title Server for the setting page
#'
#' @param input Shiny input object
#' @param output Shiny output object
Expand Down
2 changes: 1 addition & 1 deletion R/safetyGraphicsApp.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Run the interactive safety graphics app
#' Run the core safetyGraphics App
#'
#' @param domainData named list of data.frames to be loaded in to the app. Sample AdAM data from the safetyData package used by default
#' @param meta data frame containing the metadata for use in the app. See the preloaded file (\code{?safetyGraphics::meta}) for more data specifications and details. Defaults to \code{safetyGraphics::meta}.
Expand Down
2 changes: 1 addition & 1 deletion R/safetyGraphicsInit.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Run the interactive safety graphics app
#' App to select charts, load data and then initialize the core safetyGraphics app
#'
#' @param charts chart object
#' @param delayTime time (in ms) between drawing app UI and starting server. Default set to 1000 (1 second), but could need to be higher on slow machine.
Expand Down
Loading