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

## 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`.
## 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
IPython/Jupyter notebook module for [Vega](/vega/vega-lite), and [Vega-Lite](/vega/vega-lite), [Polestar](/vega/polestar), and [Voyager](/vega/voyager).

## 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`.
## 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
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
vega-0.2.tar.gz
(2.8 kB
view details)
File details
Details for the file vega-0.2.tar.gz.
File metadata
- Download URL: vega-0.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e01de4ad21e2005f146b56f92c86801af89ebfea8a11b036ba4dd16982d7eb94
|
|
| MD5 |
c1676434ad46bcaa9017d9adcaf77d03
|
|
| BLAKE2b-256 |
8f7c0fd9e5d7ef593c82d80f0a0a05a867feb1753874593a0e0b01d0c0c90b3c
|