I found here ‘’‘python - Plotly error with dropdown menu to display all values - Stack Overflow’‘’, how to plot px.histograms for several contries which can be selected in the dropdown button in which i can scroll down and find the country I want.
I am wondering, is there any way to search and select the name of the country instead of scroll down in the dropdown button ?
I think, that this can be done with ipywidgets/jupyter or with Dash, but what about for the current format of the figure (.html) ?
Hi @alex1000 !
I would suggest to use Dash, the dropdown can use search text and is more customisable
You can even customize the text to find
But in Plotly figures, it seems you can use only custom button and dropdown, like you used and slider and range slider
Hey @Skiks I’m wondering if you might have a perspective - in a notebook context - of when/where use of ipywidgets might be “best” and when/where (jupyter)dash might be “best” … where overlap is / etc … there’s obviously lots of options in a notebook for simpler dashboards/EDA/etc workflows … and Dash admittedly is differentiated when you want to do more sophisticated web apps and ipywidgets gets a lot of downloads … so keen to provide best steer when the topic comes up on my end.
Hi @DaveG !
To be honest, I’m not a huge fan of notebooks, I fell like kind of claustrophobic in their little cells
Joke aside, I quickly learnt how to use Jupyter notebooks as it is a popular tool, and as I expected, I think it is more for educational purposes, to show, explain, teach or quick snippets testing, typically EDA, but I find notebooks too restrictives.
That being said, if I must compare ipywidgets vs jupyter_dash:
- Easier to use
- Provide quickly controls to add interactivity
- Limited customization, styling
In conclusion I would say that ipywidgets is a better match to notebooks, to quickly and easily try codes and show simple demos adding interactivity.
On the other hand, jupyter_dash offers the possibility to use Dash in notebooks, always nice to have the choice, but I think it is not the purpose of notebooks to have nice styled customized outputs with complex interactivity.
If the goal is the latter, and using a notebook is not a constrain, I think it is better to break the cells and unleash all the power of Dash !
@Skiks excellent … thx for this … it affirms my thinking but wanted another perspective from someone who actually has used the two