/* ---- Google Analytics Code Below */

## Wednesday, February 02, 2022

### On Easy Data Animation

Very nice piece by Vincent Granville,  worth a read.

Data Animation: Much Easier than you Think!

By Vincent Granville, February 2, 2022 at 1:36 am  in DSC

In this article, I explain how to easily turn data into videos. Data animations add value to your presentations. They also constitute a useful tool in exploratory data analysis. Of course, as in any data visualization, carefully choice of what to put in your video, and how to format it, is critical. The technique described here barely requires any programming skills. You may be able to produce your first video in less than one hour of work, and even with no coding at all. I also believe that data camps and machine learning courses should include this topic in their curriculum.

Examples include convergence of a 2D series related to the Riemann Hypothesis, and fractal supervised classification.

Preparing a video

To produce a data video, there are three steps:

Step 1: Prepare a standard data set (for instance, summary data in Excel, or raw data in text format) with one extra column indicating the frame number. If your video has 20 frames, that column indicates the frame number: an integer between 1 and 20.

Step 2: Create the frames. In our example, it consists of 20 images, typically in PNG format, and named (say) input001.png, input002.png and so on. The number of frames can be as large as a few thousands or a small as 10. The production of the PNG images is typically automated.

Step 3: Turn your images into a video, say an mp4 file. Some people think that this is the most difficult part, but actually it is the easiest one. It can be done with a few clicks, even without writing a single line of code, using free online platforms designed for that purpose. Here I illustrate how to do it in R with just two lines of code.

If your plan is to create a small presentation with 10 frames, a video may not be the best medium. You can still do it with a video by choosing a long duration (say 5 seconds) for each frame. However, a slide presentation may be a better alternative. My videos typically contain between 100 and 1,000 frames, with a frequency anywhere from 4 to 12 frames per second.   .... '