Create interactive presentations within the Python notebook with ipyVizzu – Analytics India Magazine

Storytelling is one of the most important skills of an Analyst because the analysis has to be communicated to the stakeholders. The best way to communicate the analysis obtained from the data is by telling the story of the data. Using animations as a result of communication methods can assist the audience in rapidly grasping the point and absorbing the message delivered by the teller. This article will introduce a python framework called ipyVizzu which will help to create animated analysis within the notebook itself for presentation. Following are the topics to be covered.

The ipyvizzu is an animated graphing tool for notebooks like Jupyter, Google Colab, Databricks, Kaggle, and Deepnote, among others. It enables data scientists and analysts to use Python animation for data storytelling. It is based on Vizzu, an open-source Javascript/C++ charting toolkit.

There is a new ipyvizzu extension, ipyvizzu-story, that allows animated charts to be shown directly from notebooks. Because the syntax of ipyvizzu-story differs from that of ipyvizzu, we recommend starting with the ipyvizzu-story repo if you want to use animated charts to show your findings live or as an HTML file. It makes use of a generic DataViz engine to produce several types of charts and easily transition between them. It is intended for creating animated data tales since it allows viewers to quickly follow multiple viewpoints of the data.

Main characteristics:

Are you looking for a complete repository of Python libraries used in data science,check out here.

The article will use data related to sales, it is a time series data for multiple products and sub-products. To use the ipyVizzu needed to be installed, so lets start with installing dependency.

Importing dependencies required for this article

Since the ipyvizzu module is completely compatible with Pandas dataframes, creating graphs straight from data is a breeze. To include a dataframe in an ipyvizzu chart, first, create a Data() object and then add the dataframe to it.

We are all set to create stories with ipyVizzu story, for creating stories it must be in the form of slides. Its similar to a video which is a set of different frames.

The plots could be designed according to the need, one change the labels, colours, font size of the texts, orientation of the labels, etc. To customize the plots use the below code.

To create a slide the components like x-axis, y-axis, hue and title need to be configured by using channels. As shown in the below code.

Then after these slides are built, you need to add them to the story built above so that it can be aggregated in one place and be in a sequence. To display the story, use the play() function.

The ipyVizzu is really simple and easy to use once its property is properly understood and one can create animated stories. With this article, we have understood the use of the ipyVizzu package.

More here:

Create interactive presentations within the Python notebook with ipyVizzu - Analytics India Magazine

Related Posts

Comments are closed.