Get URL for individual figure from Bokeh Server - bokeh

I have a Bokeh server application where each page has a few different figures.
Is there a way to get a separate URL for each plot individually? I'm happy to specify id's for my bokeh figures if that helps.

As of Bokeh 0.13.0, no, there is not.

Related

Is there a method to find the plot graph data in a web page?

I'm not a web developer, so please bear me.
https://www.etoro.com/people/hyjbrighter/chart
I know that there are several libraries to plot graph in Javascript but how can I check if a specific page is using highchart or another competitor?
I expect to find some kind of Json in the source code but how can I find it?
The trick is to open the Network tab of Dev Tools, reload the page, and search for the piece of data that you want to scrape. Here I saw a number is 21361.15, I searched for it and detected the JSON file is from https://www.etoro.com/sapi/userstats/CopySim/Username/hyjbrighter/OneYearAgo?callback=angular.callbacks._0&client_request_id=2ce991a6-0943-4111-abd3-6906ca92e45c.
But you need to clear the parameters in this situation to actually get the proper information.
I don't know which language you use, if you use Python, here is the code:
import requests
import pandas
data = requests.get("https://www.etoro.com/sapi/userstats/CopySim/Username/hyjbrighter/OneYearAgo").json()['simulation']['oneYearAgo']['chart']
data = pandas.DataFrame(data)
print(data)
Output:
If you use R, use jsonlite package.

Exporting wazuh graphs

Let me start by saying that I am not very familiar with wazuh and kibana.
I am creating a web application in Angular and it is required for me to embed wazuh charts in it.
Example chart that I need to export:
I have been told that it is possible to do it but not how to do it. I am thinking about pulling the data from API and recreating the graphs. In order to do that I was trying to figure out what library was used in wazuh to create the original graphs but I failed. Do you know the library that is used to generate those graphs? Or maybe if it is proprietary solution? Maybe you know a better way to embed those graphs in a web application?
If you need to import the Alerts level evolution graph you may recreate it by creating a custom visualization. Click on the top left menu and go to the Visualize section. Select the type of graph, an area graph in this case, and select the source, for example wazuh-alerts-*.
Add a bucket for the X axis with Date Histogram using the timestamp field, add a sub-bucket with Split series, sub aggregation Terms and field rule.level.
Once you have created and saved the visualization you may click on Share, Embed code and copy an iframe that you can paste into your application.
You can also import full dashboards with several visualizations by creating and sharing a custom Dashboard instead.

Using Bokeh chart interactions in Jupyter / IPython notebook

I have a Bokeh chart in a Jupyter notebook, and I want to run custom Python whenever the Bokeh selection changes. It is very easy to run custom Javascript whenever the Bokeh selection changes using a source change callback, but I have no way to trigger Jupyter to respond to the event.
I think it is possible but poorly documented (see http://docs.bokeh.org/en/latest/docs/user_guide/server.html) to run a separate Bokeh server to receive the events. I want to avoid running a separate Bokeh server since the Jupyter server is already running.
I think you have to look at holoview.
It is design for this. You can choose between different renderers : matpotlib, bokeh, plotly.
You can either use their methodology for simple plots or if it is more specific you can run bokeh apps.
As you can see almost all examples of bokeh are ported to holoviews
Regards
This seems like a two-way communication between Bokeh object and Jupyter: https://docs.bokeh.org/en/latest/docs/user_guide/jupyter.html#notebook-handles
Import standard functions and push_notebook()
Create some plots and pass notebook_handle=True to show()
Check that the handle is associated with the output cell
Update some properties of the plot, then call push_notebook() with the handle
Note that the output cell has changed (without being re-executed)
You might have to poll the variable you want to catch changing, as this does not look like an event handler, just mutual exposure.

Can I do data visualization with Drupal?

Basically i want it to import data from a SQL database and Display it as graphs. Having said that i also want it to be dynamic,responsive as in the users should have filtering options. Any leads would be definitely helpful.
Please note that i am just a beginner with drupal.
Yes, But I recommend you to work on your own framework. Or even you can use some data visualization framework
Maybe this one is useful for you if you want to do it on your own:
http://www.sitepoint.com/twelve-javascript-libraries-data-visualization/
Why do you need Drupal for that?
I would make some PHP script which would read SQL and generate image out of that data, by using GD or ImageMagic lib. I guess you know that PHP can shoot out image file header and dynamically generate image, on fly. That PHP script could also read filter parameters to have influence on generated image.

How to build tree diagrams in bokeh

What would it take to implement a tree diagram in bokeh? Something similar to this DS example would be nice --
http://bl.ocks.org/robschmuecker/7880033
I'm just looking to visualize a data structure, so only need the pan, zoom, and collapse functionality.
Thanks!
- AH
There is nothing in Bokeh to do this automatically. Bokeh does now support network/graph support, which it did not at the time the question was originally posted:
https://docs.bokeh.org/en/latest/docs/user_guide/graph.html
However, it would take some work to use this to reproduce the link above:
non straight-line edges would need to be computed explicitly
nodes/edges would have to be hidden manually based on TapTool events
Additionally there is no "smooth animation" option yet (as of Bokeh 0.13.0) so the transitions would be instant.
If the idea is to have this sort of capability along side other Bokeh plots, or to connect it to Python backend code, then another option is to write a custom extension for Bokeh:
https://docs.bokeh.org/en/latest/docs/user_guide/extensions.html
This would take some up-front work, but doing this, you could integrate the fancy D3 widget directly into Bokeh documents, and use it like, and connect it to, any other Bokeh component or widget.

Resources