safety-delta-delta
v1.0.0
Published
Chart for exploring changes over time across multiple measures in clinical trial safety data
Downloads
13
Readme
Safety Delta-Delta Plot
Overview
Safety Delta Delta is a JavaScript library built with Webcharts (1, 2) that creates an interactive scatter plot showing relationships over time for lab measures, vital signs, and other measures related to safety in clinical trials. Click the animation above to try out an interactive demo of the chart.
By default the chart expects SDTM-structured data, but can be configured for any dataset with one record per measurement. View full chart configuration details here.
In addition to standard groups and filters, users can also select time points and measurements to compare, and can click any participant to see all of thier lab values over time. See the documentation for all features here.
Typical Usage
In the simplest case, the chart can be created with a single line of code provided the input dataset meets the default requirements:
safetyDeltaDelta().init(data);
Alternatively, the chart can be configured for a different data standard, such as for ADaM in the example below:
const element = 'body'; // element in which to draw the chart
const settings = {
measure_col: 'PARAM',
value_col: 'AVAL',
id_col: 'USUBJID',
normal_col_low: 'ANRLO',
normal_col_high: 'ANRHI',
filters: [
{value_col: 'SEX' , label: 'Sex'},
{value_col: 'RACE' , label: 'Race'},
{value_col: 'ARM' , label: 'Arm'},
{value_col: 'AVISIT' , label: 'Visit'},
{value_col: 'SITE' , label: 'Site'},
],
}; // custom chart settings
d3.csv(
'https://raw.githubusercontent.com/RhoInc/data-library/master/data/clinical-trials/adam/advs.csv', // data file location
function(data) {
safetyDeltaDelta(element, settings).init(data);
}
);
Click here to open an interactive example.