UpSet.js has a basic support for classical Venn diagrams for up to five sets.
from ipywidgets import interact
from upsetjs_jupyter_widget import UpSetJSVennDiagramWidget, UpSetJSEulerDiagramWidget
import pandas as pd
This wrapper is implemented in Python 3 with mypy typings and generics. The generic type T
of the UpSetJSVennDiagramWidget
is type of element that we wanna handle. In the following example we handle str
elements.
w = UpSetJSVennDiagramWidget[str]()
e = UpSetJSEulerDiagramWidget[str]()
dict_input = dict(one = ['a', 'b', 'c', 'e', 'g', 'h', 'k', 'l', 'm'], two = ['a', 'b', 'd', 'e', 'j'], three = ['a', 'e', 'f', 'g', 'h', 'i', 'j', 'l', 'm'])
w.from_dict(dict_input)
dict_input5 = dict(one = ['a', 'b', 'c', 'e', 'g', 'h', 'k', 'l', 'm'], two = ['a', 'b', 'd', 'e', 'j'],
three = ['a', 'e', 'f', 'g', 'h', 'i', 'j', 'l', 'm'],
four = ['a', 'e', 'f', 'g', 'h', 'i', 'j', 'l', 'm'],
five = ['a', 'e', 'f', 'g', 'h', 'i', 'j', 'l', 'm'])
w.copy().from_dict(dict_input5)
e.from_dict(dict_input)
see UpSetSJWidget
see UpsetJSWidget
see UpSetJSWidget
see UpSetJSWidget
see UpSetJSWidget