Bokeh - Web ブラウザー用のインタラクティブなビジュアライゼーション視覚エフェクト Python ライブラリ
インストール
$ pip install bokeh
Collecting bokeh Downloading bokeh-3.1.1-py3-none-any.whl (8.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.3/8.3 MB 1.4 MB/s eta eta 0:00:00 Collecting Jinja2>=2.9 (from bokeh) Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 798.1 kB/s eta 0:00:00 Collecting contourpy>=1 (from bokeh) Downloading contourpy-1.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (299 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 300.0/300.0 kB 918.1 kB/s eta 0:00:00 Collecting numpy>=1.16 (from bokeh) Downloading numpy-1.24.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 2.2 MB/s eta 0:00:00 Collecting packaging>=16.8 (from bokeh) Downloading packaging-23.1-py3-none-any.whl (48 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.9/48.9 kB 418.5 kB/s eta 0:00:00 Collecting pandas>=1.2 (from bokeh) Downloading pandas-2.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.2/12.2 MB 2.1 MB/s eta 0:00:00 Collecting pillow>=7.1.0 (from bokeh) Downloading Pillow-9.5.0-cp311-cp311-manylinux_2_28_x86_64.whl (3.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 1.8 MB/s eta 0:00:00 Collecting PyYAML>=3.10 (from bokeh) Downloading PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (757 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 757.9/757.9 kB 1.9 MB/s eta 0:00:00 Collecting tornado>=5.1 (from bokeh) Downloading tornado-6.3.2-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (426 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 426.9/426.9 kB 1.4 MB/s eta 0:00:00 Collecting xyzservices>=2021.09.1 (from bokeh) Downloading xyzservices-2023.2.0-py3-none-any.whl (55 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.4/55.4 kB 671.1 kB/s eta 0:00:00 Collecting MarkupSafe>=2.0 (from Jinja2>=2.9->bokeh) Downloading MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27 kB) Collecting python-dateutil>=2.8.2 (from pandas>=1.2->bokeh) Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 991.9 kB/s eta 0:00:00 Collecting pytz>=2020.1 (from pandas>=1.2->bokeh) Downloading pytz-2023.3-py2.py3-none-any.whl (502 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 502.3/502.3 kB 1.6 MB/s eta 0:00:00 Collecting tzdata>=2022.1 (from pandas>=1.2->bokeh) Downloading tzdata-2023.3-py2.py3-none-any.whl (341 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 341.8/341.8 kB 1.5 MB/s eta 0:00:00 Collecting six>=1.5 (from python-dateutil>=2.8.2->pandas>=1.2->bokeh) Downloading six-1.16.0-py2.py3-none-any.whl (11 kB) Installing collected packages: pytz, xyzservices, tzdata, tornado, six, PyYAML, pillow, packaging, numpy, MarkupSafe, python-dateutil, Jinja2, contourpy, pandas, bokeh Successfully installed Jinja2-3.1.2 MarkupSafe-2.1.2 PyYAML-6.0 bokeh-3.1.1 contourpy-1.0.7 numpy-1.24.3 packaging-23.1 pandas-2.0.1 pillow-9.5.0 python-dateutil-2.8.2 pytz-2023.3 six-1.16.0 tornado-6.3.1 tzdata-2023.3 xyzservices-2023.2.0
JupyterLab で利用する場合
公式: Jupyter — Bokeh 3.1.1 Documentation 翻訳
サンプル: bokeh/bokeh/blob/3.1.1/examples/server/api/notebook_embed.ipynb
$ pip install jupyter_bokeh
Collecting jupyter_bokeh Downloading jupyter_bokeh-3.0.7-py3-none-any.whl (1.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 2.0 MB/s eta 0:00:00 Collecting bokeh==3.* (from jupyter_bokeh) Downloading bokeh-3.1.1-py3-none-any.whl (8.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.3/8.3 MB 2.7 MB/s eta 0:00:00 Collecting ipywidgets==8.* (from jupyter_bokeh) Downloading ipywidgets-8.0.6-py3-none-any.whl (138 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 138.3/138.3 kB 1.6 MB/s eta 0:00:00 Collecting Jinja2>=2.9 (from bokeh==3.*->jupyter_bokeh) Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 1.1 MB/s eta 0:00:00 Collecting contourpy>=1 (from bokeh==3.*->jupyter_bokeh) Downloading contourpy-1.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (299 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 300.0/300.0 kB 3.0 MB/s eta 0:00:00 Collecting numpy>=1.16 (from bokeh==3.*->jupyter_bokeh) Downloading numpy-1.24.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 3.4 MB/s eta 0:00:00 Collecting packaging>=16.8 (from bokeh==3.*->jupyter_bokeh) Downloading packaging-23.1-py3-none-any.whl (48 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.9/48.9 kB 513.4 kB/s eta 0:00:00 Collecting pandas>=1.2 (from bokeh==3.*->jupyter_bokeh) Downloading pandas-2.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.2/12.2 MB 834.1 kB/s eta 0:00:00 Collecting pillow>=7.1.0 (from bokeh==3.*->jupyter_bokeh) Downloading Pillow-9.5.0-cp311-cp311-manylinux_2_28_x86_64.whl (3.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 883.8kB/s eta 0:00:00 Collecting PyYAML>=3.10 (from bokeh==3.*->jupyter_bokeh) Downloading PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (757 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 757.9/757.9 kB 796.8 kB/s eta 0:00:00 Collecting tornado>=5.1 (from bokeh==3.*->jupyter_bokeh) Downloading tornado-6.3.2-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (426 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 426.9/426.9 kB 836.5 kB/s eta 0:00:00 Collecting xyzservices>=2021.09.1 (from bokeh==3.*->jupyter_bokeh) Downloading xyzservices-2023.2.0-py3-none-any.whl (55 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.4/55.4 kB 526.0 kB/s eta 0:00:00 Collecting ipykernel>=4.5.1 (from ipywidgets==8.*->jupyter_bokeh) Downloading ipykernel-6.23.1-py3-none-any.whl (152 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 152.2/152.2 kB 768.8 kB/s eta 0:00:00 Collecting ipython>=6.1.0 (from ipywidgets==8.*->jupyter_bokeh) Downloading ipython-8.13.2-py3-none-any.whl (797 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 797.7/797.7 kB 989.4 kB/s eta 0:00:00 Collecting traitlets>=4.3.1 (from ipywidgets==8.*->jupyter_bokeh) Downloading traitlets-5.9.0-py3-none-any.whl (117 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 117.4/117.4 kB 894.5 kB/s eta 0:00:00 Collecting widgetsnbextension~=4.0.7 (from ipywidgets==8.*->jupyter_bokeh) Downloading widgetsnbextension-4.0.7-py3-none-any.whl (2.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 1.2 MB/s eta 0:00:00 Collecting jupyterlab-widgets~=3.0.7 (from ipywidgets==8.*->jupyter_bokeh) Downloading jupyterlab_widgets-3.0.7-py3-none-any.whl (198 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 198.2/198.2 kB 930.9 kB/s eta 0:00:00 Collecting comm>=0.1.1 (from ipykernel>=4.5.1->ipywidgets==8.*->jupyter_bokeh) Downloading comm-0.1.3-py3-none-any.whl (6.6 kB) Collecting debugpy>=1.6.5 (from ipykernel>=4.5.1->ipywidgets==8.*->jupyter_bokeh) Downloading debugpy-1.6.7-py2.py3-none-any.whl (4.9 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.9/4.9 MB 2.3 MB/s eta 0:00:00 Collecting jupyter-client>=6.1.12 (from ipykernel>=4.5.1->ipywidgets==8.*->jupyter_bokeh) Downloading jupyter_client-8.2.0-py3-none-any.whl (103 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 103.2/103.2 kB 1.2 MB/s eta 0:00:00 Collecting jupyter-core!=5.0.*,>=4.12 (from ipykernel>=4.5.1->ipywidgets==8.*->jupyter_bokeh) Downloading jupyter_core-5.3.0-py3-none-any.whl (93 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 93.2/93.2 kB 694.0 kB/s eta 0:00:00 Collecting matplotlib-inline>=0.1 (from ipykernel>=4.5.1->ipywidgets==8.*->jupyter_bokeh) Downloading matplotlib_inline-0.1.6-py3-none-any.whl (9.4 kB) Collecting nest-asyncio (from ipykernel>=4.5.1->ipywidgets==8.*->jupyter_bokeh) Downloading nest_asyncio-1.5.6-py3-none-any.whl (5.2 kB) Collecting psutil (from ipykernel>=4.5.1->ipywidgets==8.*->jupyter_bokeh) Downloading psutil-5.9.5-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (282 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 282.1/282.1 kB 1.5 MB/s eta 0:00:00 Collecting pyzmq>=20 (from ipykernel>=4.5.1->ipywidgets==8.*->jupyter_bokeh) Downloading pyzmq-25.0.2-cp311-cp311-manylinux_2_28_x86_64.whl (1.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 2.8 MB/s eta 0:00:00 Collecting backcall (from ipython>=6.1.0->ipywidgets==8.*->jupyter_bokeh) Downloading backcall-0.2.0-py2.py3-none-any.whl (11 kB) Collecting decorator (from ipython>=6.1.0->ipywidgets==8.*->jupyter_bokeh) Downloading decorator-5.1.1-py3-none-any.whl (9.1 kB) Collecting jedi>=0.16 (from ipython>=6.1.0->ipywidgets==8.*->jupyter_bokeh) Downloading jedi-0.18.2-py2.py3-none-any.whl (1.6 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 2.4 MB/s eta 0:00:00 Collecting pickleshare (from ipython>=6.1.0->ipywidgets==8.*->jupyter_bokeh) Downloading pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB) Collecting prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30 (from ipython>=6.1.0->ipywidgets==8.*->jupyter_bokeh) Downloading prompt_toolkit-3.0.38-py3-none-any.whl (385 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 385.8/385.8 kB 1.8 MB/s eta 0:00:00 Collecting pygments>=2.4.0 (from ipython>=6.1.0->ipywidgets==8.*->jupyter_bokeh) Downloading Pygments-2.15.1-py3-none-any.whl (1.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1MB 2.4 MB/s eta 0:00:00 Collecting stack-data (from ipython>=6.1.0->ipywidgets==8.*->jupyter_bokeh) Downloading stack_data-0.6.2-py3-none-any.whl (24 kB) Collecting pexpect>4.3 (from ipython>=6.1.0->ipywidgets==8.*->jupyter_bokeh) Downloading pexpect-4.8.0-py2.py3-none-any.whl (59 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.0/59.0 kB 514.4 kB/s eta 0:00:00 Collecting MarkupSafe>=2.0 (from Jinja2>=2.9->bokeh==3.*->jupyter_bokeh) Downloading MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (27 kB) Collecting python-dateutil>=2.8.2 (from pandas>=1.2->bokeh==3.*->jupyter_bokeh) Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 1.4 MB/s eta 0:00:00 Collecting pytz>=2020.1 (from pandas>=1.2->bokeh==3.*->jupyter_bokeh) Downloading pytz-2023.3-py2.py3-none-any.whl (502 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 502.3/502.3 kB 2.4 MB/s eta 0:00:00 Collecting tzdata>=2022.1 (from pandas>=1.2->bokeh==3.*->jupyter_bokeh) Downloading tzdata-2023.3-py2.py3-none-any.whl (341 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 341.8/341.8 kB 1.8 MB/s eta 0:00:00 Collecting parso<0.9.0,>=0.8.0 (from jedi>=0.16->ipython>=6.1.0->ipywidgets==8.*->jupyter_bokeh) Downloading parso-0.8.3-py2.py3-none-any.whl (100 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.8/100.8 kB 1.1 MB/s eta 0:00:00 Collecting platformdirs>=2.5 (from jupyter-core!=5.0.*,>=4.12->ipykernel>=4.5.1->ipywidgets==8.*->jupyter_bokeh) Downloading platformdirs-3.5.1-py3-none-any.whl (15 kB) Collecting ptyprocess>=0.5 (from pexpect>4.3->ipython>=6.1.0->ipywidgets==8.*->jupyter_bokeh) Downloading ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB) Collecting wcwidth (from prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30->ipython>=6.1.0->ipywidgets==8.*->jupyter_bokeh) Downloading wcwidth-0.2.6-py2.py3-none-any.whl (29 kB) Collecting six>=1.5 (from python-dateutil>=2.8.2->pandas>=1.2->bokeh==3.*->jupyter_bokeh) Downloading six-1.16.0-py2.py3-none-any.whl (11 kB) Collecting executing>=1.2.0 (from stack-data->ipython>=6.1.0->ipywidgets==8.*->jupyter_bokeh) Downloading executing-1.2.0-py2.py3-none-any.whl (24 kB) Collecting asttokens>=2.1.0 (from stack-data->ipython>=6.1.0->ipywidgets==8.*->jupyter_bokeh) Downloading asttokens-2.2.1-py2.py3-none-any.whl (26 kB) Collecting pure-eval (from stack-data->ipython>=6.1.0->ipywidgets==8.*->jupyter_bokeh) Downloading pure_eval-0.2.2-py3-none-any.whl (11 kB) Installing collected packages: wcwidth, pytz, pure-eval, ptyprocess, pickleshare, executing, backcall, xyzservices, widgetsnbextension, tzdata, traitlets, tornado, six, pyzmq, PyYAML, pygments, psutil, prompt-toolkit, platformdirs, pillow, pexpect, parso, packaging, numpy, nest-asyncio, MarkupSafe, jupyterlab-widgets, decorator, debugpy, python-dateutil, matplotlib-inline, jupyter-core, Jinja2, jedi, contourpy, comm, asttokens, stack-data, pandas, jupyter-client, ipython, bokeh, ipykernel, ipywidgets, jupyter_bokeh Successfully installed Jinja2-3.1.2 MarkupSafe-2.1.2 PyYAML-6.0 asttokens-2.2.1 backcall-0.2.0 bokeh-3.1.1 comm-0.1.3 contourpy-1.0.7 debugpy-1.6.7 decorator-5.1.1 executing-1.2.0 ipykernel-6.23.1 ipython-8.13.2 ipywidgets-8.0.6 jedi-0.18.2 jupyter-client-8.2.0 jupyter-core-5.3.0 jupyter_bokeh-3.0.7 jupyterlab-widgets-3.0.7 matplotlib-inline-0.1.6 nest-asyncio-1.5.6 numpy-1.24.3 packaging-23.1 pandas-2.0.1 parso-0.8.3 pexpect-4.8.0 pickleshare-0.7.5 pillow-9.5.0 platformdirs-3.5.1 prompt-toolkit-3.0.38 psutil-5.9.5 ptyprocess-0.7.0 pure-eval-0.2.2 pygments-2.15.1 python-dateutil-2.8.2 pytz-2023.3 pyzmq-25.0.2 six-1.16.0 stack-data-0.6.2 tornado-6.3.2 traitlets-5.9.0 tzdata-2023.3 wcwidth-0.2.6 widgetsnbextension-4.0.7 xyzservices-2023.2.0