Using the functionality in pyviz, it's easy to generate an hvplot
/panel
interactive dashboard for a gridded xarray dataset, like this air temperature data example:
import xarray as xr
import hvplot.xarray
import panel as pn
airtemps = xr.tutorial.load_dataset('air_temperature')
atemp = airtemps.air[:10,:,:]
mesh = atemp.hvplot(groupby='time')
row = pn.Row(mesh)
display(row)
which automatically creates a slider for the time dimension:
If I take a look at the object created:
print(row)
I can see that a DiscreteSlider
widget was created:
Row
[0] Row
[0] HoloViews(DynamicMap)
[1] WidgetBox
[0] DiscreteSlider(name='Time', options=OrderedDict([('2013-01-01 ...]), value=numpy.datetime64('2013-01-...)
What is the best way to replace the DiscreteSlider
widget with a drop down menu Select
widget?