Upset2
UpSet - Visualizing Intersecting Sets
Install / Use
/learn @visdesignlab/Upset2README
UpSet 2.0 – Visualizing Intersecting Sets
UpSet 2 is deployed at https://upset.multinet.app/.
Documentation for UpSet 2 is deployed at https://vdl.sci.utah.edu/upset2/.
About
UpSet is an interactive, web based visualization technique designed to analyze set-based data. UpSet visualizes both, set intersections and their properties, and the items (elements) in the dataset.
Please see the https://upset.app for more info about UpSet.
This version is a re-implementation using modern web technologies of the original UpSet.
UpSet 2 is described in this short poster:
Kiran Gadhave, Hendrik Strobelt, Nils Gehlenborg, Alexander Lex
UpSet 2: From Prototype to Tool
Proceedings of the IEEE Information Visualization Conference – Posters (InfoVis ’19), 2019.
UpSet 2 is based on the original UpSet, which was first described in this paper:
Alexander Lex, Nils Gehlenborg, Hendrik Strobelt, Romain Vuillemot, Hanspeter Pfister
UpSet: Visualization of Intersecting Sets
IEEE Transactions on Visualization and Computer Graphics (InfoVis), 20(12): 1983--1992, doi:10.1109/TVCG.2014.2346248, 2014.
UpSet 2.0 as a React Component
UpSet 2.0 can be imported (along with all peer dependencies) as a React component using:
npm install @visdesignlab/upset2-react @mui/material@^7.0.0 @mui/system@^7.0.0 @mui/icons-material@^7.0.0 @mui/x-data-grid@^8.0.0 @emotion/react@^11.0.0 @emotion/styled@^11.0.0 recoil@^0.5.0 @trrack/core@^1.3.0-beta.1 @trrack/vis-react@^1.3.0 vega@^5.32.0 vega-lite@^5.2.0 vega-embed@^7.0.2 react-vega@^8.0.0
Note that UpSet 2.0 requires a react version of 18.0 or higher.
Import the component using import { Upset } from @visdesignlab/upset2-react in your react component.
UpSet 2.0 Data
Data structure
The raw data structure for UpSet should be a list of set membership objects.
Raw Data
The data object should be an array of objects. Each object should contain all the set membership boolean values as well as any attributes.
This data example shows only two characters from the Simpsons.
const rawData = [
{
"id": 0,
"Name": "Homer",
"School": false,
"Blue Hair": false,
"Duff Fan": true,
"Evil": false,
"Male": true,
"Power Plant": true,
"Age": 40
},
{
"id": 1,
"Name": "Marge",
"School": false,
"Blue Hair": true,
"Duff Fan": false,
"Evil": false,
"Male": false,
"Power Plant": false,
"Age": 36
},
]
The data and/or attributes objects can be JSON strings or traditional JS objects.
Loading Data into the UpSet 2.0 component
Loading Raw Data
Data uploaded to UpSet must follow the UpSet 2.0 Data Structure. Simply pass the data object to the Upset component in the data field.
The example below is a simple usecase for loading raw data into UpSet 2.0.
const main = () => {
const rawData = [
{
"id": 0,
"Name": "Homer",
"School": false,
"Blue Hair": false,
"Duff Fan": true,
"Evil": false,
"Male": true,
"Power Plant": true,
"Age": 40
},
{
"id": 1,
"Name": "Marge",
"School": false,
"Blue Hair": true,
"Duff Fan": false,
"Evil": false,
"Male": false,
"Power Plant": false,
"Age": 36
},
];
return <Upset data={rawData} />;
}
Pre-Processing Data
If you want to pre-process your data to gain access to the data objects generated and use by UpSet, or are having issues with the raw data loading, you must use the process function from UpSet 2.0 Core. First, import process from @visdesignlab/upset2-react. Then, before loading rendering the UpSet 2.0 component, call the process function, which takes the data and annotations objects as arguments.
The data object should be the same as raw data defined in Data Structure.
The annotations object should be an object with a nested object field columns. This field is a mapping of the column name to the column's data type. The columns field should contain an entry for each possible column in the data, as well as the type for each column.
The entry corresponding to the column which is the name of the item should be of type label. This will be used to generate ids and name the subsets. Note: There should only be one label column. Any entry for a set membership column should be a boolean type. Finally, any entry for an attribute column should be a number type.
In the example below, the item name is Name, noted by the label type. The sets are School, Blue Hair, Duff Fan, Evil, Male, and Power Plant. The only attribute in this dataset is Age, which is a number. This is clear in the annotations object, which denotes this.
const annotations = {
"columns": {
"Name": "label",
"School": "boolean",
"Blue Hair": "boolean",
"Duff Fan": "boolean",
"Evil": "boolean",
"Male": "boolean",
"Power Plant": "boolean",
"Age": "number"
}
}
The example below details a simple usecase of the process function.
import { Upset } from '@visdesignlab/upset2-react';
import { process } from '@visdesignlab/upset2-core';
const main = () => {
const rawData = [
{
"id": 0,
"Name": "Homer",
"School": false,
"Blue Hair": false,
"Duff Fan": true,
"Evil": false,
"Male": true,
"Power Plant": true,
"Age": 40
},
{
"id": 1,
"Name": "Marge",
"School": false,
"Blue Hair": true,
"Duff Fan": false,
"Evil": false,
"Male": false,
"Power Plant": false,
"Age": 36
},
];
const annotations = {
columns: {
"Name": "label",
"School": "boolean",
"Blue Hair": "boolean",
"Duff Fan": "boolean",
"Evil": "boolean",
"Male": "boolean",
"Power Plant": "boolean",
"Age": "number"
}
};
const processedData = process(rawData, annotations);
return <Upset data={processedData} />;
}
UpSet 2.0 component options
All options
data: The data for the Upset component. See UpSet 2.0 Data for more information.config(optional): The configuration options for the Upset component. This can be partial. See Configuration Options for more details.visibleDatasetAttributes(optional)(string[]): List of attribute names (strings) which should be visualized. Defaults to the first 3 if no value is provided. If an empty list is provided, displays no attributes.visualizeUpsetAttributes(optional)(boolean): Whether or not to visualize UpSet generated attributes (degreeanddeviation). Defaults tofalse.allowAttributeRemoval(optional)(boolean): Whether or not to allow the user to remove attribute columns. This should be enabled only if there is an option within the parent application which allows for attributes to be added after removal. Default attribute removal behavior in UpSet 2.0 is done via context menu on attribute headers. Defaults tofalse.canEditPlotInformation(optional)(boolean): Whether or not the user can edit the plot information in the text descriptions sidebar.hideSettings(optional)(boolean): Hide the aggregations/filter settings sidebar.parentHasHeight(optional)(boolean): Indicates if the parent component has a fixed height. If this is set tofalse, the plot will occupy the full viewport height. When set totrue, the plot will fit entirely within the parent component. Defaults tofalse.extProvenance(optional): External provenance actions and TrrackJS object for provenance history tracking and actions. This should only be used if your tool is using TrrackJS and the Trrack object you provide has all the actions used by UpSet 2.0. Provenance is still tracked if nothing is provided. See App.tsx to see how UpSet 2.0 and Multinet use an external Trrack object. Note that initializeProvenanceTracking and getActions are used to ensure that the provided provenance object is compatible. The provided provenance object must have a type compatible with the extProvenance UpSet 2.0 prop type.provVis(optional): Sidebar options for the provenance visualization sidebar. See Trrack-Vis for more information about Trrack provenance visualization.elementSidebar(optional): Sidebar options for the element visualization sidebar. This sidebar is used for element queries, element selection datatable, and supplemental plot generation.altTextSidebar(optional): Sidebar options for the text description sidebar. This sidebar is used to display the generated text descriptions for an Upset 2.0 plot, given that thegenerateAltTextfunction is provided.footerHeight(optional)(number): Height of the footer overlayed on the upset plot, in px, if one exists. Used to prevent the bottom of the sidebars from overlapping with the footer.generateAltText(optional)(() => Promise<AltText>): Async function which should return a generate
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
