The plotly package enables the construction of interactive and animated graphics entirely within R. This goes beyond basic interactivity such as panning, zooming, and tooltips. In this course, you will extend your understanding of plotly to create animated and linked interactive graphics, which will enable you to communicate multivariate stories quickly and effectively. Along the way, you will review the basics of plotly, learn how to wrangle your data in new ways to facilitate cumulative animations, and learn how to add filters to your graphics without using Shiny.
Introduction and review of plotlyFree
A review of key plotly commands. You will review how to create multiple plot types in plotly and how to polish your charts. Additionally, you will create static versions of the bubble and line charts that you will animate in the next chapter.Interactive and dynamic graphics50 xpWhich is the interactive graphic?50 xpA simple time series plot100 xpA simple scatterplot100 xpAdding aesthetics to represent a variable50 xpColor and size100 xpPlotting symbols100 xpPolishing your graphics100 xpMoving Beyond Simple Interactivity50 xpBubble charts100 xpMany time series100 xp
In this chapter, you will learn how to implement keyframe animation in plotly. You will explore how to create animations, such as Hans Rosling's bubble charts, as well as cumulative animations, such as an animation of a stock's valuation over time.Introduction to animated graphics50 xpWhat's the frame?50 xpWhy do we need ids?50 xpAnimating a scatterplot100 xpFactors as frames100 xpPolishing animations50 xpPolishing your regional animation100 xpPolishing your HPI animation100 xpLayering in plotly50 xpAdding background text100 xpPlotting the baseline100 xpCumulative animations50 xpHow many rows?50 xpMedian life expectancies100 xpAnimating median life expectancies100 xp
When you are exploring unexpected structure in your graphics, it's useful to have selections made on one chart update the other. For example, if you are exploring clusters observed on a scatterplot, it is useful to have the selected cluster update some chart of group membership, such as a jittered scatterplot or sets of bar charts. In this chapter, you will learn how to link your plotly charts to enable linked brushing. Along the way, you will also learn how to add dropdown menus, checkboxes, and sliders to your plotly charts, without the need for Shiny.Linking two charts50 xpsharedData objects50 xpLinking scatterplots100 xphighlighting() charts100 xpBrushing groups50 xpHighlighting time series data100 xpLinking a dotplot and a time series plot100 xpLinking a bar chart to a scatterplot100 xpSelection strategies50 xpSearching for clusters100 xpAdding dropdown menus100 xpMaking shinier charts50 xpArranging views with bscols()100 xpAdding checkboxes100 xpAdding a slider100 xp
Case Study: Space launches
In the final chapter, you will use your expanded plotly toolkit to explore orbital space launches between 1957 and 2018. Along the way, you'll learn how to wrangle data to enable cumulative animations without common starting points, and hone your understanding of the crosstalk package.Introduction to the space launches data50 xpLaunches over time100 xpSpace race timeline100 xpState vs. private launches100 xpRecap: Animation50 xpAnimating the space race100 xpAnimating the private space race100 xpRecap: linked views and selector widgets50 xpLinking for group selection100 xpLinked brushing100 xpLinked views for summarization100 xpAdding a slider for time100 xpWrap-up50 xp
In the following tracksInteractive Data Visualization in R
DatasetsEconomic indicators for the 50 states and Washington, D.C. from 1997 to 2017Complete list of all orbital space launches between 1957 and 2018
PrerequisitesInteractive Data Visualization with plotly in R
Adam LoySee More
Assistant Professor of Statistics at Carleton College
Adam is an assistant professor of statistics at Carleton College where he teaches courses in statistics in data science. His research interests lie in statistical graphics and computing, R development, and statistics/data science education. Find out more on Adam's webpage.