You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are now an **Expert data analyst and communicator using Python and the HoloViz ecosystem** to explore data, produce insights, forecasts, prescriptions, and data visualizations and reports.
14
+
15
+
You are in planning mode.
16
+
17
+
Don't make any code edits, just generate a plan.
18
+
19
+
## Core Responsibilities
20
+
21
+
Your task is to generate an implementation plan for a data analysis or data visualization using the HoloViz ecosystem.
22
+
23
+
The plan consists of a Markdown document that describes the implementation plan, including the following sections:
24
+
25
+
* Overview: A brief description of the analysis or data visualization.
26
+
* Requirements: A list of requirements for the analysis.
27
+
* Library Selection: Justify which HoloViz libraries will be used based on the Library Selection Framework below.
28
+
* Implementation Steps: A detailed list of steps to implement the analysis.
29
+
* Testing: A list of tests that need to be implemented to verify the analysis.
30
+
31
+
Please always
32
+
33
+
- Keep the plan simple, concise, and professional. Don't write extensive code examples.
34
+
- Ensure that the plan includes considerations for design and user experience.
35
+
- prefer panel components over panel-material-ui components.
36
+
37
+
## HoloViz Library Selection Framework
38
+
39
+
You use this decision tree for the HoloViz ecosystem library selection:
40
+
41
+
```text
42
+
Reactive classes with validation → param (reactive programming)
43
+
Exploratory data analysis? → hvplot (quick plots)
44
+
Complex or high quality plots? → holoviews (advanced, publication quality)
45
+
Geographic data? → geoviews (spatial)
46
+
Big data visualization? → datashader (big data viz)
Complex Dashboards, tool or applications? → panel (advanced dashboards)
49
+
```
50
+
51
+
## MCP Tool Usage
52
+
53
+
If the Holoviz MCP Server is available, use its tools to search for relevant information and to lookup relevant best practices:
54
+
55
+
- Always use `holoviz_get_skill` tool to lookup the skills for the libraries (hvplot, holoviews, panel, panel-material-ui, ....) you will be using. Please adhere to these skills in your plan.
56
+
- Use the `holoviz_search` tool to find relevant code examples and documentation for the libraries you will be using.
57
+
- Use the read/readFile and web/fetch tools to gather any additional information you may need.
MCP resources contain curated knowledge that enhances Copilot's understanding of specific frameworks. Let's load the hvPlot best practice skills and use them to create a basic data visualization.
35
-
36
-
1. In the Copilot Chat Interface, click "Add Context" (`CTRL + '`)
37
-
2. Select "MCP Resources".
38
-
3. You'll see a list of available resources. Select **`holoviz_hvplot`**.
Please create a basic hvplot visualization in a script.py file.
45
-
```
46
-
47
-
!!! tip
48
-
You can add multiple resources to the context. Try browsing and adding `holoviz_panel` as well to get Panel-specific guidance.
49
-
50
-
---
51
-
52
-
53
32
## Using HoloViz Agents
54
33
55
-
56
34
### Installing the Agents
57
35
58
-
59
36
[Custom agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents) enable you to configure the AI to adopt different personas tailored to specific development roles and tasks. To install the `holoviz-mcp` agents:
60
37
61
38
1. Open a terminal in VS Code (`` Ctrl+` `` or `Terminal > New Terminal`).
62
39
2. Run the following command:
63
-
```bash
64
-
uvx holoviz-mcp update copilot
65
-
```
40
+
41
+
```bash
42
+
uvx holoviz-mcp update copilot
43
+
```
44
+
66
45
You should see output confirming that agents were installed to `.github/agents/`.
67
46
3. Wait for the command to complete successfully.
68
47
@@ -74,46 +53,37 @@ MCP resources contain curated knowledge that enhances Copilot's understanding of
74
53
75
54
---
76
55
77
-
78
56
### Creating a Plan with the HoloViz Planner Agent
79
57
80
-
81
58
Instead of diving straight into code, let's use the specialized agent to plan our application architecture.
82
59
83
-
84
60
1. In the Copilot Chat interface, click the **Set Agent** dropdown.
85
61
2. Select **`HoloViz Planner`** from the list.
86
62
3. Type the following prompt:
87
-
```
88
-
Create a plan for a stock dashboard that displays historical prices and trading volume
The HoloViz Planner agent analyzes your requirements and creates an architecture plan following HoloViz best practices. This ensures your application is well-structured before you write any code.
103
74
104
75
---
105
76
106
-
107
77
### Implementing the Dashboard
108
78
109
-
110
79
Now that you have a plan, let's ask Copilot to help implement it.
111
80
112
-
113
81
1. In the Copilot Chat, respond to the plan with:
114
-
```
115
-
Implement the plan outlined above.
116
-
```
82
+
83
+
```text
84
+
Implement the plan outlined above.
85
+
```
86
+
117
87
2. Copilot will generate the code for your dashboard. Review the suggestions.
118
88
119
89
!!! note "What you'll see"
@@ -127,14 +97,33 @@ Now that you have a plan, let's ask Copilot to help implement it.
127
97
128
98
---
129
99
100
+
## Using HoloViz Resources
101
+
102
+
MCP resources contain curated knowledge that enhances Copilot's understanding of specific frameworks. Let's load the hvPlot best practice skills and use them to create a basic data visualization.
130
103
131
-
## What You've Learned
104
+
1. In the Copilot Chat Interface, click "Add Context" (`CTRL + '`)
105
+
2. Select "MCP Resources".
106
+
3. You'll see a list of available resources. Select **`holoviz_hvplot`**.
Copy file name to clipboardExpand all lines: docs/tutorials/display-tool.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,10 +3,9 @@
3
3
In this tutorial, we will create visualizations using the `holoviz_display` tool through an AI assistant. By the end, you will have created several interactive visualizations and learned how to view them.
4
4
5
5
!!! info "What you'll accomplish"
6
-
- Set up the `holoviz_display` tool
7
-
- Create your first bar chart through your AI assistant
8
-
- Build an interactive scatter plot
9
-
- View your visualizations
6
+
- Use the `holoviz_display` tool
7
+
- Create and display a bar chart through your AI assistant
8
+
- Build and display an interactive scatter plot
10
9
- Learn to troubleshoot common issues
11
10
12
11
!!! warning
@@ -39,11 +38,11 @@ Right-click [penguins.csv](../assets/data/penguins.csv) and save it to your work
39
38
40
39
Now let's explore the penguins dataset. Open your AI assistant and ask:
41
40
42
-
> "My dataset is penguins.csv. What is the distribution of the 'species' column? Use the #holoviz_display tool"
41
+
> My dataset is penguins.csv. What is the distribution of the 'species' column? Use the #holoviz_display tool
43
42
44
43
Your AI assistant will use the `holoviz_display` tool and respond with something like:
Let's explore the relationship between penguin measurements. Ask your AI assistant:
66
65
67
-
> "Show me a scatter plot of 'flipper_length_mm' vs 'body_mass_g'."
66
+
> Show me a scatter plot of 'flipper_length_mm' vs 'body_mass_g'
68
67
69
68
The AI will create a new visualization. Click the new URL to see:
70
69
@@ -81,7 +80,7 @@ The AI will create a new visualization. Click the new URL to see:
81
80
82
81
You can ask the AI to perform several steps in one message. This helps you build complex analyses without multiple back-and-forths. Try:
83
82
84
-
> "Filter the dataset for species 'Chinstrap' and calculate the median 'body_mass_g'. Then display and discuss the result."
83
+
> Filter the dataset for species 'Chinstrap' and calculate the median 'body_mass_g'. Then display and discuss the result.
85
84
86
85
The AI will:
87
86
@@ -98,7 +97,7 @@ This demonstrates how `holoviz_display` can handle multi-step analytical workflo
98
97
99
98
Now let's see all your visualizations together. In your browser, navigate to:
100
99
101
-
```
100
+
```bash
102
101
http://localhost:5005/feed
103
102
```
104
103
@@ -126,15 +125,15 @@ The AI will iterate on your existing work based on your feedback, creating new v
126
125
127
126
You can create visualizations that combine multiple plots for comprehensive analysis. Ask your AI:
128
127
129
-
> "Create a histogram of 'bill_length_mm' and a box plot of 'flipper_length_mm' side by side."
128
+
> Create a histogram of 'bill_length_mm' and a box plot of 'flipper_length_mm' side by side.
130
129
131
130
The AI will create a layout with both plots displayed together, making it easy to compare different aspects of the data at a glance. When you view it in the Feed page, you'll see a descriptive title and the combined visualization.
132
131
133
132
## Step 6: Build Interactive Dashboards
134
133
135
134
For more advanced use cases, you can create interactive dashboards with widgets. Ask your AI:
136
135
137
-
> "Create an interactive dashboard for the penguins dataset with dropdown filters for species and island."
136
+
> Create an interactive dashboard for the penguins dataset with dropdown filters for species and island.
Copy file name to clipboardExpand all lines: docs/tutorials/getting-started.md
+19-17Lines changed: 19 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,37 +141,39 @@ In VS Code, you can monitor the MCP server:
141
141
2. Type "MCP: List Servers" and press Enter
142
142
3. Choose the "holoviz" server
143
143
4. Select "Show Output"
144
-
3. You should see log messages indicating the server is running
144
+
5. You should see log messages indicating the server is running
145
145
146
146
### Test with Your AI Assistant
147
147
148
148
Open a chat with your AI assistant and try these questions:
149
149
150
-
1.**Component Discovery**:
151
-
```
152
-
What Panel components are available for user input?
153
-
```
150
+
**Component Discovery**:
154
151
155
-
Note: In VS Code, you can prefix your prompt with `#holoviz` to explicitly request that the AI use the `holoviz-mcp` server tools for your query.
152
+
What Panel components are available for user input?
156
153
157
-
2.**Component Details**:
158
-
```
159
-
What parameters does the Panel Button component accept?
160
-
```
154
+
!!! tip "Force MCP Usage"
155
+
156
+
In VS Code, you can include `#holoviz` in your prompt to explicitly request that the AI use the `holoviz-mcp` server tools for your query.
157
+
158
+
**Component Details**:
159
+
160
+
What parameters does the Panel Button component accept?
161
161
162
162
If your AI assistant provides detailed, accurate answers with specific Panel component information, congratulations! HoloViz MCP is working correctly! 🎉
163
163
164
164
## Step 6: Build Your First Dashboard
165
165
166
-
Now that everything is set up, let's build a simple dashboard:
166
+
Now that everything is set up, let's build a simple dashboard.
167
+
168
+
**Ask your AI "Agent":**
169
+
170
+
Create a Panel dashboard in the file app.py that displays a slider and shows the square of the slider's value. Use panel skills.
171
+
172
+
Your AI "Agent" will provide code using HoloViz MCP's knowledge of Panel components!
167
173
168
-
1. Create a new file called `app.py`
169
-
2. Ask your AI "Agent":
170
-
```
171
-
Create a Panel dashboard in the file app.py that displays a slider and shows the square of the slider's value. Use 'panel' skills.
Copy file name to clipboardExpand all lines: docs/tutorials/stock-analysis.md
+4-14Lines changed: 4 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Tutorial: Building an Interactive Stock Analysis Report
2
2
3
-
In this tutorial, you will create a complete stock analysis report that visualizes price movements and trading patterns for multiple stocks. By the end, you'll have built an interactive web application that displays financial data with professional charts and statistics.
3
+
In this tutorial, you will create a complete stock analysis report that visualizes price movements and trading patterns for multiple stocks. By the end, you'll have built an interactive report that displays financial data with professional charts and statistics.
4
4
5
5
<iframesrc="https://www.youtube.com/embed/placeholder"title="Tutorial: Building a Stock Analysis Report with HoloViz MCP"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"referrerpolicy="strict-origin-when-cross-origin"allowfullscreenstyle="display:block;height:300px;width:500px;margin-left:auto;margin-right:auto"></iframe>
6
6
@@ -18,17 +18,7 @@ In this tutorial, you will create a complete stock analysis report that visualiz
18
18
- VS Code with GitHub Copilot or another MCP-compatible AI assistant
19
19
- Configured the `HoloViz Planner` agent. ([HoloViz Agents](copilot.md/#using-holoviz-agents))
20
20
- The HoloViz MCP server running ([How to start the server](getting-started.md/#start-the-server))
21
-
- Python 3.11 or later
22
-
- `yfinance` installed in your virtual environment: `pip install yfinance`
23
-
24
-
!!! info "What you'll build"
25
-
You'll create a stock analysis report that compares AAPL (Apple) and META (Meta) stock prices over the last 5 days with:
26
-
27
-
- Individual price charts for each stock
28
-
- Summary statistics table
29
-
- Normalized comparison overlay
30
-
- Trading volume visualization
31
-
- Professional styling and error handling
21
+
- `yfinance` installed in the virtual environment where you run `holoviz-mcp`: `pip install yfinance`
32
22
33
23
## Step 1: Plan Your Report with the HoloViz Planner
34
24
@@ -39,15 +29,15 @@ First, let's use the HoloViz Planner agent to design our application architectur
39
29
3. Ask the agent:
40
30
41
31
```text
42
-
Please plan how to show me AAPL and META's hourly bar data history for the last 5 days and display the data as charts:
32
+
Please plan how to analyze and create a report showing AAPL and META's hourly bar data history for the last 5 days and display the data as charts:
43
33
44
34
- Individual price charts for each stock
45
35
- Summary statistics table
46
36
- Normalized comparison overlay
47
37
- Trading volume visualization
48
38
- Professional styling and error handling
49
39
50
-
Display using the #holoviz_display tool.
40
+
Display using the #holoviz_display tool. KISS - Keep it simple stupid.
0 commit comments