Configuration tools

Interactive Data Visualization with Bokeh

George Boorman

Core Curriculum Manager, DataCamp

The default toolbar

  • PanTool
    • pan Pan
  • BoxZoomTool
    • box_zoom Box Zoom
  • WheelZoomTool
    • wheel_zoom Wheel Zoom
  • Save
    • save Save
  • Reset
    • reset Reset

default_toolbar

Interactive Data Visualization with Bokeh

Configuration tools

We will cover:

  • Pan/Drag tools

  • Click/Tap tools

  • Scroll/Pinch tools

 

Other tools outside of course scope:

  • Actions

  • Inspectors

  • Edit tools

1 http://docs.bokeh.org/en/latest/docs/user_guide/tools.html
Interactive Data Visualization with Bokeh

Pan/drag tools

  • PanTool

    • pan Pan
  • BoxSelectTool

    • box_select Box Select
  • BoxZoomTool

    • box_zoom Box Zoom
  • LassoSelectTool

    • lasso_select Lasso Select

Pan video

Lasso select

Interactive Data Visualization with Bokeh

Click/tap tools

 

  • PolySelectTool
    • poly_select PolySelect

 

 

  • TapTool
    • tap Tap

Poly Select Demo

 

Tap Demo

Interactive Data Visualization with Bokeh

Scroll/pinch tools

  • WheelZoomTool
    • wheel_zoom Wheel Zoom

 

 

  • WheelPanTool Wheel Pan
    • xwheel_pan
    • ywheel_pan

Wheel Zoom Demo

Interactive Data Visualization with Bokeh

Customizing the toolbar

from bokeh.models import BoxSelectTool

fig = figure(x_axis_label="Steals per Game", y_axis_label="Assists per Game") fig.circle(x=nba["steals"], y=nba["assists"])
fig.add_tools(BoxSelectTool())
output_file(filename="adding_box_select.html") show(fig)

Adding BoxSelect

Interactive Data Visualization with Bokeh

Custom list of tools

tools = ["lasso_select", "box_zoom", "tap"]

fig = figure(x_axis_label="Steals", y_axis_label="Assists",
tools=tools)
fig.circle(x=nba["steals"], y=nba["assists"]) output_file(filename="custom_tools.html") show(fig)

  Tools List

Interactive Data Visualization with Bokeh

Let's practice!

Interactive Data Visualization with Bokeh

Preparing Video For Download...