Bokeh 简明教程

Bokeh - Introduction

Bokeh是Python的数据可视化库。与Matplotlib和Seaborn不同,它们也是用于数据可视化的Python包,Bokeh使用HTML和JavaScript渲染其图。因此,事实证明对于开发基于Web的仪表板非常有用。

Bokeh is a data visualization library for Python. Unlike Matplotlib and Seaborn, they are also Python packages for data visualization, Bokeh renders its plots using HTML and JavaScript. Hence, it proves to be extremely useful for developing web based dashboards.

Bokeh项目由NumFocus https://numfocus.org/. 赞助。 NumFocus还支持PyData,这是一个教育计划,涉及NumPy、Pandas等其他重要工具的开发。 Bokeh可以轻松地与这些工具连接并生成交互式图、仪表板和数据应用程序。

The Bokeh project is sponsored by NumFocus https://numfocus.org/. NumFocus also supports PyData, an educational program, involved in development of other important tools such as NumPy, Pandas and more. Bokeh can easily connect with these tools and produce interactive plots, dashboards and data applications.

Features

Bokeh主要将数据源转换为JSON文件,该文件用作JavaScript库BokehJS的输入,而JavaScript库又用TypeScript编写并渲染现代浏览器中的可视化效果。

Bokeh primarily converts the data source into a JSON file which is used as input for BokehJS, a JavaScript library, which in turn is written in TypeScript and renders the visualizations in modern browsers.

以下是一些 important features of Bokeh

Some of the important features of Bokeh are as follows −

Flexibility

Bokeh可用于常见绘图要求以及自定义和复杂的使用案例。

Bokeh is useful for common plotting requirements as well as custom and complex use-cases.

Productivity

Bokeh可以轻松地与其他流行的Pydata工具(如Pandas和Jupyter笔记本)进行交互。

Bokeh can easily interact with other popular Pydata tools such as Pandas and Jupyter notebook.

Interactivity

与Matplotlib和Seaborn相比,这是Bokeh的一项重要优势,它们都生成静态图。 Bokeh创建交互式图,当用户与它们交互时会发生变化。您可以为您的受众提供广泛的选择和工具,以便从各个角度推理和查看数据,以便用户可以执行“假设”分析。

This is an important advantage of Bokeh over Matplotlib and Seaborn, both produce static plots. Bokeh creates interactive plots that change when the user interacts with them. You can give your audience a wide range of options and tools for inferring and looking at data from various angles so that user can perform “what if” analysis.

Powerful

通过添加自定义JavaScript,可以生成针对特定用例的可视化效果。

By adding custom JavaScript, it is possible to generate visualizations for specialised use-cases.

Sharable

图形可以嵌入在启用了 FlaskDjango 的 Web 应用程序的输出中。它们也可以在以下应用程序中呈现:

Plots can be embedded in output of Flask or Django enabled web applications. They can also be rendered in

Jupyter

Open source

Bokeh 是一个开源项目。它根据伯克利源代码分发 (BSD) 许可证进行分发。其源代码可从 https://github.com/bokeh/bokeh. 获取

Bokeh is an open source project. It is distributed under Berkeley Source Distribution (BSD) license. Its source code is available on https://github.com/bokeh/bokeh.