Skip to content

Sync intro-to-bokeh with the updated tutorial - #871

Merged
realpython-bot merged 3 commits into
masterfrom
maintenance/python-data-visualization-bokeh-20261001
Dec 4, 2026
Merged

realpython-bot merged 3 commits into
masterfrom
maintenance/python-data-visualization-bokeh-20261001

Conversation

@realpython-bot

@realpython-bot realpython-bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Companion to the maintenance update of Interactive Data Visualization in Python With Bokeh (post 211).

What changed

  • bokeh-template.py, east-west-tabbed-layout.py: import TabPanel, Tabs from bokeh.models (Bokeh 3.0 renamed Panel to TabPanel and moved it out of bokeh.models.widgets); plot_width -> width.
  • first-figure.py: plot_height/plot_width -> height/width; drop the removed h_symmetry property.
  • first-glyphs.py: height/width; circle(size=...) -> scatter(size=...) (deprecated since Bokeh 3.4).
  • multiply-glyphs.py: height/width; legend= -> legend_label=.
  • README.md: Kaggle links moved to /datasets/pablote/nba-enhanced-stats (old paths 404).

These mirror exactly the code blocks fixed in the article draft. The rest of the snippets (CDSView filters, remaining plot_width/legend= uses) are still on the Bokeh 1.x API; the card is routed to a full update, which will port them.

Verification

  • bokeh-template.py, first-figure.py, first-glyphs.py, multiply-glyphs.py run cleanly on bokeh 3.10.0 / pandas 3.0.6 / Python 3.14.
  • east-west-tabbed-layout.py depends on figures from earlier snippets; its API (TabPanel, Tabs, .width) was exercised on bokeh 3.10.0 with stand-in figures.
  • uvx ruff@0.14.1 format --check intro-to-bokeh and uvx ruff@0.14.1 check intro-to-bokeh pass.

🤖 Generated with Claude Code


Full-update sync (2026-12-03)

Ported every remaining snippet to match the full update of the tutorial (draft: https://realpython.com/pbjt/blog/post/2448/change/, card: https://trello.com/c/DTytuQLG):

  • width/height, legend_label=, .scatter() (incl. marker="square"), CDSView(filter=...) with &-combined GroupFilters
  • step-line races and east-west-layout-prep.py use per-team ColumnDataSources (Bokeh 3 ignores views on connected glyphs); west-top-2-race-v1.py draws markers
  • pandas 3 fix in read-nba-data.py: groupby("name")[["play3PA", "play3PM"]].sum()
  • new requirements.txt pinned to the article (bokeh==3.10.2, numpy==2.5.5, pandas==3.1.2); README gets Setup/Usage sections and the article title

Verified: all 21 snippets run in article order in one namespace on Python 3.15.2 with the pinned versions (layout prep run before each layout snippet), with Bokeh validation errors and DeprecationWarnings treated as failures: 21/21 passed. ruff@0.14.1 check and format --check and dircheck.py pass.

🤖 Generated with Claude Code

realpython-bot and others added 3 commits October 1, 2026 06:23
…isualization in Python With Bokeh

Port the snippets fixed in the article draft to Bokeh 3.x (TabPanel/Tabs
from bokeh.models, width/height, legend_label, scatter) and point the
README's Kaggle links at the dataset's current URL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sync every snippet with the full update of the tutorial: width/height,
legend_label, scatter(), CDSView(filter=...), per-team ColumnDataSources
for step lines, pandas 3 groupby fix, and pinned requirements.txt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@realpython-bot
realpython-bot merged commit 98ee5e9 into master Dec 4, 2026
1 check passed
@realpython-bot
realpython-bot deleted the maintenance/python-data-visualization-bokeh-20261001 branch December 4, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant