心烦意乱.js是UpSetR的重新实现,为三个以上的集合创建交互式集合可视化
upsetjs-jupyter-widget的Python项目详细描述
在心烦意乱.jsJupyter小工具
围绕UpSet.js的Jupyter小部件库。在
此软件包是心烦意乱.js生态系统位于主Github Monorepo。在
安装
您可以使用pip
安装:
jupyter实验室1.2.x:
pip install ipywidgets==7.5.1 upsetjs_jupyter_widget # for notebooks jupyter nbextension enable --sys-prefix --py upsetjs_jupyter_widget # for lab jupyter labextension install @jupyter-widgets/jupyterlab-manager @upsetjs_jupyter_widget
jupyter实验室2.1.x:
^{pr2}$使用
fromipywidgetsimportinteractfromupsetjs_jupyter_widgetimportUpSetJSWidgetimportpandasaspd
w=UpSetJSWidget[str]()
w.from_dict(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
df=pd.DataFrame(dict(one=[1,1,1,0,1,0,1,1,0,0,1,1,1],two=[1,1,0,1,1,0,0,0,0,1,0,0,0],three=[1,0,0,0,1,1,1,1,1,1,0,1,1]),index=['a','b','c','d','e','f','g','h','i','j','k','l','m'])w.from_dataframe(df)w
它支持ipywidget
交互方法来获得有关用户输入的通知
defselection_changed(s):returns.nameifselseNoneinteract(selection_changed,s=w)
文件
维恩图
除了主管道心烦意乱.js还支持绘制多达五组的维恩图。在交互方面,它使用相同的输入格式和功能。在
fromupsetjs_jupyter_widgetimportUpSetJSVennDiagramWidgetv=UpSetJSVennDiagramWidget[str]()v.from_dict(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']))v
另请参见venn.ipynb
卡诺地图
除了主管道心烦意乱.js绘制卡诺地图的变体。它使用相同的输入格式,并且在交互方面具有相似的功能。在
fromupsetjs_jupyter_widgetimportUpSetJSKarnaughMapWidgetv=UpSetJSKarnaughMapWidget[str]()v.from_dict(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']))v
另请参见kmap.ipynb
开发环境
npm i -g yarn
yarn set version berry
yarn
yarn pnpify --sdk vscode
pipenv
pipenv shell
pip install -e .
jupyter nbextension install --sys-prefix --overwrite --py upsetjs_jupyter_widget
jupyter nbextension enable --sys-prefix --py upsetjs_jupyter_widget
jupyter labextension install @jupyter-widgets/jupyterlab-manager@3.0.0-alpha.0
jupyter labextension install .
命令
yarn test
yarn lint
yarn build !! within the pipenv
隐私政策
在心烦意乱.js是一个客户端专用库。库或其任何集成不会跟踪您或将您的数据传输到任何服务器。应用程序中上载的数据仅使用IndexedDB存储在浏览器中。Tableau扩展可以在禁止任何服务器请求的沙盒环境中运行。但是,一旦您将应用程序中的会话导出到外部服务(例如。,代码笔.io)你的数据将被传输。在
许可证/服务条款
商业许可证
如果你想用心烦意乱.js对于商业应用,商业许可证是适当的许可证。有关详细信息,请联系@sgratzl。在
开源许可证
该库以GNU AGPLv3
版本发布,用于私人和学术目的。如果是商业用途,请联系商业许可证。在
- 项目
标签: