Skip to content

Data visualization

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 data, which I sourced from Our World in Data, can be downloaded here. The example… Read More »How to animate a scatterplot with R Shiny and highcharts