Exercise

Automotive stocks analysis

The hedge fund has asked you to produce a scatter plot to help them understand the financial performance of two automotive companies: Ford and General Motors.

You will build a plot displaying the close price for each day against the market cap (price multiplied by volume) for the two companies. The fund would like to be able to customize the x-axis, giving you a great chance to implement RangeSlider.

Instructions

100 XP
  • Import RangeSlider.
  • Create slider with a title of "Stock Price", the start of 10, end of 47, value matching the start and end values inside parentheses, and a step of 1 for each interaction with the widget.
  • Link the slider's "value" to the start of the figure's x_range attribute, assigning zero to the attribute selector.
  • Repeat to link the slider's "value" to the end of the figure's x_range attribute, assigning one to the attribute selector.