Vibe-code your first hockey data setup
Go from a downloaded CSV to real analyses and a dashboard — with one prompt you paste into your own AI.
Your file
- CSV / Excel
Paste the prompt
- Into Claude / GPT
It writes the code
- DuckDB + Python
Ask for metrics
- Plain language
Dashboard
- Streamlit charts
The 30-second version
- You don't need to be an engineer — describe your file and let the AI write the code.
- One prompt scaffolds a local DuckDB + Python setup, a few metrics and a dashboard.
- Everything runs on the file you already downloaded — nothing leaves your laptop.
Run this in your own AI
Copy the prompt below and paste it into Claude or ChatGPT to start building this yourself. Fill in the bracketed bits with your own data.
You are my senior data engineer and hockey analyst. Help me build my first local hockey analytics setup from a file I already have. Work step by step and keep everything runnable on my laptop — no cloud accounts, as few files as possible. My data: I have a file called [FILENAME.csv] that I exported from [SOURCE]. Before writing any code, ask me to paste the header row (column names) and 2–3 example rows so you know the real schema. Do not assume columns. Then do the following, explaining each step in one or two sentences: 1. Architecture: propose the simplest possible setup — a single DuckDB database file plus one Python script — and explain the bronze → silver → gold idea in one sentence. 2. Load (bronze): write build.py that installs what it needs (duckdb, pandas), loads [FILENAME.csv] into a "bronze" table, and prints the row count and column types. 3. Clean (silver): create a "silver" view that fixes data types, standardizes player/team names, and drops obviously broken rows. 4. Metrics (gold): create "gold" views with beginner-friendly hockey metrics from whatever columns I actually have — e.g. per-player games, goals, assists, points, shots, and points-per-60 if ice time exists. If I have shot coordinates, add a simple distance-based shot-quality estimate, name it "xg_estimate", and clearly label it a rough proxy, not a real model. 5. Ask questions: give me 5 example SQL queries against the gold views (top scorers, best shot rates, etc.). 6. Dashboard: write a small Streamlit app (app.py) with a team/player filter and 2–3 charts (top scorers bar chart, shots-vs-points scatter) reading from the DuckDB file, plus the exact commands to run it. Rules: every script must run top-to-bottom without manual edits once I give you my columns; add comments only where they explain a non-obvious choice; and tell me honestly whenever a metric is an approximation. Start by asking me for my column names and a couple of sample rows.
What "vibe-coding" a data setup actually means
Vibe-coding is describing what you want in plain language and letting an AI assistant write the code, while you steer and sanity-check the output. You do not need to know DuckDB or Python up front — you need a clear goal and the willingness to check the numbers. It is the fastest way to get from "I have a spreadsheet" to "I can ask real questions."
Start from the data you already have
The easiest first project uses a file you can already export: a CSV or Excel from a stats site, your team's tracking tool, or even a hand-kept spreadsheet. Real data you understand beats a perfect dataset you do not. If you have a file, you have a project.
Paste the prompt, then talk to it
Paste the prompt above into Claude or ChatGPT. Notice it asks for your column names first — that matters, because it should read your real schema instead of guessing. Then it scaffolds a tiny [DuckDB](/explainers/getting-started-with-duckdb-for-hockey-data) + Python setup, a few metrics, and a Streamlit dashboard. From there you just keep talking: "add save percentage", "make it per 60 minutes", "filter to even strength".
Everything runs locally
The whole setup runs on the file you already downloaded, on your laptop — no accounts, no data leaving your machine. That is the same ownership principle from the [club-owned architecture](/explainers/how-a-club-owns-its-hockey-data), just at personal scale: you own the data and the code.
Keep yourself honest
An AI will happily invent a metric or mislabel a column. Always eyeball the output against something you know — a scorer you recognize, a total that should match — and treat any "xG" it builds from scratch as a rough proxy until you validate it. If you are unsure what a metric should mean, start with [what expected goals really is](/glossary/expected-goals).
Build it yourself
- 1Install Python 3 (and any code editor, or use a notebook).
- 2Copy the prompt above into Claude or ChatGPT.
- 3Paste your file's header row + 2–3 sample rows when it asks.
- 4Run the generated build.py, then launch the Streamlit dashboard.
- 5Iterate in plain language until it answers your question.
Key terms
Newsletter
Weekly hockey analytics
Data-driven takes on performance, scouting, and team strategy. No fluff — just the numbers that matter.
No spam. Unsubscribe anytime.
Related explainers
Getting started with DuckDB for hockey data
Why a single-file analytical database is the fastest way to start your hockey data stack.
How a hockey analytics data stack works
The end-to-end path from raw game data to an answer you can act on — drawn as one diagram.
Using Claude to analyze your hockey data
How an LLM turns your data stack into a question-and-answer machine — safely.