¿Podemos incrustar animaciones de Vizzu en un blog?
¡SI SE PUEDE!
Show the code
import pandas as pdfrom ipyvizzu import Data, Config, Stylefrom ipyvizzustory import Story, Slide, Step# Create data object, read csv to data frame and add data frame to data objectdata = Data()df = pd.read_csv("https://ipyvizzu-story.vizzuhq.com/0.9/examples/population/population.csv", dtype={"Year": str},)data.add_df(df)# Create story object, add data to itstory = Story(data=data)# Set the size of the HTML element# that appears within the notebookstory.set_size("100%", "400px")# Switch on the tooltip that appears# when the user hovers the mouse over a chart elementstory.set_feature("tooltip", True)# Each slide here is a page in the final interactive story# Add the first slideslide1 = Slide( Step( Data.filter("record.Continent == 'Africa'"), Config.stackedArea( {"x": "Year","y": "Medium","stackedBy": "Subregion","title": "Population of Africa 1953-2098", } ), Style({"plot": {"xAxis": {"label": {"angle": 2.0}}}}), ))# Add the slide to the storystory.add_slide(slide1)slide2 = Slide( Step( Config.percentageArea( {"x": "Year","y": "Medium","stackedBy": "Subregion", } ), ))story.add_slide(slide2)slide3 = Slide( Step( Config.stream( {"x": "Year","y": "Medium","stackedBy": "Subregion", } ), ))story.add_slide(slide3)slide4 = Slide( Step( Config.violin( {"x": "Year","y": "Medium","splittedBy": "Subregion", } ), ))story.add_slide(slide4)# Play the created story!story.play()