1. Learn
  2. /
  3. Courses
  4. /
  5. Interactive Data Visualization with Bokeh

Connected

Exercise

Adding a HoverTool

The agency is producing a blog about basketball performance by position. They want to hone in on assists and steals, giving their viewers the ability to hover over glyphs to find out who a player is, what position they play, and which team they play for.

You will convert the nba dataset, which has been preloaded, into a Bokeh source object, then add tooltips to a plot.

Instructions

100 XP
  • Import ColumnDataSource.
  • Create source from the nba DataFrame.
  • Complete the creation of TOOLTIPS, adding labels named "Position" and "Team", in that order, from the relevant columns of source, and add TOOLTIPS to the figure.
  • Add circle glyphs for "assists" on the x-axis and "steals" on the y-axis, completing the source argument.