心烦意乱.js是UpSetR的重新实现,为三个以上的集合创建交互式集合可视化

upsetjs-jupyter-widget的Python项目详细描述


在心烦意乱.jsJupyter小工具

NPM PackageGithub ActionsOpen in NBViewerOpen in BinderOpen API DocsOpen Example

围绕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

upset_from_dict

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

upset_from_dataframe

它支持ipywidget交互方法来获得有关用户输入的通知

defselection_changed(s):returns.nameifselseNoneinteract(selection_changed,s=w)

另请参见introduction.ipynb

另请参见Open in NBViewerOpen in Binder

文件

包文档位于Open API Docs。Jupyter笔记本的介绍在Open Example。在

维恩图

除了主管道心烦意乱.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

image

另请参见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

image

另请参见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版本发布,用于私人和学术目的。如果是商业用途,请联系商业许可证。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java不兼容类型:MainActivity无法转换为LifecycleOwner   java安卓是一种更有效的读取大文本文件的方法   java导出LWJGL本地人与项目?(IntelliJ IDEA)   JDK更新后,JavaJShell不再在下一行打印输出   父类对象上的继承Java比较子属性   Java:有没有一个容器可以有效地结合HashMap和ArrayList?   安卓 Java对象指针   java在annotationdriven Spring MVC应用程序中实现大气   java 安卓源代码构建应用找不到安卓supportv4。罐子   文件系统上的抽象层和Java中的jar/zip   java在水平滚动视图中添加多个图像?   java如何从firebase实时数据库中获取字符串数组   WIndows 10工作站上的java未满足链接错误   java命令在终端中工作,但在使用过程中出现“无结束引号”错误。执行官