nutmeg-store
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseStore
存储
Help the user choose storage formats, locations, and publishing methods for their football data.
帮助用户为其足球数据选择存储格式、存储位置以及发布方法。
Accuracy
准确性
Read and follow before answering any question about provider-specific facts (IDs, endpoints, schemas, coordinates, rate limits). Always use — never guess from training data.
docs/accuracy-guardrail.mdsearch_docs回答任何与特定服务商相关的事实类问题(ID、endpoints、schema、坐标、速率限制)前,请先阅读并遵循 的要求。始终使用 工具查询,绝不要基于训练数据猜测答案。
docs/accuracy-guardrail.mdsearch_docsFirst: check profile
第一步:检查配置文件
Read . If it doesn't exist, tell the user to run first.
.nutmeg.user.md/nutmeg读取 文件。如果该文件不存在,请告知用户先运行 命令。
.nutmeg.user.md/nutmegStorage format decision tree
存储格式决策树
Small projects (< 100MB, single user)
小型项目(< 100MB,单人使用)
| Format | Best for | Tools |
|---|---|---|
| JSON | Raw event data, API responses | Any language |
| CSV | Tabular stats, easy to share | Spreadsheets, pandas, R |
| Parquet | Columnar analytics, fast queries | polars, pandas, DuckDB, Arrow |
| SQLite | Relational queries, multiple tables | Any language, DB browser tools |
Recommendation: Start with JSON for raw data, Parquet for processed data.
| 格式 | 适用场景 | 工具 |
|---|---|---|
| JSON | 原始事件数据、API响应 | 所有编程语言 |
| CSV | 表格型统计数据,易于分享 | 电子表格、pandas、R |
| Parquet | 列式分析,快速查询 | polars、pandas、DuckDB、Arrow |
| SQLite | 关系型查询,多表场景 | 所有编程语言、数据库浏览器工具 |
推荐:原始数据采用JSON存储,处理后的数据采用Parquet存储。
Medium projects (100MB - 10GB)
中型项目(100MB - 10GB)
| Format | Best for | Notes |
|---|---|---|
| Parquet files | Analytics workloads | 5-10x smaller than JSON, fast columnar reads |
| DuckDB | SQL analytics on local files | Queries Parquet/CSV directly, no server needed |
| SQLite | Relational data with joins | Single file, portable, ACID compliant |
Recommendation: Parquet for storage, DuckDB for querying.
| 格式 | 适用场景 | 说明 |
|---|---|---|
| Parquet 文件 | 分析类工作负载 | 比JSON小5-10倍,列式读取速度快 |
| DuckDB | 本地文件的SQL分析 | 可直接查询Parquet/CSV,无需服务器 |
| SQLite | 需关联查询的关系型数据 | 单文件、可移植、符合ACID规范 |
推荐:用Parquet存储数据,DuckDB做查询。
Large projects (> 10GB, multiple users)
大型项目(> 10GB,多用户)
| Solution | Best for | Cost |
|---|---|---|
| PostgreSQL | Production apps, complex queries | Free (self-hosted) or ~$7/mo (Railway, Supabase) |
| BigQuery | Massive analytical queries | Free tier: 1TB/mo queries |
| Cloudflare R2 | Object storage (raw files) | Free tier: 10GB storage |
| S3 / GCS | Object storage at scale | ~$0.023/GB/mo |
| 解决方案 | 适用场景 | 成本 |
|---|---|---|
| PostgreSQL | 生产级应用、复杂查询 | 免费(自托管)或约7美元/月(Railway、Supabase) |
| BigQuery | 海量分析查询 | 免费额度:每月1TB查询量 |
| Cloudflare R2 | 对象存储(原始文件) | 免费额度:10GB存储 |
| S3 / GCS | 大规模对象存储 | 约0.023美元/GB/月 |
Directory structure
目录结构
Recommend this structure for football data projects:
project/
data/
raw/ # Untouched API/scrape responses
statsbomb/
events/
matches.json
fbref/
2024/
processed/ # Cleaned, transformed data
events.parquet
shots.parquet
passes.parquet
derived/ # Computed metrics
xg_model.parquet
passing_networks/
notebooks/ # Analysis notebooks
scripts/ # Data pipeline scripts
outputs/ # Charts, reports, exports
.env # API keys (gitignored)
.nutmeg.user.md # Nutmeg profile推荐足球数据项目采用如下目录结构:
project/
data/
raw/ # 未改动的API/爬取响应
statsbomb/
events/
matches.json
fbref/
2024/
processed/ # 清洗、转换后的数据
events.parquet
shots.parquet
passes.parquet
derived/ # 计算得出的指标
xg_model.parquet
passing_networks/
notebooks/ # 分析笔记
scripts/ # 数据管道脚本
outputs/ # 图表、报告、导出文件
.env # API密钥(git忽略)
.nutmeg.user.md # Nutmeg配置文件Publishing and sharing
发布与分享
Interactive dashboards
交互式仪表盘
| Platform | Language | Cost | Notes |
|---|---|---|---|
| Streamlit | Python | Free (community cloud) | Most popular for football analytics. Deploy from GitHub |
| Observable | JavaScript | Free tier | Great for D3.js visualisations. Notebooks + Framework |
| Shiny | R | Free (shinyapps.io, 25 hrs/mo) | R ecosystem integration |
| Gradio | Python | Free (HuggingFace Spaces) | Quick ML model demos |
| 平台 | 编程语言 | 成本 | 说明 |
|---|---|---|---|
| Streamlit | Python | 免费(社区云) | 足球分析领域最受欢迎,可从GitHub直接部署 |
| Observable | JavaScript | 有免费额度 | 适合D3.js可视化,支持笔记本 + 框架 |
| Shiny | R | 免费(shinyapps.io,每月25小时使用时长) | 可对接R生态系统 |
| Gradio | Python | 免费(HuggingFace Spaces) | 可快速搭建ML模型演示 |
Static sites
静态站点
| Platform | Notes |
|---|---|
| GitHub Pages | Free. Good for static charts (D3, matplotlib exports) |
| Cloudflare Pages | Free. Faster, more features than GH Pages |
| Vercel | Free tier. Good for Next.js/Astro sites |
| 平台 | 说明 |
|---|---|
| GitHub Pages | 免费,适合静态图表(D3、matplotlib导出) |
| Cloudflare Pages | 免费,比GitHub Pages速度更快、功能更多 |
| Vercel | 有免费额度,适合Next.js/Astro站点 |
Sharing data
数据分享
| Method | Best for |
|---|---|
| GitHub repo | Small datasets (< 100MB), code + data together |
| GitHub Releases | Larger files (up to 2GB per release) |
| Kaggle Datasets | Community sharing, discoverable, free |
| HuggingFace Datasets | ML-focused, versioned, free |
| 方式 | 适用场景 |
|---|---|
| GitHub 仓库 | 小型数据集(< 100MB),代码与数据统一存放 |
| GitHub Releases | 更大的文件(每个版本最多2GB) |
| Kaggle Datasets | 社区分享,易被发现,免费 |
| HuggingFace Datasets | 聚焦ML场景,支持版本管理,免费 |
Social media / content
社交媒体/内容
| Output | Tool | Notes |
|---|---|---|
| Static charts | matplotlib, ggplot2, D3.js | Export as PNG/SVG |
| Animated charts | matplotlib.animation, D3 transitions | Export as GIF/MP4 |
| Twitter/X threads | Chart images + alt text | Accessibility matters |
| Blog posts | Markdown + embedded charts | GitHub Pages, Medium, Substack |
| 输出类型 | 工具 | 说明 |
|---|---|---|
| 静态图表 | matplotlib、ggplot2、D3.js | 导出为PNG/SVG格式 |
| 动态图表 | matplotlib.animation、D3 transitions | 导出为GIF/MP4格式 |
| Twitter/X 帖子串 | 图表+替代文本 | 需注意无障碍访问 |
| 博客文章 | Markdown + 内嵌图表 | 可发布在GitHub Pages、Medium、Substack |
Cost awareness
成本提示
Based on the user's goals, flag costs:
.nutmeg.user.md- Exploration/learning: Everything can be free. StatsBomb open data + Jupyter/Colab + GitHub Pages.
- Content creation: Streamlit Community Cloud is free. Cloudflare Pages is free.
- Professional: Budget for API access ($100-1000+/mo for Opta/StatsBomb commercial).
- Product: Database hosting ($7-50/mo), consider data licensing costs separately.
根据用户 中记录的目标,提示相关成本:
.nutmeg.user.md- 探索/学习:所有工具都可免费使用。StatsBomb公开数据 + Jupyter/Colab + GitHub Pages即可满足需求。
- 内容创作:Streamlit Community Cloud免费,Cloudflare Pages免费。
- 专业用途:预留API访问预算(Opta/StatsBomb商业版每月100-1000+美元不等)。
- 产品级应用:数据库托管费用每月7-50美元,数据授权成本需单独核算。