bokeh

Bokeh hover tooltip to show data from a different column

喜夏-厌秋 提交于 2020-12-26 11:02:37
问题 I have the code below. I want the hover tooltip for the bars to show which account they are from. It is unclear to me how the hover.tooltips parameter should be used to retrieve data from the account column in the dataframe. import pandas as pd from bokeh.plotting import figure, output_notebook, show output_notebook() sales = [{'account': 'Jones LLC', 'sales': 150, 'day' : 1}, {'account': 'Alpha Co', 'sales': 200, 'day' : 2}, {'account': 'Blue Inc', 'sales': 50, 'day' : 3}] df = pd.DataFrame

Bokeh hover tooltip to show data from a different column

戏子无情 提交于 2020-12-26 11:02:06
问题 I have the code below. I want the hover tooltip for the bars to show which account they are from. It is unclear to me how the hover.tooltips parameter should be used to retrieve data from the account column in the dataframe. import pandas as pd from bokeh.plotting import figure, output_notebook, show output_notebook() sales = [{'account': 'Jones LLC', 'sales': 150, 'day' : 1}, {'account': 'Alpha Co', 'sales': 200, 'day' : 2}, {'account': 'Blue Inc', 'sales': 50, 'day' : 3}] df = pd.DataFrame

Include folium in bokeh tabs

主宰稳场 提交于 2020-12-15 09:09:18
问题 I would like to add a folium map to a bokeh tab. Is it possible? When I try i have an error like: expected an instance of type LayoutDOM, got folium of type map. Otherwise is there another way to do chart in python with map and include it in tab? Thank you :) 回答1: Bokeh has its own set of objects to represent the built-in widgets that it can display. Only these Bokeh objects can go inside Bokeh layouts like tab panes. However, one of the available widgets is Div, which let you put an HTML div

Include folium in bokeh tabs

試著忘記壹切 提交于 2020-12-15 09:07:51
问题 I would like to add a folium map to a bokeh tab. Is it possible? When I try i have an error like: expected an instance of type LayoutDOM, got folium of type map. Otherwise is there another way to do chart in python with map and include it in tab? Thank you :) 回答1: Bokeh has its own set of objects to represent the built-in widgets that it can display. Only these Bokeh objects can go inside Bokeh layouts like tab panes. However, one of the available widgets is Div, which let you put an HTML div

Is there a way to interactively turn off the legend in a python `Bokeh` plot

爱⌒轻易说出口 提交于 2020-12-12 12:05:12
问题 Hide legend in bokeh plot So I understand who to programmatically turn off the legend in a Bokeh plot, however I was wondering if there is a way to do this interactively? Sometimes I have a number of items in a plot legend, and the legend takes up lot of space or real estate. I was wondering if there is a way to click on the legend to hide it, or some such option? I know I can affect the legend visibility through the code: myPlot.legend.visible = False However I would to be able to turn the

Is there a way to interactively turn off the legend in a python `Bokeh` plot

ⅰ亾dé卋堺 提交于 2020-12-12 12:04:26
问题 Hide legend in bokeh plot So I understand who to programmatically turn off the legend in a Bokeh plot, however I was wondering if there is a way to do this interactively? Sometimes I have a number of items in a plot legend, and the legend takes up lot of space or real estate. I was wondering if there is a way to click on the legend to hide it, or some such option? I know I can affect the legend visibility through the code: myPlot.legend.visible = False However I would to be able to turn the

Is there a way to interactively turn off the legend in a python `Bokeh` plot

你说的曾经没有我的故事 提交于 2020-12-12 12:04:13
问题 Hide legend in bokeh plot So I understand who to programmatically turn off the legend in a Bokeh plot, however I was wondering if there is a way to do this interactively? Sometimes I have a number of items in a plot legend, and the legend takes up lot of space or real estate. I was wondering if there is a way to click on the legend to hide it, or some such option? I know I can affect the legend visibility through the code: myPlot.legend.visible = False However I would to be able to turn the

PyCon China 2020 演讲: Python 技术名词发音指南

戏子无情 提交于 2020-12-01 14:50:29
这是我在今年 PyCon China 的闪电演讲,不过没有 去年 那么闪电: Django 怎么读?十个 Python 程序员也许会有十种读法。如果这个你刚好会读的话,那么还有 Werkzeug、SQLAlchemy、Gunicorn、PyPI、Bokeh、Huey…… 根据可靠来源,因为错误的发音,两个 Python 程序员在交谈时平均每小时会浪费三分钟时间用来互相确认和纠正名词发音。为了减少整个 Python 社区因为错误的技术名词发音产生更多的熵,这个演讲带来了一个可信度 95% 的 Python 技术名词发音指南。 视频: YouTube | bilibili 幻灯片: http:// greyli.com/pronounce-py thon GitHub 仓库: https:// github.com/greyli/prono unce-python 耗时:47h 41m 幻灯片工具: Marpit 这是我第一次做线上直播形式的演讲,在提交演讲申请之后我一直在想不知道会有多少人在听。也一直在担心 Windows 会不会蓝屏,国产软件会不会弹广告。后来才知道可以提前录制,那就没什么好担心的了,所以你坐在屏幕前看到的我,当时也正坐在屏幕前看自己。 一共录了 9 遍,演讲前一晚匆匆录了最后一版,很努力也才把时长压缩到 15 分钟(要求 10 分钟长度和最多五分钟偏差),有点赶

Force update of bokeh widgets?

这一生的挚爱 提交于 2020-11-30 00:07:53
问题 I am new to bokeh and writing a small bokeh server app, which has plot and a button. When the button is pressed, data is recalculated and plot updates. The idea is that as soon as the button pressed, it changes the color and label, also a text "calculating..." appears. When calculations are done, plot updates and the text disappears. However, when button is pressed, it doesn't change color and the text does not appear before the calculations are done (takes several seconds). All this widget