Open philippjfr opened 7 years ago
Previously we've used the Jupyter Dashboards notebook extension to do such layout, so that each group of widgets can control some different region of the page (one set of widgets above one plot, another above a different one, another as a bunch of global settings, etc.). This works well in both notebook and dashboard form, because the widgets can then be associated with the particular cell they apply to in the notebook, and then the whole set of plots and widgets can be assembled into a dashboard whose layout is controlled by the notebook extension, not the code in the notebook.
Here, it sounds like you are proposing laying out the entire thing within one notebook cell, or at least doing complicated layouts within that cell, and possibly then combining the result of several such cells into an overall dashboard using the notebook extension. That capability would certainly be useful, but we should try to be very clear about how we are expecting it to be used, and what it is not expected to do, to avoid having to solve general layout issues of the sort that Bokeh's kiwi addresses.
This notebook from the Shaolin project discusses related ideas. I was able to run it using the datashader examples environment then conda installing networkx, pip installing 'planarity', git cloning the shaolin repo, and doing python setup.py develop
inside that repo.
Some highlights of possible changes to ParamNB that might be related to what's in Shaolin:
+
operator, like: Widgets() + cols(Widgets()+Widgets(),1)
(though cols
isn't even yet available for hv, just proposed)[]
or .attribute access by parameter name.)I have removed the non crucial dependencies used for the shaolin examples. Now it only need pandas, numpy and ipywidgets.
Now it should be also possible to install it using pip install shaolin.
Later today I will upload an example of how it can be used with datashader if you are interested.
Often you want to group widgets together and lay the widget boxes out. This be best encapsulated as multiple parameterized classes. It would be great if paramnb.Widgets accepted a list of parameterized classes/instances and provided some options for specifying layout of the corresponding widget boxes and display parameters.