safetyGraphics Shiny App - User Guide

Jeremy Wildfire



The safetyGraphics Shiny app provides an easy-to-use point-and-click interface to create shareable safety graphics for any study. You can run the app in your local R session using the code below, or visit a hosted version here.

#Code to initialize shiny application

Typical Workflow

After opening the app, you will typically follow the workflow below. In short, you will load data (once), tweak settings and view charts (maybe more than once), and then export a snapshot of the charts for other users.

This workflow lines up with the items in the toolbar for the App.

More information about each step in the process is shown below.

Load Data

When you open the app, you are taken to the Data Tab with “Data Upload” and “Data Preview” panels. The preview for the pre-loaded “Example data” dataset is shown by default.

To load your own data, simply click the browse button and select a .csv or .sas7bdat data set. Once the file is loaded, select it in the list at the bottom of the “Data Upload Panel”. Once selected, the “Data Preview” panel will update automatically (along with the Settings and Chart tabs).

The charts in the safetyGraphics app are specifically designed for clinical trial safety monitoring, and require laboratory datasets that contain one row per participant per time point per measure. Data mappings for two common CDISC data standards - SDTM and ADaM - are pre-loaded in the application. As described below, the app can automatically generate charts for data sets using these standards; other data sets require some user configuration.

Update Settings

After loading your data, navigate to the Settings tab to customize the behavior of the charts. This tab includes panels for different types of chart settings. For example, the “Data Mapping” panel (shown below for the “Example Data” ADaM data set) can be used to specify the column that contains the unique subject ID, and on the more general “Appearance Settings” panel, there is an option to specify a warning message to be displayed when the chart loads. You can hover the mouse over any setting label to get more details.

When possible, items on the settings tab are pre-populated based on the data standard of the selected data set. See the Case Studies below for more details regarding working with non-standard data and adding customizations to the charts.

View Chart

Once the settings configuration is complete and a green check is shown in the navigation bar, navigate to the chart tab to view the chart. The chart tab updates automatically when settings are changed or new data is loaded. More details about chart functionality will be documented in separate vignettes.