vega / ipyvega

IPython/Jupyter notebook module for Vega and Vega-Lite
BSD 3-Clause "New" or "Revised" License
372 stars 65 forks source link

How do you want to initialize polestar? #2

Closed domoritz closed 9 years ago

domoritz commented 9 years ago

I think this will be a function you call, like

import vega
vega.polestar(dataframe)

Thoughts?

kanitw commented 9 years ago

why vega.polestar?

Kanit "Ham" Wongsuphasawat Graduate Student Computer Science & Engineering University of Washington http://kanitw.yellowpigz.com

On Mon, Aug 10, 2015 at 11:48 AM, Dominik Moritz notifications@github.com wrote:

I think this will be a function you call, like

import vega vega.polestar(dataframe)

Thoughts?

— Reply to this email directly or view it on GitHub https://github.com/uwdata/ipython-vega-lite/issues/2.

domoritz commented 9 years ago

So you can use this with polestar, voyager and vl.

Even better would be

import polestar
polestar.explore(dataframe)
import voyager
voyager.explore(dataframe)

and so on

wrobstory commented 9 years ago

Some thoughts, take them or leave them.

It might be best to converge on a short-ish library/package namespace under which everything can be imported. Given that this is going to target Jupyter, a workflow like the following makes a lot of sense with a name like jvega or some such:

$ pip install jvega

import jvega as jv

jv.polestar.explore(dataframe)
jv.voyager.explore(dataframe)

The vega-lite integration is going to be trickier, as folks will want to be able to specify actual chart types.

domoritz commented 9 years ago

I agree with @wrobstory.

For vega-lite, I expect that inially users have to provide dictionary that we simply convert to a vega-lite spec in JSON.