Skip to main content

Create and present animated data stories within data science notebooks.

Project description

Vizzu

ipyvizzu - story Extension

Example · Repository

PyPI version CI-CD

About The Extension

ipyvizzu-story is an extension of ipyvizzu that enables users to create interactive presentations from the animated data visualizations built with ipyizzu right within the data science notebook of their choice. The extension provides a widget that contains the presentation and adds controls for navigating between slides - predefined stages within the story being presented.

Installation

ipyvizzu-story requires ipyvizzu package.

pip install ipyvizzu-story

Usage

Readme example

Import ipyvizzu and ipyvizzu-story:

from ipyvizzu import Data, Config
from ipyvizzustory import Story, Slide, Step

Add the underlying data for the data story. You can use the same data definition formats as in the ipyvizzu library, but you must add the entire data set for the whole story in the initial step, you can not change this later. See ipyvizzu tutorial - Adding data for more details on data formats.

data = Data()
data.add_series("Foo", ["Alice", "Bob", "Ted"])
data.add_series("Bar", [15, 32, 12])
data.add_series("Baz", [5, 3, 2])

Put the data object into the Story constructor. Here you can also set the Story objects style property to set the chart style used for the whole story.

story = Story(data=data)

Create the data story by defining a sequence of slides. A slide can be a single chart corresponding to a single chart.animate() call from ipvizzu. Or a slide can be a sequence of animation calls, in which case all of these animations will be played until the last one in the sequence, allowing for more complex transitions between slides. Navigation controls beneath the chart will navigate between the slides. You can use the PgUp and PgDn buttons, left and right arrows to navigate between slides, and the Home and End buttons to jump to the first or last slide.

On each chart, you can define the chart configuration and style with the same objects as in ipyvizzu. However, you can not modify the underlying data between the slides, only the data filter used.

slide1 = Slide(
    Step(
        Config({"x": "Foo", "y": "Bar"}),
    )
)
story.add_slide(slide1)

slide2 = Slide(
    Step(
        Config({"color": "Foo", "x": "Baz", "geometry": "circle"}),
    )
)
story.add_slide(slide2)

Then play the Story.

story.play()

Check out a live example!

Or see a more complex use case:

Check out a live complex example!

Contributing

We welcome contributions to the project, visit our contributing guide for further info.

Contact

License

Copyright © 2022 Vizzu Kft..

Released under the Apache 2.0 License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ipyvizzu-story-0.2.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipyvizzu_story-0.2.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file ipyvizzu-story-0.2.0.tar.gz.

File metadata

  • Download URL: ipyvizzu-story-0.2.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for ipyvizzu-story-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7a6054ddf7890fc870abb634b2177a82441de64cb751c495968b4fd54e2e9dd3
MD5 b79e0030df557a64ebbb63d7f39d74ac
BLAKE2b-256 886056ad68e1e5e78eb4393fa660f1dad4b0600cde7408d25f6fd571c4a00098

See more details on using hashes here.

File details

Details for the file ipyvizzu_story-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ipyvizzu_story-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for ipyvizzu_story-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6301c2882550a7fb8fafe5f2f89fc4c2ebf3077ffedc98e30505e85f82bf6dc7
MD5 8be2b3149b9cee31c2a5b7e70022bdea
BLAKE2b-256 b6204e1fcec3d93c47bc21235c2d673e16695c250b35993dc13bac6158add28b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page