Build interactive big data apps with Altair and Vega easily using Panel + VegaFusion.
Project description
Panel VegaFusion
WORK IN PROGRESS. PROOF OF CONCEPT WORKING. PACKAGE NOT WORKING!
The Panel VegaFusion pane allows you to create interactive big data apps based on the Altair plotting library and the Vega visualization specification.
It is all powered by VegaFusion which provides serverside acceleration for the Vega visualization grammar.
Reference 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 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,
)
Todo
This needs to be done before alpha release
- [] Fix all errors in
invoke test.all
- [] Make python package installable (and release it)
- [] Implement way to get rid of the user having to serve the assets manually via
--static dist=./src-js/dist
. - [] Get things working on Binder
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!
References
- VegaFusion
- VegaFusion documentation
- Panel
- Panel Discourse
- Awesome Panel
- DataShader (A mature alternative for big data visualization)
- hvplot/ HoloViews (Provides alternative, easy to use crossfiltering using familar Pandas
.plot
api)
Issues Identified
- vegafusion/vegafusion #64 - Altair Dark theme not working
- Bokeh Discourse - Cannot bokeh build extension with wasm dependency
- bokeh/ipywidgets_bokeh #46 - Not working with VegaFusionWidget
- holoviz/param #597 - Add edit_readonly
- holoviz/panel #3149 - Object of type Chart is not JSON serializable
- vegafusion/vegafusion #62 - Please support Panel
- vegafusion/vegafusion #63 - Please provide simple .js build
Develop
Install
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 --save-dev webpack-cli
npm install
cd ..
Build
Javascript package
invoke build.js
Python package
invoke build.package
Test
pytest 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 --static dist=./src-js/dist
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 Test Pypi first you can do so by adding --repository testpypi
.
Reference
You can also find inspiration in the original Jupyter VegaFusion reference example via
jupyter lab tests/reference_example.ipynb
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for panel_vegafusion-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa46a4c63424a96045c8731ad0e79d880e7ba3404694f3dab056e5348f64be51 |
|
MD5 | 40c4f2b15fd1a30ff2fb5b6eae66f246 |
|
BLAKE2b-256 | 779bd5c22a8764769f265b1e998f9998beb79d8bef9e6aceccdef587770d57bd |