Is Bokeh suitable for automatically rendering many charts per day?

Hello, new member here, and total Bokeh newbie.
More accurately, I have not even attained newbie status as I haven’t played
with Bokeh yet. I thought I would pick your collective brain to see if I
am in the right place.

I’m developing an application which will monitor daily
electricity use for businesses. I need to render relatively simple charts
(mainly area charts) every day, eventually thousands of them per day. They will
not be interactive charts, in fact I need to render them as PNG’s.

I currently use SQL Server’s Reporting Services to do this,
but it is way too slow for the volumes I’m talking about. So I’m thinking of
using Python and a chart library, which brought me to Bokeh.

As I said, the charts are not complicated, but I need
precise control over dimensions, colors, axis labels, things like that. And
most importantly, rendering must be fast.

Thank you in advance for any suggestions/advice.

Regards,

Dave

Hi Dave -

Let me try to answer your question in parts.

  • Customization: Bokeh should offer the level of customization that you’re interested in, from axis ticking and labels to plot sizing to colors.

  • PNG output: Currently Bokeh doesn’t generate pngs natively because it requires a browser engine to render onto HTML5 Canvas. We’re just starting work on this (I hope to be done by June), but a current workaround is to write the Bokeh html output to a file then use a npm CLI tool called PhantomJS to headlessly screenshot the file. This is actually how Bokeh does image diff-ing in it’s test suite. It’s up to you if you’re able to wait for this feature or figure out the CLI tool (it’s relatively straightforward and we could show you the way) or go with another python visualization library.

  • Fast rendering: generation the HTML is pretty fast (< 50ms?), but I think using the PhantomJS CLI (which uses the headless WebKit engine) to load the file, execute the JS and take a screenshot means that it may be ~1 sec/image. I don’t know what sort of performance you’re needing.

Let me know if that does or doesn’t answer your questions

-lukec

···

On Friday, April 14, 2017 at 9:16:37 PM UTC-3, Dave Krinkel wrote:

Hello, new member here, and total Bokeh newbie.
More accurately, I have not even attained newbie status as I haven’t played
with Bokeh yet. I thought I would pick your collective brain to see if I
am in the right place.

I’m developing an application which will monitor daily
electricity use for businesses. I need to render relatively simple charts
(mainly area charts) every day, eventually thousands of them per day. They will
not be interactive charts, in fact I need to render them as PNG’s.

I currently use SQL Server’s Reporting Services to do this,
but it is way too slow for the volumes I’m talking about. So I’m thinking of
using Python and a chart library, which brought me to Bokeh.

As I said, the charts are not complicated, but I need
precise control over dimensions, colors, axis labels, things like that. And
most importantly, rendering must be fast.

Thank you in advance for any suggestions/advice.

Regards,

Dave

Hi Luke, It would be great to see an example of this (rendering to png with phantom js) or point me in the right direction as you suggested.

···

On Tuesday, April 18, 2017 at 7:21:05 PM UTC-4, Luke Canavan wrote:

Hi Dave -

Let me try to answer your question in parts.

  • Customization: Bokeh should offer the level of customization that you’re interested in, from axis ticking and labels to plot sizing to colors.
  • PNG output: Currently Bokeh doesn’t generate pngs natively because it requires a browser engine to render onto HTML5 Canvas. We’re just starting work on this (I hope to be done by June), but a current workaround is to write the Bokeh html output to a file then use a npm CLI tool called PhantomJS to headlessly screenshot the file. This is actually how Bokeh does image diff-ing in it’s test suite. It’s up to you if you’re able to wait for this feature or figure out the CLI tool (it’s relatively straightforward and we could show you the way) or go with another python visualization library.
  • Fast rendering: generation the HTML is pretty fast (< 50ms?), but I think using the PhantomJS CLI (which uses the headless WebKit engine) to load the file, execute the JS and take a screenshot means that it may be ~1 sec/image. I don’t know what sort of performance you’re needing.

Let me know if that does or doesn’t answer your questions

-lukec

On Friday, April 14, 2017 at 9:16:37 PM UTC-3, Dave Krinkel wrote:

Hello, new member here, and total Bokeh newbie.
More accurately, I have not even attained newbie status as I haven’t played
with Bokeh yet. I thought I would pick your collective brain to see if I
am in the right place.

I’m developing an application which will monitor daily
electricity use for businesses. I need to render relatively simple charts
(mainly area charts) every day, eventually thousands of them per day. They will
not be interactive charts, in fact I need to render them as PNG’s.

I currently use SQL Server’s Reporting Services to do this,
but it is way too slow for the volumes I’m talking about. So I’m thinking of
using Python and a chart library, which brought me to Bokeh.

As I said, the charts are not complicated, but I need
precise control over dimensions, colors, axis labels, things like that. And
most importantly, rendering must be fast.

Thank you in advance for any suggestions/advice.

Regards,

Dave