-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
54 lines (46 loc) · 1.27 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<meta charset="utf-8">
<head>
<script src="http://d3js.org/d3.v5.min.js" charset="utf-8"></script>
<script src="upset.js"></script>
<script src="formatData.js"></script>
</head>
<style>
body {
font: 15px Arial;
}
</style>
<body>
<div id="upsetPlot"></div>
<script>
const data = [
{
"name": "set1",
"values": ["a","b","c","d"]
},
{
"name": "set2",
"values": ["a","b","c","d", "e", "f"]
},
{
"name": "set3",
"values": ["a","b","g", "h", "i"]
},
{
"name": "set4",
"values": ["a","i", "j","c","d"]
}
];
// calculating intersections WITHOUT solo sets
const {intersections, soloSets} = formatIntersectionData(data);
// putting the solo sets in:
// to include solo sets with all its data, call this function
// const allData = insertSoloDataAll(intersections, soloSets);
// to include solo sets with only the values that ARE NOT in other sets
// ie. the outersect of values in the solo sets, call this function
const allData = insertSoloDataOutersect(intersections, soloSets);
// plot the upset plot
console.log(allData)
plotUpset(allData, soloSets, "upsetPlot")
</script>
</body>