🎯 Shutterstock 分析仪表板
基于Snowflake MCP与Cursor AI集成构建的实时分析仪表板
🤖 Cursor AI + Snowflake MCP 配置
步骤1:配置Cursor AI MCP
创建 ~/.cursor/mcp.json:
{
"mcpServers": {
"snowflake": {
"command": "snowflake-labs-mcp",
"args": [
"--service-config-file",
"/path/to/your/snowflake_mcp_config.yaml",
"--account",
"your_account",
"--user",
"your_username",
"--password",
"your_password",
"--warehouse",
"COMPUTE_WH"
]
}
}
}步骤2:创建Snowflake配置
创造 snowflake_mcp_config.yaml:
account: your_account
user: your_username
password: your_password
warehouse: COMPUTE_WH
database: your_database
schema: your_schema
role: ACCOUNTADMIN步骤3:安装MCP服务器
npm install -g snowflake-labs-mcp🔍 使用Cursor AI的实分析工作流程
基本数据探索
"Connect to Snowflake and show me the first 5 rows"
"What are the column names and data types?"
"How many total images do we have?"数据质量分析
"Check for missing values in the popularity_score column"
"Show me the distribution of image categories"
"Find any duplicate image IDs"商业洞察
"Which categories have the highest popularity scores?"
"What's the average file size by image type?"
"Show me the top 10 most popular images"高级分析
"Create a correlation matrix between file size and popularity"
"Show me the temporal trends in image submissions"
"Analyze the multilingual coverage across different languages"🚀 我们的实际工作流程
第一阶段:数据集发现
- Cursor AI 查询“向我展示我们图像数据集的前5行”
- 结果在多个表格中发现了2,368张图片
- 洞察发现从“人物”到“技术”的31个类别
第二阶段:数据理解
- Cursor AI 查询“分析我们三个主要表格的结构”
- 结果识别出5种语言的多语言描述
- 洞察发现受欢迎度评分和性能指标
第三阶段:高级分析
- Cursor AI 查询“将多个表合并为一个统一的数据集”
- 结果创建了用于分析的全面数据集
- 洞察已确定表现优异的类别(商业/金融:100%成功率)
阶段4:预测建模
- Cursor AI 查询“构建内容推荐的预测模型”
- 结果创建了用于成功预测的机器学习模型
- 见解确定了黄金时期(2016-2019年)及巅峰表现模式
第五阶段:仪表板开发
- Cursor AI 查询“为分析仪表板创建React组件”
- 结果使用D3.js可视化技术构建了交互式仪表板
- 洞察将Snowflake的实时数据集成,并配备专业级的用户界面/用户体验(UI/UX)
🎯 实时应用
最终的仪表盘显示:
- 实时数据 来自Snowflake数据库
- 交互式可视化 使用D3.js
- 基于人工智能的洞察 以及建议
- 专业设计 使用 Tailwind CSS
访问: 查看实时仪表板
🛠️ 技术栈
- 后端Python,Snowflake 连接器,Pandas,Scikit-learn
- 前端React.js、D3.js、Tailwind CSS
- 数据库雪花
- 部署Vercel
- 分析(或“数据分析”)Vercel 分析
📊 数据集概览
- 总图像数2,368张高分辨率图像
- 类别31个不同类别
- 语言5条多语言描述
- 时间范围2016-2019 黄金时代
- 成功率商业/金融类别100%成功率
📁 项目结构
├── src/ # React dashboard source code
│ ├── App.jsx # Main dashboard application
│ ├── components/ # UI components (Header, Footer, etc.)
│ └── index.js # React entry point
├── public/ # Static assets and images
│ └── images/ # Hero page carousel images
├── analysis/ # Python data analysis scripts
│ ├── connect_snowflake.py # Snowflake database connection
│ ├── phase1_data_quality.py # Data quality assessment
│ ├── phase2_category_analysis.py # Category performance analysis
│ ├── phase3_multilingual_analysis.py # Language insights
│ └── phase4_predictive_modeling.py # ML predictions
├── README.md # Project documentation
├── start.sh # One-command setup script
├── package.json # Node.js dependencies
└── requirements.txt # Python dependencies🚀 快速入门
# Clone and run
git clone https://github.com/Mugeshgithub/Snowflake-MCP-Demo-App.git
cd Snowflake-MCP-Demo-App
./start.sh结果仪表盘在……时打开 http://localhost:3000
