Skip to main content

An IPython/ Jupyter widget for Vega and Vega-Lite

Project description

# IPython Vega [![PyPI](https://img.shields.io/pypi/v/vega.svg?maxAge=2592000)]()

IPython/Jupyter notebook module for [Vega](/vega/vega-lite), and [Vega-Lite](/vega/vega-lite), [Polestar](/vega/polestar), and [Voyager](/vega/voyager).

Available on [pypi](https://pypi-hypernode.com/pypi/vega).

![screenshot](https://raw.githubusercontent.com/vega/ipyvega/master/screenshot.png "Screenshot of the Vega-Lite module")


## Install

```sh
python setup.py install
jupyter nbextension install --py vega
jupyter nbextension enable --py vega
```

## Usage

```
%load_ext vega.disable_autoscroll
```

```py
import pandas as pd
df = pd.read_json('data/cars.json')

from vega import vegalite
vegalite.view(df, {
"mark": "point",
"encoding": {
"y": {"type": "quantitative","field": "Acceleration"},
"x": {"type": "quantitative","field": "Horsepower"}
}
})
```

## Developers

Install requirements: `pip install -r requirements.txt`

Symlink files instead of copying files:

```sh
python setup.py develop
jupyter nbextension install --py --symlink vega
jupyter nbextension enable --py vega
```

Run kernel: `jypyter notebook`

To rebuild the javascript continuously, run `npm run watch`.

Publish a new version to pypi with `python3 setup.py sdist upload`.


## Resources

How to implement an nbextension.

* https://github.com/ipython-contrib/IPython-notebook-extensions/blob/master/nbextensions/styling/table_beautifier/main.js
* https://ipywidgets.readthedocs.org/en/latest/index.html
* https://github.com/jovyan/pythreejs

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

vega-0.2.2.tar.gz (588.6 kB view details)

Uploaded Source

File details

Details for the file vega-0.2.2.tar.gz.

File metadata

  • Download URL: vega-0.2.2.tar.gz
  • Upload date:
  • Size: 588.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for vega-0.2.2.tar.gz
Algorithm Hash digest
SHA256 31060f71d407d218a37c2ef1bf18c31922d3f4d82a1fe5fd26608ff43e4c9a6b
MD5 385360722414dab0952bdc463ca7a0ed
BLAKE2b-256 908c429e6bcaa9e409e4545e71b21f57536f918b74fff9e55948d4e4d8aaf1da

See more details on using hashes here.

Provenance

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