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

Connected

Exercise

Adding a Div

The hedge fund is looking for the next big thing in the online retail market. They have asked you to produce a plot visualizing Amazon's stock price performance over the last few years, highlighting the dates where the price was above average for the period.

A subset of the stocks dataset has been created for you, filtering for AMZN stocks, and stored as a Bokeh source object. You will build a line plot including a Div and a BoxAnnotation, displaying using layout.

Instructions

100 XP
  • Import layout and Div from the relevant Bokeh classes.
  • Add a title of "Amazon stock prices vs. average price over the period" to the layout.
  • Display the Bokeh layout containing the Div, followed by the figure underneath.