-
Notifications
You must be signed in to change notification settings - Fork 1
Data Guidelines
Safety Shift Plot 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.
The following columns are expected in a data file used to create an instance of the safety Shift Plot. A sample chart using this configuration is found here.
Settings Variable | Variable | Default | Required? |
---|---|---|---|
id_col | Participant ID | USUBJID | Y |
time_col | Time variable | VISITN | Y |
measure_col | Measure | TEST | Y |
value_col | Value | STRESN | Y |
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: safetyShiftPlot('body', {}).init(data)
.
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.
Settings Variable | Variable | Default | Required? |
---|---|---|---|
id_col | Participant ID | USUBJID | Y |
time_col | Time variable | VISITN | Y |
measure_col | Measure | TEST | Y |
value_col | Value | STRESN | Y |
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 |
const settings =
{time_col: 'VISIT'
,x_params: {visits: ['Screening'], stat: 'min'}
,y_params: {visits: ['End of Study'], stat: 'max'}
,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?'}]
};