Exercise

Shooting guards versus small forwards

The sports media agency will be producing a blog comparing the importance of shooting guards and small forwards in points production. They have asked you to produce a scatter plot displaying points and assists per game for each of the two positions, using different glyph colors, sizes, and transparency.

The nba dataset has been filtered for "SG" and "SF", and preloaded for you as two Bokeh source objects called shooting_guards and small_forwards. A HoverTool has also been created to display "player", "team", and "field_goal_perc".

Instructions

100 XP
  • Add circle glyphs for points per game versus average assists using shooting_guards, setting size to 16 pixels, fill_color to red, and assigning 0.2 to the relevent keyword argument for glyph transparency.
  • Add circle glyphs to represent points versus average assists for small forwards, filled in green, 6 pixels in size, and with 0.6 glyph transparency.