Skip to content

Blog

How to animate a scatterplot with R Shiny and highcharts

    In my work for the OECD, I had to visualize the change over time of two-dimensional data depicted in a scatterplot. The time dimension effectively adds a third, continuous, variable, which is always a bit tricky to visualize. As the plot will be published online, I decided to animate it. The solution I came up with uses R Shiny and highcharter (an R wrapper for the Highcharts javascript library). The plot in the following example depicts GDP and life satisfaction by country over time. The size of each dot represents population size. The data, which I sourced from Our World… Read More »How to animate a scatterplot with R Shiny and highcharts