Skip to content

Create animated charts easily! A ipyvizzu wrapper for intuitive usage of ipyvizzu functions and Streamlit embed support.

License

Notifications You must be signed in to change notification settings

avrabyt/Streamlit-ipyvizzu

Repository files navigation

Streamlit-ipyvizzu (st-vizzu)

Create animated charts easily! A ipyvizzu wrapper for intuitive usage of ipyvizzu functions and Streamlit embed support.

PyPI version Downloads Downloads Website shields.io

Installation

pip install st-vizzu

⭐️ Support me to keep this development going ☕️

"Buy Me A Coffee"

Workflow simplification

  1. Create ipyvizzu object using, create_vizzu_obj() or define preset ipyvizzu charts for example,bar charts using, bar_chart()

  2. Animate the charts using, generalized function, vizzu_animate() or argument specific function, beta_vizzu_animate()

  3. Embed the charts within Streamlit front-end using, vizzu_plot()

Quickstart

from st_vizzu import *
import pandas as pd
import streamlit as st

# Load Data
df = pd.read_csv("Data/music_data.csv", index_col=0)
# Create ipyvizzu Object with the DataFrame
obj = create_vizzu_obj(df)

# Preset plot usage. Preset plots works directly with DataFrames.
bar_obj = bar_chart(df,
            x = "Kinds", 
            y = "Popularity",
            title= "1.Using preset plot function `bar_chart()`"
            )

# Animate with defined arguments 
anim_obj = beta_vizzu_animate( bar_obj,
    x = "Genres",
    y =  ["Popularity", "Kinds"],
    title = "Animate with beta_vizzu_animate () function",
    label= "Popularity",
    color="Genres",
    legend="color",
    sort="byValue",
    reverse=True,
    align="center",
    split=False,
)

# Animate with general dict based arguments 
_dict = {"size": {"set": "Popularity"}, 
    "geometry": "circle",
    "coordSystem": "polar",
    "title": "Animate with vizzu_animate () function",
    }
anim_obj2 = vizzu_animate(anim_obj,_dict)

# Visualize within Streamlit
with st.container(): # Maintaining the aspect ratio
    st.button("Animate")
    vizzu_plot(anim_obj2)

Example

Open in Streamlit

Animated charts ✨

Animation1

Story-presentation ⌛️

Story

ipyvizzu-notebook📒

notebook

Video Tutorials

Convert Excel Sheets to Animated Plots in Python using IPYVIZZU|PART 1

Resources