Article Complete
    AIM

    Create interactive presentations within the Python notebook with ipyVizzu

    Create interactive presentations within the Python notebook with ipyVizzu

    Discover how to use ipyVizzu for engaging Python presentations. Enhance your data storytelling skills today!

    Create interactive presentations within the Python notebook with ipyVizzu
    Sourabh Mehta··Updated DECEMBER 30, 2024, 5:30 AM
    5 min

    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.

    Table of contents

    1. Introduction to the ipyVizzu
    2. Creating presentations with ipyVizzu

    Introduction to the ipyVizzu

    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:

    • Designed with animation in mind.
    • Defaults based on data visualisation best practices.
    • Works with Pandas dataframes, as well as JSON and inline data input.
    • The auto-scrolling function keeps the real chart in place while running many cells.

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

    Creating stories with ipyVizzu

    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 let’s start with installing dependency.

    !pip install ipyvizzu-story

    Importing dependencies required for this article

    import numpy as np
    import pandas as pd
    from ipyvizzu import Data, Config, Style
    from ipyvizzustory import Story, Slide, Step

    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.

    data = Data()
    df=pd.read_csv(file_loc)
    data.add_data_frame(data_utils)

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

    stories = Story(data=data,style=chart_designs)

    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.

    chart_designs = Style(
        {
            "plot": {
                "paddingLeft": "0em",
                "yAxis": {
                    "label": {
                        "fontSize": "1em",
                        "paddingRight": "1.2em",
                    },
                    "title": {"color": "#ffffff00"},
                },
                "xAxis": {
                    "label": {
                        "angle": "2.5",
                        "fontSize": "1.1em",
                        "paddingRight": "0em",
                        "paddingTop": "1em",
                    },
                    "title": {"fontSize": "1em", "paddingTop": "2.5em"},
                },
            }
        }
    )
    

    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.

    s_1 = Slide(
        Step(
            
            Config(
                {
                    "channels": {
                        "y": {
                            "set": ["Sales", "Category"],
                            "range": {"min": "0%", "max": "100%"},
                        },
                        "x": {"set": ["order_Year"]},
                        "color": "Category",
                    },
                    "title": "Sales for all the caetgories",
                    "geometry": "area",
                }
            ),
        )
    )
    

    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.

    stories.add_slide(s_1)
    stories.play()
    
    (Note: Loading of GIF might take some time. Please hold on here)

    Conclusion

    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. 

    References

    Your reaction

    Discussion

    What's your take on this story?

    0/1000

    No comments yet — be the first to share your view.

    Explore our newsletters

    Build your routine with some of our top newsletters or view them all here.

    Wake up informed

    Make sense of the day's AI news and breakthroughs with our morning briefing.

    Belamy
    WeeklyBelamySee the latest

    Industry intelligence

    Receive a roundup of AI adoption stories by industry vertical, curated for professionals.

    3x WeeklySector6See the latest

    By signing up, you agree to our Privacy Policy.

    Membership

    Stay ahead with AI insights.

    Unlimited access to premium articles, exclusive analysis, and the stories shaping India's AI economy.

    Subscribe now

    AIM Americas

    1190 Miraloma Way Suite P, Sunnyvale, CA 94085

    AIM India

    1st Floor, Sakti Statesman, Bellandur, Bengaluru – 560103

    © 2026 AIM. All rights reserved.