Published
Edited
Apr 29, 2020
UpSet Observable dataset chooser example
UpSet Observable Example
Insert cell
md`# UpSet Observable dataset chooser example`
Insert cell
md`this example uses the library to list the datasets from the original upset tool`
Insert cell
import {
listUpSet2Datasets,
datasetChooser,
setsFromDataset,
UpSetJSElement,
generateIntersections
} from '@sgratzl/upset-js'
Insert cell
datasets = listUpSet2Datasets()
Insert cell
viewof selectedDataset = datasetChooser(datasets)
Insert cell
ds = datasets[selectedDataset]
Insert cell
sets = setsFromDataset(ds)
Insert cell
intersections = generateIntersections(sets).sort(
(a, b) => b.cardinality - a.cardinality
)
Insert cell
viewof selection = UpSetJSElement(sets, intersections)
Insert cell
selection
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more