Skip to content
forked from vega/ipyvega

IPython/Jupyter notebook module for Vega and Vega-Lite

License

Notifications You must be signed in to change notification settings

plucena24/ipyvega

 
 

Repository files navigation

IPython Vega

PyPI Build Status

IPython/Jupyter notebook module for Vega 5, and Vega-Lite 4. Notebooks with embedded visualizations can be viewed on GitHub and nbviewer. If you use JupyterLab (not the notebook), you don't need to install this extension since JupyterLab comes with built-in support for Vega and Vega-Lite.

Available on pypi and Conda Forge as vega.

Install and run

Python Package Index

To install vega and its dependencies from the Python Package Index using pip, use the following commands:

pip install jupyter pandas vega
pip install --upgrade notebook  # need jupyter_client >= 4.2 for sys-prefix below
jupyter nbextension install --sys-prefix --py vega  # not needed in notebook >= 5.3

Conda Forge

If you use Conda, you probably already have the latest versions of the notebook and pandas installed. To install vega extension run:

conda install vega

Usage

Once the package is installed, run

jupyter notebook

to launch the Jupyter notebook server, and use vega within the notebook. See the example notebooks for Vega-Lite and Vega.

To run the notebooks yourself, you need to get the file cars.json.

Developers

This project uses Poetry. If you prefer a local virtual environment, run poetry config virtualenvs.in-project true first. Install requirements: poetry install.

Then activate the virtual environment with poetry shell.

Symlink files instead of copying files:

jupyter nbextension install --py --symlink vega

Run kernel with jupyter notebook. Run the tests with pytest vega or poetry run test.

To rebuild the JavaScript continuously, run yarn watch.

How to make a release

  • Update the JavaScript dependendencies by changing package.json (e.g. with ncu).
  • Run yarn.
  • Rebuild the JavaScript with yarn build.
  • Make sure that everything still works (launch notebook and try the examples).
  • Update the version number in pyproject.toml (with poetry version [VERSION]), package.json, and __init__.py and add a git tag.
  • git push.
  • Then run poetry publish --build to update https://pypi.python.org/pypi/vega.

About

IPython/Jupyter notebook module for Vega and Vega-Lite

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Jupyter Notebook 92.3%
  • Python 5.3%
  • TypeScript 1.8%
  • JavaScript 0.6%