Bokeh – a Python interactive visualization library
bokeh.pydata.org
bokeh.pydata.org
At the current time you can export to png, or maybe export to svg in a roundabout manner, by turning html page into pdf, turning pdf into svg, etc.
Raster does have limited resolution, but so does your screen or most output devices (yes, even scientific plotters).
It's also not necessarily true that it has a higher storage footprint; it depends on the complexity and number of glyphs, the fonts you need to embed for the LaTeX formulae, etc. etc. In large-data cases, raster can be a much more viable visualization transfer medium.
SVG is nice too, just needs few more intermediate steps.
to_bokeh(fig=None, use_pandas=True, xkcd=False)
Taken from: http://bokeh.pydata.org/en/latest/docs/user_guide/compat.htm...That being said, this sounds nice for adding interactivity (sliders to vary parameters, that sort of stuff). Useful in presentations and the sort.
A description of how one gets from Python to a web browser display would be nice. Is there a translation from Python to Javascript somewhere? Is there a Python web server backend? Are there dynamic visual updates or does this thing just generate a static output like a .png file?
> When you execute this script, you will see that a new output file "lines.html" is created, and that a browser automatically opens a new tab to display it. (For presentation purposes we have included the plot output directly inline in this document.)
This is based on an example calling an output_file() function, but the docs also mention output_notebook(), and I'm sure you can output to HTML as a string as well. I didn't spend too much time digging yet.
Source: http://bokeh.pydata.org/en/latest/docs/user_guide/embed.html
1) you can create any viz you want to - you have access to very low-level elements and can build up anything from them 2) it's liberally open source licensed
why i initially got sucked into bokeh over d3 is that: a) I prefer python b) I find it more intuitive (d3 always messes with my head)
http://bokeh.pydata.org/en/latest/docs/dev_guide/bokehjs.htm...
Check out Jupyter notebooks.
> Is there a Python web server backend?
That's possible for dynamic charts, but for most usage, Bokeh saves all the chart's data inside the .html file (yielding sometimes huge files). See http://bokeh.pydata.org/en/latest/docs/gallery.html for examples.
http://birdsarah.github.io/europython-2015-bokeh/static/slid...
python (or r or scala) spits out json that is consumed by bokehjs
See, for instance, Sarah Bird's excellent GapMinder example: http://nbviewer.jupyter.org/github/bokeh/bokeh-notebooks/blo...
When you move the slider, it generates JS events which drive model updates completely in the browser, which then update the objects that comprise the plot. All of that is built straight from Python, but there is no Python kernel running in the background.
Bokeh also lets you write your event handlers in Python, and reside on the server, and get called back automatically when the user interacts with the plot in some way. Check out this app for example: http://demo.bokehplots.com/apps/selection_histogram You can use the lasso tool to select some points, and that computes a new sub-histogram. Here is the entirety of the code for it: https://github.com/bokeh/bokeh/blob/master/examples/app/sele...
For more deep-dive on the architecture, you can start at this slide and walk through: http://www.slideshare.net/misterwang/bokeh-tutorial-pydata-s...
Or you can watch this webinar recording (start at the 19 minute mark): https://continuum-analytics.wistia.com/medias/f6wp9dam91
I've been considering running out lab experiments off of a webapp, but haven't found an easy enough solution.
It allows for building streaming visualizations or plots with using websockets (implemented using tornado).
Bokeh is widely discussed by photography equipment aficionados as one of the main distinguishing traits of different lens designs besides sharpness, distortion, etc.
edit: maybe it is an allusion to bubble plots?
A very large part of the vision is that we want to support accurate and useful visualization on large datasets. This is now encapsulated in the Datashader library (although it plays well with Bokeh itself): https://github.com/bokeh/datashader
If you are interested in this, we just did a webinar this week on Datashader, and demonstrate how to easily visualize billions of points through the browser, in a few seconds, on a single machine: https://continuum-analytics.wistia.com/medias/8zu9idwoym?mkt...
Your use of "subjective" is imprecise and overly relativistic. Just because something has to do with the human mind, or human experience, doesn't make that thing a priori subjective.
Here is a recent presentation showing Bokeh (from Python) along with data-shading to visualize billions of points quickly: http://www.slideshare.net/continuumio/visualizing-billions-o...
Here is another presentation showing integration of Bokeh with R to visualize geographical data from another group: http://ryanhafen.com/blog/rbokeh-gmap
0.11 and above releases of Bokeh contain a server that provides a very nice application model that can be synchronized between browser and server for allowing data scientists to build interactive plotting-based applications in the browser. Here are some simple examples of that: http://demo.bokehplots.com/
* R: https://github.com/bokeh/rbokeh * Scala: https://github.com/bokeh/bokeh-scala * Julia: https://github.com/bokeh/Bokeh.jl
The Facebook data science folks even implemented a small Bokeh wrapper in Lua, as part of their iTorch package: https://github.com/facebook/iTorch/blob/master/Plot.lua
So, you can see that you can get started with a basic wrapper, and then build up from there. The Lua wrapper is only ~850 lines. If you want to pop over to the mailing list or on our Github, we'd love to help you out.
For example, have a look at this cursory analysis of my Reddit comments that I did late last year. Getting the graphs to look nice felt like pulling teeth at the time.
http://nbviewer.jupyter.org/github/Niksko/redditCommentData/...
That being said, I'm reasonably happy with the results. And that pannable, zoomable line graph is pretty fancy and is easy to set up.
Does this statement mean it supports Py3 and if you want to use it with 2.7 you need Futures? Or is it only Py2.X? [0]
[0] http://bokeh.pydata.org/en/latest/docs/installation.html
To clarify, Futures is required for bokeh server as an extra dependency on Python 2.7 since it's not a battery included like for Python > 3.2.. if you conda install Bokeh it should be installed already for you. You can find more info about the bokeh server features here: http://bokeh.pydata.org/en/latest/docs/user_guide/server.htm... and here: http://bokeh.pydata.org/en/latest/docs/user_guide/cli.html#m...
Flexx, on other hand, is not required by bokeh server itself but instead to define python functions to handle interactivity that runs on the browser (no need of bokeh server). Flexx is used to convert python to JS. You can find more info here: http://bokeh.pydata.org/en/latest/docs/user_guide/interactio...
This is one of the first questions I ask, "is this code Python3 ready?", so I look at the install requirements first. Maybe I'm an edge case. A short cut might be just to say in big words, Python3 ready.
[0] For example this PIL fork, Pillow (python3) https://pillow.readthedocs.org/en/latest/installation.html
The first thing I looked for on the Bokeh website was some sort of clear statement on the front page about it being Python 3. I don't have an immediate need for it, but if it's Python 3, I'll keep it in mind. If it's just that euphemistic "Python", it may as well be Cobol for all I'd care.
I thought I'd skim over these comments just in case someone asked the obvious question, and someone did. (Thank you.) And, yes, it is apparently Python 3 enough that we wouldn't need to use any Python 2 if we adopted it.
Very nice. Now I wish I DID need it, but maybe I'll do a side project of my own with it, just for fun. I'll be keeping it in mind in any case. I'll bet "Python 3" is mentioned somewhere on the site, but I didn't spot it right away. It might be worth making it a bit more prominent, since it is an important feature for those designing for the future.
good point: a quick search reveals that Py2.x is still in a lot of legacy code (dependencies -- the big one), so I always check first:
- https://python3wos.appspot.com/
- http://stackoverflow.com/questions/30751668/python-2-vs-pyth...
- http://hiltmon.com/blog/2014/01/04/python-its-a-trap/
- https://blog.newrelic.com/2014/01/21/python-3-adoption-web-a...
- http://www.randalolson.com/2015/01/30/python-usage-survey-20...