Skip to main content

Vega widget for trame

Project description

Test and Release

trame-vega extend trame widgets with a Figure component that is capable of rendering Vega grammars such as Altair plots.

Installing

trame-vega can be installed with pip:

pip install --upgrade trame-vega

Usage

The Trame Tutorial is the place to go to learn how to use the library and start building your own application.

The API Reference documentation provides API-level documentation.

License

trame-vega is made available under the BSD-3 License. For more details, see LICENSE This license has been chosen to match the one use by Vega and Altair which are either used within that trame widget or will be use by the user to create the content for those Figures.

Community

Trame | Discussions | Issues | RoadMap | Contact Us

https://zenodo.org/badge/410108340.svg

Enjoying trame?

Share your experience with a testimonial or with a brand approval.

Example: Vega + Altair

The Python interface of Altair provide examples on how to create various visualization.

import altair as alt
from vega_datasets import data

from trame.widgets import vega

# Generate chart
source = data.cars()
fig = (
    alt.Chart(source)
    .mark_circle()
    .encode(
        alt.X(alt.repeat("column"), type="quantitative"),
        alt.Y(alt.repeat("row"), type="quantitative"),
        color="Origin:N",
    )
    .properties(width=200, height=200)
    .repeat(
        row=["Horsepower", "Acceleration", "Miles_per_Gallon"],
        column=["Miles_per_Gallon", "Acceleration", "Horsepower"],
    )
    .interactive()
)

# Display it
widget = vega.Figure(figure=None) # could pass fig at construction
widget.update(fig) # or update later

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

trame-vega-2.1.1.tar.gz (339.6 kB view details)

Uploaded Source

Built Distribution

trame_vega-2.1.1-py3-none-any.whl (340.1 kB view details)

Uploaded Python 3

File details

Details for the file trame-vega-2.1.1.tar.gz.

File metadata

  • Download URL: trame-vega-2.1.1.tar.gz
  • Upload date:
  • Size: 339.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/43.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.2.1 tqdm/4.66.2 importlib-metadata/7.0.2 keyring/24.3.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.13

File hashes

Hashes for trame-vega-2.1.1.tar.gz
Algorithm Hash digest
SHA256 a3d82f7535a66a782262647001987dba3ad0ddc64ce21225a4cfccd351fed8fa
MD5 d3fb20ac76e4397e02baca1b63a210a2
BLAKE2b-256 0a49f16acec3712162cd7ceb7704bf96985b96851c322f3b686d49fbff3cf51e

See more details on using hashes here.

File details

Details for the file trame_vega-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: trame_vega-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 340.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/43.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.2.1 tqdm/4.66.2 importlib-metadata/7.0.2 keyring/24.3.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.13

File hashes

Hashes for trame_vega-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 044ea338f74fe83e7a5eca15fd1723b3b5f2847d5ca0ed2f0325e30d7676b6c9
MD5 02315b9a7a654629bb278f1021ae2227
BLAKE2b-256 2d8c47d805003a34bd544b702d0fbc82ac064458b438fc7fd7c7122d1c7f30db

See more details on using hashes here.

Supported by

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