ABSTRACT

This chapter focuses on creating and customizing the interactivity of plots based on the “plotly” package and covers various types of interactive graphics such as bar charts, scatter plots, multiple time series plots, and animation plots. In the past few years, interactive tools for visualization of disease outbreaks have been improving markedly. The chapter introduces the R “plotly” package, which grants us the ability to design, share, and customize sophisticated and interactive graphics. Animated plots are a great way to display the dynamics of the underlying data. Both plot_ly() and ggplotly() can produce key frame animations through the frame argument/aesthetic. They also support an ids argument to guarantee smooth transitions between objects with the same id during the animation.