I am trying to reproduce the code in the plotly book. The author has provided an rstudio cloud instance for running the code.