Hi Andrew.
OK, so in your early post you said “… without ,hopefully, having to use any POST/GET requests.”
This is possible. Whether it will take down your browser will depend on how big all your data is.
If we do it like this, then you won’t need blaze server. So it’s probably worth trying to do it like this as it’ll get the foundations of all the plots in place and then you can work out a more dynamic data source if it’s needed for performance.
Toggle plots on and off:
Displaying plots:
-
Bokeh has gridplit, vplot, hplot. They’re great, but tweaking the layout can be a bit fiddly.
-
Happily, https://github.com/bokeh/bokeh/issues/2348 which I believe is actively being worked on may provide a really nice way to get out all your plots but be able to lay them out however you like
Updating the source data:
-
To do this all client side, I suggest you use a technique similar to what I have done here which also documents what I’ve done.
-
You will be using 4 Select widgets instead of a Slider, but it’s exactly the same principle.
-
The heart of this is building a series of ColumnDataSources python side ahead of time. In your case I imagine it would be one per station. You pass all these into your plot via a callback so that they’re available client side.
-
Then you have a separate ColumnDataSource that is driving your plot(s). When the select box updates, you switch the ‘data’ property for the ColumnDataSource that’s driving your plot to the correct one from your bank that’s all ready to go.
-
In your case I imagine that you will have one or more data sources for your plots. If you use one source for all your plots then you will be able to use shared selection features, (but it may be that the data needs to be differently shaped for different plots and trying to share a source will cause you problems). I suggest you start with a series of plots that can share a data source e.g. histogram may be a problem.
With all that, you should be good to go!
How big is all that data btw?
Best,
Bird
···
On Thu, Jun 11, 2015 at 1:41 AM, Andrew Joros andrew.joros@gmail.com wrote:
Sounds good, looking forward to it. I’ll continue reading/trying/breaking … 
On Wednesday, June 10, 2015 at 5:37:11 PM UTC-7, Sarah Bird wrote:
blaze - yes - it’s not something I’ve used and feel well equipped to comment on, but does seem relevant.
will ping back in the morning.
On Thu, Jun 11, 2015 at 1:30 AM, Andrew Joros andrew...@gmail.com wrote:
Correct,
Regarding #1:
- Yes, Sometimes we want plots showing p1 vs. p2 … or p1 vs. w3 … or p2 vs. w5 etc. etc.
- For now, and to keep it simple, we can just play with the same variable types (e.g. p1 vs. p2, p1 vs. p3, etc.)
- And yes sometimes the “views” wont be the same in the future. We may be comparing say temperature to precipitation. Maybe a dual y-axis here would be useful?
Regarding #2: Yes, to keep it simple, for now I only want to source two variables at once ( e.g. p1 vs. p3 ) … In the future we can worry about n-data streams.
Looking forward to hearing you input. I am reading up on Continuum’s Blaze package as it may be useful for what I have in mind.
Sleep well Sarah, and thanks again!
On Wednesday, June 10, 2015 at 5:21:15 PM UTC-7, Sarah Bird wrote:
So lets say:
Time series 1 - Precipitation (p) from Station 1 - p1
Time series 2 - Preciptation (p) from Station 3 - p3
I’m assuming that:
- if Precipiation is p and, say, Wind speed is w, then sometimes you may want to plot p1 and w3 (that is, it’s not always “the precipitation view” or “the windspeed view”)
- In the near-term you only want to source from two data streams (e.g. p1 & w3) and not n-data streams
On Thu, Jun 11, 2015 at 12:59 AM, Andrew Joros andrew...@gmail.com wrote:
Sarah
To keep it simple for now, I would like to focus on just comparing two variables.
So Part 1:
- From a multi-tiered drop down menu: User chooses Precipitation from Station 1
- From another multi-tiered drop down menu: User Precipitation from Station 3
- A multi-line timeseries plot populates with Time on X-axis , Precip on Y-axis, and Weather Station (2 different colors in this case)
Part 2:
- The statistical plots will be all about precipitation in this case
- Each stats subplot, located under main timeseries plot
- Give the option to toggle certain plots on/off
I drew a really quick (ugly IMO) sketch but should give some idea of what I am looking for: http://imgur.com/diGaCq9
Thx
On Wednesday, June 10, 2015 at 4:26:25 PM UTC-7, Sarah Bird wrote:
To clarify (this might take some back and forth)
Lets take a simple example first and build up. Let me know where I’m getting it wrong.
Part 1
Lets say you have the column “precipitation” - you have that data for 13 seperate weather stations.
You expect to be able to select precipitation and a line graph shows up with each of the 13 different weather stations as different line.
Is this right? If so we now have data in 3 dimensions (time (x), precipitation (y), weather station (color)).
Part 2
The statistical plots - are they all about precipitation in the 13 different weather stations - i.e. correlating precipitation in 13 different centers or are they bringing in new dimensions?
FWIW - A mock-up might help. Just a few rough sketches.
On Thu, Jun 11, 2015 at 12:05 AM, Andrew Joros andrew...@gmail.com wrote:
Sarah,
No worries. We are all busy with work, I understand.
Yes, the stocks example does cover quite a bit which include:
- Drop down menu capability
- Scatter plot of correlation
- Statistical output onscreen
- Histograms
- Individual time series (Although I would like these to be all on one plot)
The bits that don’t work for me (which I don’t see examples for):
- Multi-tiered drop down menus
- I currently have a POSTGRES database with 13 tables and each table has 63 columns. Each column represents a different variable (Temp, Relative Humidity, Precipitation, etc.). Each table is different weather station.
- I would like to be able to inter-compare between stations/variables
- What is the best way to query this data and have it function with bokeh-server without too much response time lag. I am not positive if I am thinking of this in the correct way which is why I need input

- Being able to toggle certain plots on/off. (e.g. turn off correlation plot and turn on histogram plot, etc.)
I have more questions but this is a good place to start.
Let me know if this makes sense to you.
Thanks for your help
On Wednesday, June 10, 2015 at 1:59:50 PM UTC-7, Sarah Bird wrote:
Hi Andrew,
Sorry for not replying to your first post.
The short answer, is I do not know of an example exactly like that.
Have you seen the stocks example: http://bokeh.pydata.org/en/latest/docs/server_gallery/stocks_server.html
It seems to me, that this covers a lot of what you’ve asked for. The only difference being that the main plot is a scatter instead of a mult-line.
However, I may well be missing some points.
Can you tell me what bits of the stocks example do and don’t work for you.
Sincerely,
Sarah Bird
On Wed, Jun 10, 2015 at 8:10 PM, Andrew Joros andrew...@gmail.com wrote:
Hi all,
I realize my last post was not that detailed and so I’d like to describe my example request in a little more detail:
Do you know of a working example or if it’s possible to:
- Create a multi-line time series from different variables via drop down menus which will be linked to a database (in my case POSTGRES read in using Pandas? [not sure if this is best way]). I am using various meteorological data similar to you.
- Auto-create stats plots (e.g. histograms, scatterplots, correlation coef, PDFs, CDFs, etc.) below the aforementioned multi-line time series plot.
- Give the ability to subset the time series data (via box select, lasso etc.) and view the resultant subset in stats plots below the main time series plots.
I am looking for the best way to tackle these 63+ variables and to be able to compare/contrast them all on one webpage without ,hopefully, having to use any POST/GET requests.
Thx!
On Tuesday, June 9, 2015 at 2:54:23 AM UTC-7, Andrew Joros wrote:
Hi all,
Been searching around without much luck so I thought I’d ask here. Does anyone know of a working example of a bokeh-server plot where there exists a multi-line time series and below that timeseries are various statistical plots based on the multi-line time series selection?
The statistical plots can be histograms, scatterplots, correlation coef, PDFs, CDFs, etc. My idea is to also be able to select/unselect (via checkbox) different variables and compare/constrast these variables on-the-fly using a bokeh-server.
Thanks for any and all input.
AJ
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+un...@continuum.io.
To post to this group, send email to bo...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/3a95374b-5efd-4c82-8ee7-ff182d0b8b41%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+un...@continuum.io.
To post to this group, send email to bo...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/3745afcb-4571-403d-8261-52ad967284ae%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+un...@continuum.io.
To post to this group, send email to bo...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/8f5e1d9f-548d-4589-aa5b-d22bcceee928%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+un...@continuum.io.
To post to this group, send email to bo...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/99e42076-80b5-4bb2-a01b-3557e80ca3dd%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/71e8797e-8b7c-4b0c-920e-807850efe46e%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.