Writing
Building an Interactive Dashboard in a Jupyter Notebook
You don't need a separate BI tool to explore data interactively — ipywidgets gets you dropdowns, buttons, and live updating charts right inside the notebook.
Jupyter notebooks are usually static: run a cell, look at a chart, edit code, re-run. For quick exploration, that’s fine. But sometimes you want something closer to a real dashboard — pick a value, see the numbers update — without leaving the notebook or standing up a separate app.
ipywidgets gets you there. Using a League of Legends champion stats
dataset as an example:
- Load and clean the data — read the CSV with pandas, check for missing values, drop rows for champions with zero picks or presence (they’d just clutter the output).
- Fix the types — some columns come in as percentage strings
(
"52.3%"); convert them to floats so they’re usable in calculations and charts. - Build the controls — a dropdown of champion names and a refresh
button, wired up with
ipywidgets. - Wire the callback — when the dropdown changes, a function looks up that champion’s picks, bans, wins, and losses, and redraws a bar chart with matplotlib.
The result: pick any champion from the dropdown and the stats and chart update instantly, all inside the notebook — no separate dashboarding tool required.
This pattern generalizes past League of Legends stats — anywhere you’re exploring a dataset interactively and don’t want the overhead of a full BI tool, a notebook with a few widgets gets you most of the way there.