I am currently building an interactive gmap of renewable energy projects with dropdowns etc that update the map with different types of data. The next major hurdle is adding a dateTIME slider that will change data displayed on the plot (i’m dealing with hourly data over several years). I’ve seen many examples working with years/months as strings/integers but almost nothing related to datetime - example being update the plot to show 2019-12-01 16:00:00 to 2020-03-19 10:00:00.
If anyone has cracked datetime driven updates of a plot, or map, please share. I’m hoping this will make a showcase of Bokeh and its potential for the renewables industry.
@sesoko88 there is not a dedicated widget for this, only for date values. However, I think it can be accomplished:
The underlying units of datetime in Bokeh are “milliseconds since epoch” so you would create a regular Slider with start, end etc configured in milliseconds.
Sliders can accept a TickFormatter as their format, so you can use a DatetimeTickFormatter to display the slider values as formatted datetimes instead of milliseconds.
Thank you @Bryan and @Josu_Catalina for your suggestions, hoping to find time in the next couple of weeks to give these a go. Perhaps other users also have different approaches they’ll share as it would help to gather some dateTIME documentation/examples for Bokeh - especially considering the capabilities of datashader as this is golden for large timeseries datasets.
I only discovered Bokeh a couple of months ago and wish I had sooner!