-
Notifications
You must be signed in to change notification settings - Fork 14
Enhancement/weather dashboard #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,141 @@ | ||
| # Tutorial: Building an Interactive Weather Dashboard | ||
|
|
||
| In this tutorial, you will create a professional weather analysis dashboard that explores Seattle weather patterns from 2012-2015. | ||
|
|
||
| By the end, you'll have built a complete interactive application with multi-year filtering, animated charts, and a modern Material UI design that works beautifully in both light and dark modes. | ||
|
|
||
| <!-- <iframe src="https://www.youtube.com/embed/placeholder" title="Tutorial: Building a Weather Dashboard with HoloViz MCP" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen style="display:block;height:300px;width:500px;margin-left:auto;margin-right:auto"></iframe> --> | ||
|
|
||
| !!! note "Prerequisites" | ||
| Before starting, ensure you have: | ||
|
|
||
| - An understanding of Python, [Panel](https://panel.holoviz.org/index.html), and data visualization concepts | ||
| - HoloViz MCP installed and configured ([Getting Started Guide](getting-started.md)) | ||
| - VS Code with GitHub Copilot or another MCP-compatible AI assistant | ||
| - Configured the `HoloViz Planner` agent ([HoloViz Agents](copilot.md/#using-holoviz-agents)) | ||
| - The HoloViz MCP server running ([How to start the server](getting-started.md/#start-the-server)) | ||
|
|
||
| ## Step 1: Provide Context | ||
|
|
||
| Before we start building, let's examine an existing project to understand the key elements of an effective weather visualization. | ||
|
|
||
| - In VS Code, open the Copilot Chat interface | ||
| - Click the **Pick Model** dropdown and select a **powerful model** | ||
| - Click the **Set Agent** dropdown and select **Agent** | ||
| - Ask the agent to read and summarize the context: | ||
|
|
||
| ```text | ||
| For context please read and summarize https://altair-viz.github.io/case_studies/exploring-weather.html using the #fetch tool. | ||
| ``` | ||
|
|
||
| - Take a moment to review the summary. This summary will guide our dashboard design! | ||
|
|
||
| ## Step 2: Plan Your Dashboard | ||
|
|
||
| Now that we have the context, let's use the *HoloViz Planner* agent to design our application architecture. This agent knows best practices for Panel dashboards and will create a comprehensive plan. | ||
|
|
||
| - Select the **HoloViz Planner** agent | ||
| - Then **ask**: | ||
|
|
||
| ```text | ||
| Plan the most awesome dashboard for exploring the Seattle Weather dataset: | ||
|
|
||
| - Enable the user to filter multiple years. Default is 2015. | ||
| - Include plots for temperature and wind grouped by year | ||
| - Include a plot by weather type | ||
| - Include a table with the raw data | ||
| - Use ECharts with awesome transitions | ||
| - Use consistent and modern styling for the plots and Page | ||
|
|
||
| Keep it simple: | ||
|
|
||
| - clean, well-organized and well tested code | ||
| ``` | ||
|
|
||
| - Press Enter and wait for the HoloViz Planner to respond | ||
|
|
||
|  | ||
|
|
||
| !!! success "What you'll see" | ||
| The planner will provide a detailed architecture including: | ||
|
|
||
| - Data layer with caching and filtering functions | ||
| - Chart creation functions using ECharts | ||
| - Dashboard class with reactive parameters | ||
| - Recommendations for file organization | ||
| - Color palette suggestions | ||
|
|
||
| Take time to read through the plan - it's the blueprint for your application! | ||
|
|
||
| ## Step 3: Implement the Dashboard | ||
|
|
||
| With a solid plan in hand, let's bring it to life! | ||
|
|
||
| - In the same Copilot Chat conversation, switch to the **Agent** and ask: | ||
|
|
||
| ```text | ||
| Implement the plan outlined above. | ||
| ``` | ||
|
|
||
| - Wait for the agent to generate the complete implementation | ||
|
|
||
| The agent follows the architecture plan we reviewed, ensuring clean separation of concerns. | ||
|
|
||
| - Once the code is generated, the agent will create tests and run them | ||
|
|
||
| You should see output like: | ||
|
|
||
| ```text | ||
| ✓ 23 tests passed | ||
| ✓ Server starting on port 5006 | ||
| ``` | ||
|
|
||
| - Click the server URL to view your dashboard! | ||
|
|
||
|  | ||
|
|
||
| !!! success "Checkpoint" | ||
| If you see an interactive dashboard with charts, filters, and a data table - congratulations! You've built a complete data application. Try: | ||
|
|
||
| - Selecting different years in the filter | ||
| - Hovering over the charts to see interactive tooltips | ||
| - Exploring the animated transitions when filters change | ||
|
|
||
| ## Step 4: Test and Fix the Dashboard | ||
|
|
||
| - **Fix issues**: When testing the app, you might identify issues that you can ask the agent to fix. | ||
|
|
||
| ## Step 5: Fine-tune the Dashboard | ||
|
|
||
| Once the dashboard is running, you can further fine-tune it: | ||
|
|
||
| - **Add more visualizations**: Include humidity, pressure, or other weather metrics | ||
| - **Style**: Improve the styling of the app. | ||
| - **Download Data**: Add more or more buttons to enable the user to download the data | ||
| - **Enhance interactivity**: Add cross-filtering between charts | ||
| - **Documentation**: Add documentation | ||
|
|
||
| ## What You've Accomplished | ||
|
|
||
| Congratulations! In this tutorial, you have: | ||
|
|
||
| - ✅ Used the HoloViz Planner agent to design a complex dashboard architecture | ||
| - ✅ Implemented a multi-file Python application with proper separation of concerns | ||
| - ✅ Created animated, interactive charts with ECharts | ||
| - ✅ Built a Material UI dashboard with professional styling | ||
| - ✅ Implemented theme support for light and dark modes | ||
| - ✅ Used reactive programming with Panel parameters | ||
| - ✅ Debugged and fixed styling issues | ||
| - ✅ Wrote and ran a comprehensive test suite | ||
| - ✅ Created a shareable single-file version | ||
|
|
||
| You now have a production-ready weather dashboard and the skills to build your own data applications! | ||
|
|
||
| ## Additional Resources | ||
|
|
||
| - [Panel Documentation](https://panel.holoviz.org) | ||
| - [Panel Material UI Components](https://github.com/awesome-panel/panel-material-ui) | ||
| - [ECharts Documentation](https://echarts.apache.org/en/index.html) | ||
| - [HoloViz Discourse](https://discourse.holoviz.org) - Share your creation! | ||
|
|
||
| --- | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.