Giter VIP home page Giter VIP logo

trame-vega's Introduction

Vega visual grammar for trame

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

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

trame-vega's People

Contributors

actions-user avatar jourdain avatar psavery avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.