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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Suggests:
Imports:
dplyr,
DT,
esquisse,
datamods,
htmlwidgets,
jsonlite,
listviewer,
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export(settingsData)
export(settingsDataUI)
export(settingsMapping)
export(settingsMappingUI)
import(datamods)
import(dplyr)
import(esquisse)
import(listviewer)
import(shiny)
import(yaml)
Expand Down
2 changes: 1 addition & 1 deletion R/app_ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ app_ui <- function(meta, domainData, mapping, standards){
app_css <- NULL
for(lib in .libPaths()){
if(is.null(app_css)){
css_path <- paste(lib,'safetyGraphics','safetyGraphics_app', 'www','index.css', sep="/")
css_path <- paste(lib,'safetyGraphics', 'www','index.css', sep="/")
if(file.exists(css_path)) app_css <- HTML(readLines(css_path))
}
}
Expand Down
6 changes: 6 additions & 0 deletions R/makeChartConfig.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ makeChartConfig <- function(dirs, sourceFiles=TRUE){
chart$order
) %>% as.numeric

chart$export <- ifelse(
is.null(chart$export),
true,
chart$export
)

return(chart)
})

Expand Down
27 changes: 13 additions & 14 deletions R/mod_filterTab.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#' @title filterTabUI
#' @description UI that facilitates the filtering data with esquisse::filterDF_UI
#' @description UI that facilitates the filtering data with datamods::filter_data_ui
#'
#' @param id module id
#' @param filterDomain data set for the domain
#'
#' @import esquisse
#' @import datamods
#' @importFrom shiny dataTableOutput
#'
#' @export
Expand All @@ -18,7 +18,7 @@ filterTabUI <- function(id, filterDomain = "dm"){
fluidRow(
column(
width = 3,
filterDF_UI(ns("filtering"))
filter_data_ui(ns("filtering"))
),
column(
width = 9,
Expand All @@ -41,7 +41,7 @@ filterTabUI <- function(id, filterDomain = "dm"){


#' @title filter module server
#' @description server function that facilitates the data filtering with the esquisse::filterDF module
#' @description server function that facilitates the data filtering with the datamods::filter_data_server module
#'
#' @param input Shiny input object
#' @param output Shiny output object
Expand All @@ -52,7 +52,7 @@ filterTabUI <- function(id, filterDomain = "dm"){
#'
#' @return filtered data set
#'
#' @import esquisse
#' @import datamods
#' @importFrom shinyWidgets progressBar updateProgressBar
#' @importFrom shiny renderDataTable
#'
Expand All @@ -62,26 +62,25 @@ filterTab <- function(input, output, session, domainData, filterDomain, id_col){

raw <- domainData[[filterDomain]]

res_filter <- callModule(
module = filterDF,
res_filter <- filter_data_server(
id = "filtering",
data_table = reactive({
data = reactive({
return(as.data.frame(raw))
}),
data_name = reactive({
name = reactive({
return(filterDomain)
})
)

observeEvent(res_filter$data_filtered(), {
observeEvent(res_filter$filtered(), {
updateProgressBar(
session = session, id = "pbar",
value = nrow(res_filter$data_filtered()), total = nrow(raw)
value = nrow(res_filter$filtered()), total = nrow(raw)
)
})

output$table <- DT::renderDataTable({
res_filter$data_filtered()
res_filter$filtered()
}, options = list(pageLength = 5))


Expand All @@ -93,12 +92,12 @@ filterTab <- function(input, output, session, domainData, filterDomain, id_col){
})

output$res_str <- renderPrint({
utils::str(res_filter$data_filtered())
utils::str(res_filter$filtered())
})

filteredDomains <- reactive({
#TODO add check to make sure id_col exists in all data sets.
current_ids <- unique(res_filter$data_filtered()[[id_col()]])
current_ids <- unique(res_filter$filtered()[[id_col()]])

filteredDomains = list()
id_col <- id_col()
Expand Down
5 changes: 2 additions & 3 deletions R/mod_reportsTab.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@ reportsTab <- function(input, output, session, charts, data, mapping){
# create checkbox for selecting charts of interest
output$checkboxes <- renderUI({
# no support for modules or broken widgets yet
noExport <- c("aeTimelines","hepexplorer","safetyShiftPlot","tplyr_shift")
chart_type <- charts %>% map(., ~.$type) %>% unlist
chart_name <- charts %>% map(., ~.$name) %>% unlist
charts_keep <- ((! chart_type == "module") & (! chart_name %in% noExport))
chart_export <- charts %>% map(., ~.$export) %>% unlist
charts_keep <- ((! chart_type == "module") & (chart_export))

charts_labels <- charts %>% map(., ~ .$label) %>% unlist
charts_vec <- names(charts)[charts_keep]
Expand Down
1 change: 0 additions & 1 deletion inst/config/mappings/aes.yaml

This file was deleted.

139 changes: 0 additions & 139 deletions inst/examples/custom_charts/custom_ggplot.R

This file was deleted.

14 changes: 0 additions & 14 deletions inst/examples/custom_charts/custom_module.R

This file was deleted.

Loading