Skip to content

Commit df62178

Browse files
Merge pull request #125 from MarcSkovMadsen/enhancements/fix-video
Review fixes
2 parents ed80e8c + 0ac0648 commit df62178

8 files changed

Lines changed: 49 additions & 46 deletions

File tree

-1.89 KB
Loading
13.8 KB
Loading

docs/how-to/configure-claude-code.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,16 @@ If Claude provides detailed, accurate responses with specific Panel component in
6363

6464
HoloViz MCP provides specialized agents for Claude Code that can help with planning and implementation:
6565

66-
**Project-level installation** (installs to `.claude/agents/`):
66+
**User-level installation (default)** (installs to `~/.claude/agents/`):
6767

6868
```bash
69-
holoviz-mcp install claude
69+
holoviz-mcp install claude --scope user
7070
```
7171

72-
**User-level installation** (installs to `~/.claude/agents/`):
72+
**Project-level installation** (installs to `.claude/agents/`):
7373

7474
```bash
75-
holoviz-mcp install claude --scope user
75+
holoviz-mcp install claude --scope project
7676
```
7777

7878
**With skills** (optional):

docs/tutorials/getting-started-claude-code.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ This tutorial will guide you through installing and using HoloViz MCP with Claud
55
!!! tip "What you'll learn"
66
- How to install HoloViz MCP
77
- How to configure it with Claude Code
8-
- How to use it to get help building Panel applications
98
- How to verify everything is working correctly
10-
- How to build your first Panel dashboard
9+
- How to create your first visualizations
1110

1211
!!! note "Prerequisites"
1312
Before you begin, ensure you have:
@@ -66,28 +65,40 @@ This will update your `~/.claude.json` file with the HoloViz MCP server configur
6665

6766
HoloViz MCP includes specialized agents for Claude Code that help with planning and implementing HoloViz applications.
6867

69-
Navigate to your project directory and run:
68+
Install the agents for your user:
7069

7170
```bash
72-
holoviz-mcp install claude
71+
holoviz-mcp install claude --scope user
7372
```
7473

75-
This creates a `.claude/agents/` directory with:
74+
This creates a `~/.claude/agents/` directory with:
7675

7776
- `holoviz-data-explorer.md` - Agent for quick data exploration and data visualization
7877
- `holoviz-app-architect.md` - Agent for architecting production Panel data applications
7978

80-
!!! tip "Install User-Level Agents"
79+
!!! tip "Install Project-Level Agents"
8180

82-
To make agents available across all your projects:
81+
To make agents available in your current project only:
8382

8483
```bash
85-
holoviz-mcp install claude --scope user
84+
holoviz-mcp install claude --scope project
8685
```
8786

88-
This installs agents to `~/.claude/agents/`.
87+
This installs agents to `.claude/agents/`.
8988

90-
## Step 6: Verify Installation
89+
## Step 6: Install Panel and Dependencies (Optional)
90+
91+
For Claude Code to create and run visualizations in your terminal, it needs access to Panel, hvPlot, and related libraries.
92+
93+
Here's how to install them in a project-specific environment:
94+
95+
```bash
96+
uv venv
97+
source .venv/bin/activate # On Linux/macOS (use `.venv\Scripts\activate` on Windows)
98+
uv pip install panel watchfiles hvplot # Add your own favorite libraries
99+
```
100+
101+
## Step 7: Verify Installation
91102

92103
Let's verify that HoloViz MCP is working correctly!
93104

@@ -127,7 +138,7 @@ What parameters does the Panel Button component accept?
127138

128139
If Claude provides detailed, accurate answers with specific Panel component information, congratulations! HoloViz MCP is working correctly! 🎉
129140

130-
## Step 7: Build Your First Dashboard
141+
## Step 8: Build Your First Dashboard
131142

132143
Now that everything is set up, let's build a simple dashboard.
133144

@@ -145,15 +156,11 @@ Save the code to `app.py` and run it:
145156
run it
146157
```
147158

148-
!!! tip "Panel is not installed"
149-
If the command errors with "Panel is not installed" you will have to create a virtual
150-
environment and install panel
151-
152159
Your dashboard will open in your default web browser!
153160

154161
![Dashboard](../assets/images/getting-started-dashboard.png)
155162

156-
## Step 8: Displaying Data Visualizations
163+
## Step 9: Displaying Data Visualizations
157164

158165
HoloViz MCP includes a powerful display tool that can render visualizations directly. Ask Claude:
159166

docs/tutorials/stock-analysis-claude-code.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,22 @@ By the end, you'll have built an interactive report that displays financial data
2020
First, let's ask Claude to help us plan our stock analysis report. Open claude and run:
2121

2222
```text
23-
I want to create a stock analysis report showing AAPL and META's hourly data for the last 5 days. The report should include:
23+
I want to quickly display a stock analysis report showing AAPL and META's hourly data for the last 60 days.
24+
25+
The report should include:
2426
2527
- Individual price charts for each stock
2628
- Summary statistics table
2729
- Normalized comparison overlay
2830
- Trading volume visualization
2931
- Professional styling
3032
31-
Please plan the architecture for this report. What components should I use from Panel and hvPlot?
33+
Please design and plan this report. Keep it simple and as a single script.
3234
```
3335

34-
Claude will provide a detailed architecture plan including:
36+
Claude will use `holoviz-data-explorer` to develop a detailed architecture plan:
3537

36-
- Data sources and how to fetch stock data with yfinance
37-
- Chart types to use for price and volume visualization
38-
- Panel components for layout and statistics
39-
- Best practices for organizing the report
38+
![Claude Data Explorer](../assets/images/getting-started-claude-data-eplorer.png)
4039

4140
!!! success "What you'll see"
4241
Claude will outline a clear plan for building your report, including the key libraries and components needed.
@@ -46,7 +45,7 @@ Claude will provide a detailed architecture plan including:
4645
Now let's ask Claude to implement the report and use the display tool to show it:
4746

4847
```text
49-
Implement it. Display it using the holoviz_display tool.
48+
Please implement the report. Then display it using the holoviz_display tool.
5049
```
5150

5251
Claude will:
@@ -81,7 +80,7 @@ Open the URL in your browser. You should see your stock analysis report with:
8180
Now that you understand how the report works, let's modify it to analyze different stocks:
8281

8382
```text
84-
Modify the report to show GOOGL and MSFT instead of AAPL and META
83+
Display GOOGL and MSFT instead of AAPL and META
8584
```
8685

8786
Claude will generate updated code with the new stocks and provide a new URL to view the modified report.
@@ -93,7 +92,7 @@ Claude will generate updated code with the new stocks and provide a new URL to v
9392
Let's enhance the report by adding a moving average to the price charts:
9493

9594
```text
96-
Add a 20-period moving average line to each stock's price chart
95+
Display a 20-period moving average line in each stock's price chart
9796
```
9897

9998
Claude will update the code to include moving average trend lines and provide a new URL to view the enhanced report.

docs/tutorials/weather-dashboard-claude-code.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,20 @@ Take a moment to review Claude's summary. This will guide our dashboard design!
2828
Now let's ask Claude to help us plan the dashboard architecture:
2929

3030
```text
31-
I want to create an awesome dashboard for exploring the Seattle Weather dataset. The dashboard should:
31+
I want to create a modern, professional looking dashboard for exploring the Seattle Weather dataset. The dashboard should:
3232
3333
- Enable filtering by multiple years (default: 2015)
3434
- Include plots for temperature and wind grouped by year
3535
- Include a plot by weather type
3636
- Include a table with the raw data
37-
- Use ECharts with smooth transitions
38-
- Use consistent and modern styling
39-
40-
Please plan the architecture for this dashboard. What components should I use from Panel? How should the code be organized?
37+
- Use panel-material-ui for a modern look and feel
38+
- Use ECharts with smooth transitions for an awesome look and feel. Not hvplot
39+
- Use consistent, modern and appealing styling
40+
- Use the vega-datasets package for providing the Seattle weather data
41+
42+
Please plan the architecture for this dashboard. What components should I use from Panel? How should I organize them?
43+
Keep it as a single script weather_dashboard.py file for simplicity
44+
Add the tests in test_weather_dashboard.py file and make sure the tests pass
4145
```
4246

4347
Claude will provide a detailed architecture including:
@@ -49,22 +53,14 @@ Claude will provide a detailed architecture including:
4953
- Color palette suggestions
5054

5155
!!! success "What you'll see"
52-
Take time to read through Claude's plan - it's the blueprint for your application!
56+
Take time to review and refine Claude's plan - it's the blueprint for your application!
5357

5458
## Step 3: Implement the Dashboard
5559

5660
With a solid plan, let's create the dashboard. We'll create it as a project file:
5761

5862
```text
59-
Based on the plan above, create a weather_dashboard.py file that implements the Seattle Weather dashboard. Include:
60-
61-
- Data loading and filtering
62-
- ECharts visualizations for temperature, wind, and weather types
63-
- Panel components for interactivity
64-
- Clean, well-organized code with docstrings
65-
- The vega_datasets package provides the Seattle weather data
66-
67-
Keep it as a single file for simplicity.
63+
Based on the plan implement the Seattle Weather dashboard in a single weather_dashboard.py file. Make sure all tests pass.
6864
```
6965

7066
Claude will create the `weather_dashboard.py` file in your current directory.

src/holoviz_mcp/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def install_copilot(agents: bool = True, skills: bool = False) -> None:
113113
def install_claude(
114114
agents: bool = True,
115115
skills: bool = False,
116-
scope: Annotated[str, typer.Option("--scope", help="Installation scope: 'project' for .claude/agents/, 'user' for ~/.claude/agents/")] = "project",
116+
scope: Annotated[str, typer.Option("--scope", help="Installation scope: 'project' for .claude/agents/, 'user' for ~/.claude/agents/")] = "user",
117117
) -> None:
118118
"""Install HoloViz MCP resources for Claude Code.
119119

src/holoviz_mcp/config/resources/skills/panel.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ def create_plot(self) -> go.Figure:
583583

584584
### ECharts
585585

586+
DO prefer ECharts dict configuration over of pyecharts
586587
**CRITICAL**: ECharts configurations must be JSON-serializable. Panel uses Bokeh's serialization mechanism which cannot serialize Python functions.
587588

588589
**NEVER use Python functions or lambdas** in ECharts configuration:

0 commit comments

Comments
 (0)