Bokeh数据动态可视化(安装)

发布时间:2021-12-03 公开文章

引子

Bokeh是一个交互式可视化库,针对现代web浏览器进行显示。它的目标是提供优雅、简洁的通用图形构造,并在非常大的或流数据集上以高性能的交互性扩展这种能力。Bokeh可以帮助任何想要快速轻松地创建交互式图表、仪表板和数据应用程序。

http://bokeh.pydata.org/en/latest/docs/installation.htmlInstallation - Bokeh 1.0.2 documentationInstallation - Bokeh 1.0.2 documentation

 

 

 

1.

 

 

最初使用的是0.12.3,现在已经到了1.0.3,一直有打算整理自己在数据可视化过程中遇到的一些坑(不止于Bokeh),将在接下来文章文中加粗文字提示,这次顺便再学习一下官方文档。

安装

 

如果您已经是 anaconda 用户, 则只需运行以下命令:

conda install bokeh

或者, 也可以使用pip pip 进行安装:

pip install bokeh

样本数据

>>> import bokeh.sampledata
>>> bokeh.sampledata.download()

下载样本数据集需要自带梯子。

验证安装是否成功

from bokeh.plotting import figure, output_file, show
output_file("test.html")
p = figure()
p.line([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], line_width=2)
show(p)