News for hackers. Stuff that matters.
Re:Bokeh – Interactive web visualization library in Python by bsg75 on Wednesday November 20, 2013 @11:41AM (#6769057)
As a "database guy" who uses Python for most things not bash, is this an approach for viz apps that would eliminate (most) of the need to muck about in JavaScript?

D3 and its children produce some awesome visualizations, but the bandwidth does not exist for me to begin developing apps in a language I don't have much experience in.

If something like Bokeh allows me to live mostly in Python, it becomes even more interesting.

Re:Bokeh – Interactive web visualization library in Python by paddy_m on Wednesday November 20, 2013 @11:45AM (#6769095)
That is exactly the point of bokeh. It allows you to write python code and get browser based plots. Currently we have a python interface, but we intend to build interfaces in other langauges. Look at the examples gallery, which include the code needed to generate the plots. http://bokeh.pydata.org/gallery.html

A relatively simple plot (scroll down to see the code): http://bokeh.pydata.org/plot_gallery/correlation.html

The simplest example plot in the repo: https://github.com/ContinuumIO/bokeh/blob/master/examples/pl...

Re:Bokeh – Interactive web visualization library in Python by Dartanion7 on Wednesday November 20, 2013 @11:50AM (#6769136)
This is really cool, but what about adding interactivity with the charts? My first thought when I saw the headline was that this python library just generates D3 code, but it seems to be generating some sort of a static SVG object.
Re:Bokeh – Interactive web visualization library in Python by hhuuggoo on Wednesday November 20, 2013 @12:03PM (#6769224)
We're actually using canvas.

http://bokeh.pydata.org/plot_gallery/iris.html

That has a selection tool you can play around with.

Re:Bokeh – Interactive web visualization library in Python by bigreddot on Wednesday November 20, 2013 @12:03PM (#6769226)
There are already some tools available, pan and wheel zoom, plot resizing, selection (on some plot types). Many more tool types are planned.

As for the architecture, BokehJS is built entirely on top of HTML canvas. The python bokeh library sends data and plot specifications to the browser, which uses BokehJS to render the plot and handle interactive tools, etc.

Re:Bokeh – Interactive web visualization library in Python by Dartanion7 on Thursday November 21, 2013 @04:04AM (#6773749)
Gotcha, thanks.
Re:Bokeh – Interactive web visualization library in Python by paddy_m on Wednesday November 20, 2013 @12:21PM (#6769377)
Here is a linked brushing example in the IPython notebook. http://nbviewer.ipython.org/urls/raw.github.com/ContinuumIO/...
Re:Bokeh – Interactive web visualization library in Python by primelens on Wednesday November 20, 2013 @08:53PM (#6772608)
For some reason I can't get any of the interactivity buttons to work.

EDIT: Ok, everything but the zoom works. How do you zoom?

Re:Bokeh – Interactive web visualization library in Python by bigreddot on Thursday November 21, 2013 @12:28AM (#6773207)
The current zoom tool is a scroll wheel zoom, not a box selection zoom. Guessing that might be the issue since others have run into the ambiguous description as well. It will be labeled more precisely in master in a few days and in the next release as well.

If that is not the issue, please file a ticket on GitHub!

Re:Bokeh – Interactive web visualization library in Python by primelens on Thursday November 21, 2013 @05:21AM (#6773960)
On a Macbook, the scroll wheel equivalent is the two fingered scroll and that doesn't seem to work for me (scroll the page).
Re:Bokeh – Interactive web visualization library in Python by bigreddot on Thursday November 21, 2013 @10:54AM (#6775264)
Do you have the tool selected in the toolbar above? If so, please file a ticket on GH about this. Most of the Bokeh devs are on OSX so it would surprise me if it does not work on OSX, but if there is a bug we want to fix it!
Re:Bokeh – Interactive web visualization library in Python by est on Thursday November 21, 2013 @07:14AM (#6774254)
Hope there's some kind of python server side push technology to update browser graphs in realtime.
Re:Bokeh – Interactive web visualization library in Python by pwang on Thursday November 21, 2013 @07:28AM (#6774320)
Re:Bokeh – Interactive web visualization library in Python by paddy_m on Wednesday November 20, 2013 @12:05PM (#6769234)
To be more clear, there are two main parts of bokeh. First there is the js portion which uses canvas to create the plots. There is an object model that allows plots to be composed of multiple components (glyphs, data sources, axes, data ranges).

The python side produces json that represents the objects to be plotted. Python only writes a small amount of js to start the js running. For the most part python just produces json objects that the js side reads.

There could be alternate implementations of the python side that still use the same js rendering logic. You could even write a nicer higher-level js api that wraps the low-level component construction.

I talked about this at PyData NYC. Here is my notebook (which I am in the process of updating for bokeh 0.3) http://nbviewer.ipython.org/urls/raw.github.com/paddymul/bok...

Re:Bokeh – Interactive web visualization library in Python by gammarator on Thursday November 21, 2013 @01:28AM (#6773363)
Take a look at Vincent, which may give you what you're looking for (Python -> Vega, a d3 wrapper): https://vincent.readthedocs.org/en/latest/
Re:Bokeh – Interactive web visualization library in Python by jparmer on Wednesday November 20, 2013 @11:49PM (#6773100)
If you're looking to make scientific D3 graphs with Python, never touching anything close to javascript, you can also check out the Plotly Python API:

https://plot.ly/api/python

It was designed foremost to make graphs pertinent for scientific and engineering applications: https://plot.ly/~alex/76/

(Disclosure: I'm a dev @Plotly)