Giter VIP home page Giter VIP logo

awesome-panel / panel-vegafusion Goto Github PK

View Code? Open in Web Editor NEW
15.0 1.0 0.0 13.85 MB

Build interactive big data apps with Altair and Vega easily using Panel + VegaFusion.

License: GNU Affero General Public License v3.0

Python 71.30% Jupyter Notebook 4.76% TypeScript 7.83% JavaScript 3.40% HTML 0.57% SCSS 5.82% CSS 6.32%
python holoviz panel altair vega python3 dataviz businessintelligence bigdata

panel-vegafusion's Introduction

Python Versions License: AGPL v3 Binder Follow on Twitter

Panel VegaFusion

WORK IN PROGRESS. PROOF OF CONCEPT WORKING.

The Panel VegaFusion pane allows you to create interactive big data apps based on the Altair plotting library and the Vega visualization specification.

VegaFusion provides serverside acceleration for the Vega visualization grammar.

Panel makes it easy to create powerful data apps using the tools you know and โค๏ธ. Member of the HoloViz ecosystem.

Reference Example

Install

pip install panel-vegafusion

If you have Jupyter Lab installed and plan on using it you should definately also install the Panel Jupyterlab Preview via

jupyter serverextension enable panel.io.jupyter_server_extension

Example

import altair as alt
import panel as pn
from panel_vegafusion import VegaFusion
from panel_vegafusion.utils import get_plot, ALTAIR_BLUE, get_theme

pn.extension(template="fast")

theme=get_theme()
alt.themes.enable(theme)

plot=get_plot() # Can be replaced by any Altair plot or Vega Specification

component = VegaFusion(plot, height=800).servable()

pn.state.template.param.update(
    site="Panel VegaFusion", title="Interactive BIG DATA apps with CROSSFILTERING for Altair and Vega",
    accent_base_color=ALTAIR_BLUE, header_background=ALTAIR_BLUE,
)

You can serve the application via panel serve name_of_file.py or panel serve name_of_notebook.ipynb. Add the --autoreload for hot reload during development and --show to automatically open the app in the browser.

License - AGPLv3 - IMPORTANT

This Panel Vegafusion project is AGPLv3 Licensed because VegaFusion is AGPLv3 licensed and requires the author to provide this application's source code upon request.

SO PLEASE INVESTIGATE THE LEGAL ASPECTS ON YOUR OWN. YOU WILL BE USING THIS PROJECT AT YOUR OWN RISK ANYWAYS! ๐Ÿ‘

Legal Statement

References

Issues Identified

Develop

Install for development

git clone https://github.com/MarcSkovMadsen/panel-vegafusion.git
conda create -n panel_vegafusion -c conda-forge python=3.9 nodejs
conda activate panel_vegafusion
pip install -e .[all]
cd src-js
npm install
cd ..

Build

Javascript package

invoke build.js

Python package

invoke build.package

Test

invoke test.all

Serve Dev App

For now you can serve an example with hot reload via

panel serve 'tests/apps/test_dev_app.py' --autoreload --show

Panel VegaFusion Test App

Serve Example Apps

For now you can serve an example with hot reload via

panel serve 'examples/*.py' --autoreload --show

Reference

You can also find inspiration in the original Jupyter VegaFusion reference example via

jupyter lab tests/reference_example.ipynb

Release Python Package

Before releasing please make sures you have

  • updated all version numbers
  • build all packages
  • run all tests with succes
python -m twine upload dist/*<VERSION>*

to deploy the package ๐Ÿ“ฆ.

If you want to upload to testpypi first you can do so by adding --repository testpypi.

panel-vegafusion's People

Contributors

marcskovmadsen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

panel-vegafusion's Issues

Broken with Vegafusion-Jupyter 0.0.2+

With the minimum example from the readme I get the following output:

File 'vegafusion_panel.py', line 16, in <module>:
from vegafusion_jupyter.runtime import runtime Traceback (most recent call last):
  File "C:\Users\ding\.conda\envs\py38_64\lib\site-packages\bokeh\application\handlers\code_runner.py", line 231, in run
    exec(self._code, module.__dict__)
  File "C:\Users\ding\source\repos\novatellogtools\pynovatel\plotting_utils\panel_test.py", line 3, in <module>
    from panel_vegafusion import VegaFusion
  File "C:\Users\ding\.conda\envs\py38_64\lib\site-packages\panel_vegafusion\__init__.py", line 38, in <module>
    from .vegafusion_panel import VegaFusion
  File "C:\Users\ding\.conda\envs\py38_64\lib\site-packages\panel_vegafusion\vegafusion_pane.py", line 16, in <module>
    from vegafusion_jupyter.runtime import runtime
ModuleNotFoundError: No module named 'vegafusion_jupyter.runtime'

From what I can tell, the vegafusion_jupyter.runtime module has not existed since 0.2.0
https://github.com/hex-inc/vegafusion/blob/v0.0.2/python/vegafusion-jupyter/vegafusion_jupyter/__init__.py

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.