控制Jupyter仪表板的多个单元的小部件 [英] Widget to control multiple cells for Jupyter Dashboard

查看:216
本文介绍了控制Jupyter仪表板的多个单元的小部件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一个jupyter仪表板,该仪表板将包含许多绘图和表格.理想情况下,所有图和表格都将同时更改为相同的小部件值.

I'm trying to build a jupyter dashboard which is going to contains many plots and tables. Ideally, all the plots and table will change accordingly to the same widget value at the same time.

我可以创建一个函数来处理所有绘图和表格的创建并显示它们,但是接下来我将限制布局,这是jupyter仪表板最适合的.

I can create a function that will handle the creation of all plot and tables and show them, but then I'll be limiting the layout which is what jupyter dashboard is great for.

def create_dashboard(x, y, z):
    # make first plot using x
    ...
    # make second plot using x, y
    ...
    # draw table from dataframe using x, y, z
    ...

interact(create_dashboard, x, y ,z)

这可能有效,但非常有限.另外,即使您不更改将修改输出的变量,也需要始终生成所有图和表格(很多).另外,所有内容都将在ipython单元中按顺序显示,而在创建仪表板时无法将它们四处移动.

This could work but it very limiting. Also, you'd need to generate all the time all plots and table (many many) even if you don't change the variable that will modify the output. Also, the all be shown sequentially in the ipython cell without the ability to move them around when creating the dashboard.

有没有办法在单个单元格中绘制plot using xplot using ytable using x, y, z,然后创建一个控件所有三个单元格的小部件?像

Is there any way to draw plot using x, plot using y and table using x, y, z in individual cells, and then create a widget that controls all the three cells? Something like

output[1]
# plot using x

output[2]
# plot using x, y

output[3]
# table from dataframe using x, y, z

output[4]
interact(x, y, z)
# show the widget only here

希望这很清楚.如果没有,我很乐意提供其他信息.

Hope this is clear. I'm happy to provide additional information if is not.

谢谢!

推荐答案

我会尝试使用Plotly for python https://plot.ly/python/create-online-dashboard/

I would give a try with Plotly for python https://plot.ly/python/create-online-dashboard/

让我们知道进展如何!

这篇关于控制Jupyter仪表板的多个单元的小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆