While exploring a dataset we come across time series data where we usually have to use up a spatial dimension to depict time in our plots. Wouldn’t it be great if we could depict the passage of time via an actual passage of time (albeit in a scaled-down manner)? That way we can use the spatial dimension to study another additional parameter. That’s where animated plots come to the rescue.

We would be using the Python library for Plotly, and Plotly Express to animate some of our basic plots. Also, we would be focusing on plots that take us through the data over a period of time. For plotting data over a period of time we need to show cumulative numbers that help us understand how a particular set of parameters have moved over a period of time, along with the relation between them. For this kind of analysis, we need to work on the data before we can plot these figures using Plotly.

We would be using a dataset uploaded in Kaggle which gives us the details of all space launches (successful and unsuccessful both). Let’s start with the import of all the required libraries.

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import chart_studio.plotly as py
import plotly.express as px

#plotly #data-visualisation #animation #data-science #python-programming

Storytelling using animation in Plotly
1.60 GEEK