# safety-outlier-explorer

> Chart showing participant trajectories of lab measures, vital signs and other related measures in clinical trials.

Latest version **2.7.0** (published 2021-06-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install safety-outlier-explorer
pnpm add safety-outlier-explorer
yarn add safety-outlier-explorer
bun add safety-outlier-explorer
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.7.0 |
| Published | 2021-06-01 |
| First published | 2016-06-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 232 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Rho, Inc. |
| Maintainers | pburnsdata, rhographics, samussiah, jwildfire |

## Links

- npm: https://www.npmjs.com/package/safety-outlier-explorer
- npm.io page: https://npm.io/package/safety-outlier-explorer

## Dependencies (2)

- [d3](https://npm.io/package/d3.md) ^3
- [webcharts](https://npm.io/package/webcharts.md) ^1.11.6

## Recent versions

- 2.7.0 (latest) — 2021-06-01
- 2.6.1 — 2020-01-31
- 2.6.0 — 2019-08-22
- 2.5.5 — 2019-08-19
- 2.5.4 — 2019-05-20
- 2.5.3 — 2019-04-09
- 2.5.2 — 2019-03-28
- 2.5.0 — 2019-03-05
- 2.4.0 — 2018-10-29
- 2.3.0 — 2018-04-27
- 2.2.3 — 2018-03-09
- 2.2.2 — 2018-02-21
- 2.2.1 — 2018-02-02
- 2.1.1 — 2017-12-05
- 2.1.0 — 2017-12-05
- … 6 more at https://npm.io/package/safety-outlier-explorer/versions

## README

# Safety Outlier Explorer
![alt tag](https://user-images.githubusercontent.com/31038805/32173925-d40b050a-bd56-11e7-8750-1bc631296376.gif)

## Overview 
Safety Outlier Explorer is a JavaScript library built using Webcharts ([1](https://github.com/RhoInc/Webcharts), [2](https://github.com/RhoInc/webcharts-wrapper-boilerplate)) that allows users to view clinical outcomes such as lab results and vital signs over time and to identify values that fall outside of expected ranges. Clicking on a point or line generates a participant-level plot for each measure in the data:

![Example](https://github.com/RhoInc/safety-outlier-explorer/wiki/img/all-measures.PNG)

Users can view any outcome in the data and specify a linear (study day) or ordinal (study visit) x-axis; the full functionality is described [here](https://github.com/RhoInc/safety-outlier-explorer/wiki/Technical-Documentation).
The library expects an [ADaM-esque data structure](https://www.cdisc.org/system/files/members/standard/foundational/adam/analysis_data_model_v2.1.pdf) by default but can be customized to use any dataset that is one row per participant per timepoint per measure.
Full details about chart configuration are [here](https://github.com/RhoInc/safety-outlier-explorer/wiki/Configuration).

## Usage
The code to initialize the chart looks like this: 

```javascript

    d3.csv(
        'https://rawgit.com/RhoInc/viz-library/master/data/safetyData/ADBDS.csv',
        function(data) {
            safetyOutlierExplorer('body', {}).init(data);
        }
    );

```

The chart can be configured to facilitate non-standard data formats and to alter the chart itself. Overwrite the defaults with a custom settings object like so:

```javascript

    const settings = {
        time_cols: [
            {
                value_col: 'AVISIT',
                type: 'ordinal',
                label: 'Visit',
                rotate_tick_labels: true,
                vertical_space: 100
            },
            {
                value_col: 'ADY',
                type: 'linear',
                label: 'Study Day',
                rotate_tick_labels: false,
                vertical_space: 0
            }
        ],
        measure_col: 'PARAM',
        value_col: 'AVAL',
        normal_col_low: 'ANRLO',
        normal_col_high: 'ANRHI',
        filters: [
            {value_col: 'TRT01P', label: 'Treatment Group'},
            {value_col: 'SEX', label: 'Sex'},
            {value_col: 'RACE', label: 'Race'}
        ],
        details: [
            {value_col: 'AGE', label: 'Age'}
            {value_col: 'SEX', label: 'Sex'},
            {value_col: 'RACE', label: 'Race'},
            {value_col: 'TRT01P', label: 'Treatment Group'}
        ],
    };

    d3.csv(
        'ADBDS.csv',
        function(data) {
            safetyOutlierExplorer('body', settings).init(data);
        }
    );

```

## Links 
- [Interactive Example](https://rhoinc.github.io/safety-outlier-explorer/test-page/)
- [Configuration](https://github.com/RhoInc/safety-outlier-explorer/wiki/Configuration) 
- [API](https://github.com/RhoInc/safety-outlier-explorer/wiki/API)
- [Technical Documentations](https://github.com/RhoInc/safety-outlier-explorer/wiki/Technical-Documentation) 
- [Data Guidelines](https://github.com/RhoInc/safety-outlier-explorer/wiki/Data-Guidelines)

---
_Source: https://npm.io/package/safety-outlier-explorer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
