ipyvizzu is the Jupyter Notebook integration of Vizzu.
Vizzu is a free, open-source Javascript/C++ library utilizing a generic dataviz engine that generates many types of charts and seamlessly animates between them. It can be used to create static charts but more importantly it is designed for building animated data stories and interactive explorers as Vizzu enables showing different perspectives of the data that the viewers can easily follow due to the animation. Visit Vizzu on Github.
# sample
import pandas as pd
from ipyvizzu import Chart, Data, Config
data_frame = pd.read_csv(
"https://raw.githubusercontent.com/vizzuhq/ipyvizzu/main/docs/examples/stories/titanic/titanic.csv"
)
data = Data()
data.add_data_frame(data_frame)
chart = Chart(width="640px", height="360px")
chart.animate(data)
chart.animate(
Config(
{
"x": "Count",
"y": "Sex",
"label": "Count",
"title": "Passengers of the Titanic",
}
)
)
chart.animate(
Config(
{
"x": ["Count", "Survived"],
"label": ["Count", "Survived"],
"color": "Survived",
}
)
)
chart.animate(Config({"x": "Count", "y": ["Sex", "Survived"]}))
Note: The data used in this example is available here. You can read more about the available types of data in the Adding data chapter.
Note: Chart
only generates the Javascript code, the Vizzu calls are evaluated by the browser. Therefore if a blank space appears where the Vizzu should be, check the console of your browser where the Javascript lib reports its errors.
ipyvizzu requires the IPython
, jsonschema
and pandas
packages.
pip install ipyvizzu
Description of the different options available when using ipyvizzu
The following tutorial is an excellent place to start using ipyvizzu, as it walks you through the installation, introduces the logic ipyvizzu employs and the different settings to control how your charts look and behave.
For a selection of common static charts and further animated examples visit our Gallery.