Clinical Timelines
Overview
Clinical Timelines is a JavaScript library that visualizes events over time via a faceted, interactive timeline chart.
While initially designed for use in clinical trial research, the library works with any longitudinal data of one record per event.
Clinical Timelines presents all timepoints and time intervals for each facet, e.g. for each participant in a clinical trial.
Users can drill down to individual timelines which pulls up a set of small multiples, each representing a single event type, and a detailed listing of that individual's data.
Click here to see a demo with clinical trial data as the input.
Usage
With a dataset that meets the default variable requirements, the renderer can be initialized with the following code:
d3.csv(
'https://raw.githubusercontent.com/RhoInc/viz-library/master/data/safetyData/ADTIMELINES.csv',
function(data) {
clinicalTimelines('body', settings).init(data);
}
);
Download the latest release, which supports anonymous AMD, CommonJS, and vanilla environments.
You can also load the library directly from jsDelivr:
Import into a webpage like so:
<script type = 'text/javascript' src = 'https://d3js.org/d3.v3.js'></script>
<script type = 'text/javascript' src = 'https://cdn.jsdelivr.net/npm/webcharts/build/webcharts.js'></script>
<script type = 'text/javascript' src = 'https://cdn.jsdelivr.net/npm/clinical-timelines/build/clinicalTimelines.js'></script>
Clinical Timelines is a modular library written with ECMAScript 2015 syntax (ES2015).
To import Clinical Timelines into an ES2015 application, import its only module (here, clinicalTimelines
):
import clinicalTimelines from "clinical-timelines";
And in Node:
var clinicalTimelines = require("clinical-timelines");
Links
More information is available in the project's wiki: