Bokeh – Interactive web visualization library in Python
bokeh.pydata.org
bokeh.pydata.org
It's worth mentioning that the IPython guys are implementing a similar json/python bridge to support the new interactive tools in the IPython notebook. Once that is up and running, we'll probably just piggy back off of that bridge, when you're running in the notebook.
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.
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...
http://bokeh.pydata.org/plot_gallery/iris.html
That has a selection tool you can play around with.
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.
EDIT: Ok, everything but the zoom works. How do you zoom?
If that is not the issue, please file a ticket on GitHub!
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...
It was designed foremost to make graphs pertinent for scientific and engineering applications: https://plot.ly/~alex/76/
(Disclosure: I'm a dev @Plotly)
For those who aren't photography nerds, "bokeh" is a Japanese word that means the out-of-focus areas in a photograph. Different lenses have different kinds of bokeh, and beautiful or ugly bokeh is an important dividing line between good and bad lenses.
As you say, bokeh is about out-of-focus blur. That's sort of the opposite impression you want to present in a tool that's intended to give you "clarity" via its visualizations.
If you actually look at the sample output of the library, there's nothing out of focus, at least from the perspective of depth of field. In my opinion (and it is just an opinion), calling all de-emphasized data bokeh is a stretch at best. Blurring and de-emphasis using color and size are two different things.
>> Portrait photos are often beautiful when the lens has good bokeh characteristics.
Let's be clear -- while bokeh can enhance the beauty of a portrait, it doesn't make a portrait beautiful. Most people don't know the difference between good bokeh and bad bokeh (pwang's definition of bokeh in his response to me is very good), but they can usually identify a blurred background vs. a sharp background.
Many people tend to prefer a sharp subject against a blurred background, and that's usually enough for most people to consider a portrait beautiful even if the bokeh is quite ugly. Without getting into a long drawn out discussion of bokeh, you have to remember that there's also more to a beautiful portrait than the novelty of a blurred background.
We are working on the semantic downsampling and perceptual integration aspects of visualizing large data. This currently lives in its own repo: https://github.com/JosephCottam/AbstractRendering
> calling all de-emphasized data bokeh is a stretch at best
It's really just meant to be an evocative metaphor... :-)
Gotcha - me not liking a name is just my own personal opinion. The library itself is interesting.
You can't please everyone all of the time. ;)
With the 0.3 release out now, I'm focusing on building hooking up the abstract rendering backend for the plot server, so just keep an eye out.
This is actually mentioned in the documentation: http://bokeh.pydata.org/#technical-vision
""" Photographers use the Japanese word “bokeh” to describe the blurring of the out-of-focus parts of an image. Its aesthetic quality can greatly enhance a photograph, and photographers artfully use focus to draw attention to subjects of interest. “Good bokeh” contributes visual interest to a photograph and places its subjects in context.
In this vein of focusing on high-impact subjects while always maintaining a relationship to the data background, the Bokeh project attempts to address fundamental challenges of large dataset visualization... """
Yes, you're right. But most people tend to treat out-of-focus blur synonymously with bokeh (the quality of the blur) -- they're related but not the same. In this particular library's case, I think they're talking about out-of-focus blur, not bokeh.
In fact we are working on (and open sourcing) similar ideas
[1] http://stanford.edu/~mwaskom/software/seaborn/index.html
You can easily imagine as similar approach for line plots which does selectively downsampling of datapoints in order to preserve interesting features in the plot.
And then we'll build interactors on top of that, so you can actually treat it like a scatter plot, even though it's a heatmap that's being sent to your browser.
So the answer is - large datasets, means, as large as our abstract rendering algorithm can handle on your hardware, so those data sets should be pretty big.
If you want to discuss further, please email bokeh@continuum.io
It is incredibly easy to use bokeh from python. The burtin example in the gallery reads from CSV http://bokeh.pydata.org/plot_gallery/burtin_example.html . Scroll down a bit, and you can see the code.
I am a bokeh dev at Continuum Analytics.
Let us know if you ever have any problems with it.
""" Q: Why did you start writing a new plotting library, instead of just extending e.g. Matplotlib?
A: There are a number of reasons why we wrote a new Python library, but they all hinge on maximizing flexibility for exploring new design spaces for achieving our long-term visualization goals. (Please see Technical Vision[1] for details about those.) """