Animated-Scatter-Plot

Animated Scatter Plot Experiment

I’ve been doing some exploratory data visualization of sugar consumption correlations to obesity rates and body mass index (BMI) in the US, Canada, and several western European nations. In an article on Digital Splash Media, I posted some line charts showing sugar consumption and BMI for United States, Canada, United Kingdom, Germany, France, Italy, Spain, Netherlands, Switzerland, Sweden, Norway, Belgium, Austria, and Portugal over several decades.  I also created a scatter plot showing the correlation of sugar consumption to obesity rates in these countries in 2008. But what I really wanted to see was a scatter plot of this correlation over several years of data that I had available, 1980 – 2004.

I created the line charts and scatter plot for the article in Plotly. To create the animated version of the scatter plot, I wanted a quick and easy way to output scatter plots for each year of data. Plotly allows some degree of interactivity, allowing you to see the country name when you hover over the interactive version, but by default, it doesn’t place the labels on the bubble in the files that you can download. So, I opted to use Density Design’s RAW to generate the plots which turned out to be much quicker and easier to generate 24 scatter plots than it was in Plotly. There are some tricks required to get each scatter plot to plot the same size and same and scale but I’ll leave that for a separate article.

I downloaded each scatter plot as a .svg file then opened each in Adobe Illustrator to clean up and save as a .ai file. I used Apple Motion to set each on a timeline, but in theory this could be accomplished with a basic video editor like iMovie or even presentation software like Apple Keynote or Microsoft PowerPoint. I may do a how-to tutorial on that in a separate article as well.

Below is the result – a bit lower in fidelity than I had hoped, but fairly quick and easy to produce. To clean up the animation and make the elements more legible I think I’ll create the geometry and text within Motion and animate those elements using basic motion path techniques. That will be a more time-consuming process, but it will no doubt make for a better, more effective visualization that’s easier to read.

Sugar Consumption – Body Mass Index Animated Scatter Plot US, Canada, Europe 1980 – 2004 from Jeff Bennett on Vimeo.