Skip to content

Data Guidelines

Spencer Childress edited this page Apr 27, 2018 · 13 revisions

The Safety Outlier Explorer is initialized with JSON data files that match the format created by d3.csv(). The chart expects an ADaM-esque data structure by default but can be customized to work with any dataset that contains one row per participant per time point per measure and includes the required columns specified below.

Default Chart

The following columns are expected in a data file used to create an instance of the safety outlier explorer. A sample chart using this configuration is found here.

Data Specification

Settings Variable Description Default Required?
id_col Unique Subject Identifier USUBJID Y
time_cols[0].value_col Visit Name VISIT Y
time_cols[0].order_col Visit Name (N) VISITNUM
time_cols[1].value_col Study Day of Visit DY
measure_col Name of Measure or Test TEST Y
value_col Result or Finding STRESN Y
unit_col Units STRESU
normal_col_low Normal Range Lower Limit STRNLO
normal_col_high Normal Range Upper Limit STRNHI
details[0].value_col Age AGE
details[1].value_col Sex SEX
details[2].value_col Race RACE

Settings

No customization is needed to initialize a chart when the data object contains all default variables above. Just pass an empty object ({}) for settings and initialize the chart like so: safetyOutlierExplorer('body', {}).init(data).

Customized Chart with Queries

The following data specs and chart settings can be used to create a chart with several custom filters, including Sex, Race and Query Status. A sample chart using this configuration is found here.

Data Specification

Settings Variable Description Default Required?
id_col Unique Subject Identifier USUBJID Y
time_cols[0].value_col Visit Name VISIT Y
time_cols[0].order_col Visit Name (N) VISITNUM
time_cols[1].value_col Study Day of Visit DY
measure_col Name of Measure or Test TEST Y
value_col Result or Finding STRESN Y
unit_col Units STRESU
normal_col_low Normal Range Lower Limit STRNLO
normal_col_high Normal Range Upper Limit STRNHI
details[0].value_col Age AGE
details[1].value_col Sex SEX
details[2].value_col Race RACE
filter Site ID SITEID Y
filter Treatment Arm ARM Y
filter Sex SEX Y
filter Race RACE Y
filter Query Flag ("Y" for yes) QUERYFL Y
custom_marks[0].tooltip Query Details QUERYDETAILS Y

Settings Object

{
     time_cols: [
        {
            value_col: 'VISIT',
            type: 'ordinal',
            label: 'Visit',
            rotate_tick_labels: true,
            vertical_space: 100,
            order_col: 'VISITNUM'
        },
        {
            value_col: 'DY',
            type: 'linear',
            label: 'Study Day',
            rotate_tick_labels: false,
            vertical_space: 0
        }
    ],
    filters: [
        {value_col: 'ARM', label: 'Arm'},
        {value_col: 'SITEID', label: 'Site ID'},
        {value_col: 'SEX', label: 'Sex'},
        {value_col: 'RACE', label: 'Race'},
        {value_col: 'QUERYFL', label: 'Open Query?'}
    ],
    details: [
        {value_col: 'ARM', label: 'Arm'},
        {value_col: 'AGE', label: 'Age'},
        {value_col: 'SEX', label: 'Sex'},
        {value_col: 'RACE', label: 'Race'}
    ],
    custom_marks: [
        {
            per: ['USUBJID', 'VISIT', 'STRESN'],
            type: 'circle',
            attributes: {
                'fill-opacity': 1,
                'stroke': 'red',
                'fill': 'red'
            },
            values: {
                QUERYFL: ['Y']
            },
            tooltip: 'Query Details: [QUERYDETAILS]'
        }
    ],
    multiples_sizing: {
        width: 250,
        height: 75
    }
}
Clone this wiki locally