Enterprise Streamlined 'Shiny' Application Framework

An enterprise-targeted scalable and UI-standardized 'shiny' framework including a variety of developer convenience functions with the goal of both streamlining robust application development while assisting with creating a consistent user experience regardless of application or developer.



title: "Periscope Shiny Application Framework" output: html_document: self_contained: no

CRAN_Status_Badge CRAN_Downloads_Badge Travis-CI Build Status Coverage Status

periscope was originally developed as the core Shiny component for bioinformatics and systems biology analysis applications. It provides a predefined but flexible template for new Shiny applications with a default dashboard layout, three locations for user alerts, a nice busy indicator and logging features.

One of the most important features of the shiny applications created with this framework is the separation by file of functionality that exists in one of the three shiny scopes: global, server-global, and server-local. The framework forces application developers to consciously consider scoping in Shiny applications by making scoping distinctions very clear without interfering with normal application development. Scoping consideration is important for performance and scaling, which is critical when working with large datasets and/or across many users. In addition to providing a template application, the framework also contains a number of convenient modules: a (multi)file download button module and a downloadable table module for example.

periscope is available for installation from CRAN or you can install the latest version of periscope from GitHub as follows:

devtools::install_github('cb4ds/periscope')

Examples

These are included to get you started. You can either start with an empty application or an application that includes samples of the components that you can use within your application.


Empty application

library(periscope)
create_new_application('emptyapp', location = tempdir())
runApp('emptyapp')

Sample application

library(periscope)
create_new_application("sampleapp", location = tempdir(), sampleapp = TRUE)
runApp('sampleapp')
 

downloadFile module

# Inside ui_body.R or ui_sidebar.R
 
#single download type
downloadFileButton("object_id1", 
                   downloadtypes = c("csv"), 
                   hovertext = "Button 1 Tooltip")
 
#multiple download types
downloadFileButton("object_id2", 
                   downloadtypes = c("csv", "tsv"), 
                   hovertext = "Button 2 Tooltip")
                
# Inside server_local.R
 
#single download type
callModule(downloadFile, 
           "object_id1", 
           logger = ss_userAction.Log,
           filenameroot = "mydownload1",
           datafxns = list(csv = mydatafxn1))
 
#multiple download types
callModule(downloadFile, 
           "object_id2",
           logger = ss_userAction.Log,
           filenameroot = "mytype2",
           datafxns = list(csv = mydatafxn1, xlsx = mydatafxn2))   
                   

downloadableTable module

# Inside ui_body.R or ui_sidebar.R
 
downloadableTableUI("object_id1", 
                    downloadtypes = c("csv", "tsv"), 
                    hovertext = "Download the data here!",
                    contentHeight = "300px",
                    singleSelect = FALSE)
                    
# Inside server_local.R
 
selectedrows <- callModule(downloadableTable, 
                           "object_id1", 
                           logger = ss_userAction.Log,
                           filenameroot = "mydownload1",
                           downloaddatafxns = list(csv = mydatafxn1, tsv = mydatafxn2),
                           tabledata = mydatafxn3,
                           rownames = FALSE,
                           caption = "This is a great table!  By: Me" )

News

Revisions and Change Log

v0.4.2

  • Removed unused import httr
  • Documentation updates (grammatical, consistency)

v0.4.1

  • Initial CRAN release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("periscope")

0.4.3 by Constance Brett, 24 days ago


https://github.com/cb4ds/periscope.git, http://canvasxpress.org


Report a bug at https://github.com/cb4ds/periscope/issues


Browse source code at https://github.com/cran/periscope


Authors: Constance Brett [aut, cre] , Isaac Neuhaus [aut] (canvasXpress JavaScript Library Maintainer) , Ger Inberg [ctb] , Bristol-Meyers Squibb (BMS) [cph]


Documentation:   PDF Manual  


GPL-3 license


Imports shiny, shinydashboard, shinyBS, logging, lubridate, DT, openxlsx, ggplot2

Suggests knitr, rmarkdown, testthat


See at CRAN