skills/43-wentorai-research-plugins/skills/analysis/dataviz/metabase-analytics-guide/SKILL.md
Guide to Metabase for open-source research data analytics and dashboards
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research metabase-analytics-guideInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Metabase is a powerful open-source business intelligence and analytics tool with over 46K stars on GitHub. It allows researchers and data analysts to explore data, create visualizations, and build dashboards without writing SQL, though it fully supports custom SQL queries for advanced users. Metabase connects to a wide variety of databases and provides a browser-based interface that makes data exploration accessible to team members regardless of their technical background.
For academic research groups and labs, Metabase serves as an excellent self-hosted platform for tracking experimental data, monitoring research progress, and creating shared dashboards for collaborative projects. Its ability to connect directly to PostgreSQL, MySQL, SQLite, and many other databases means it can be pointed at existing research data stores without data migration. Researchers can set up automated reports, scheduled email digests, and shared dashboards that keep the entire team informed.
Metabase's no-code query builder is particularly valuable in interdisciplinary research teams where not all members are comfortable with SQL. Principal investigators, graduate students, and collaborators can all explore the same datasets through an intuitive visual interface while power users retain full SQL access for complex analyses.
# Quick start with Docker
docker run -d -p 3000:3000 \
--name metabase \
-v metabase-data:/metabase-data \
-e MB_DB_TYPE=postgres \
-e MB_DB_DBNAME=metabase_app \
-e MB_DB_PORT=5432 \
-e MB_DB_USER=$METABASE_DB_USER \
-e MB_DB_PASS=$METABASE_DB_PASS \
-e MB_DB_HOST=db-host \
metabase/metabase
# Access at http://localhost:3000
version: "3.9"
services:
metabase:
image: metabase/metabase:latest
container_name: research-metabase
ports:
- "3000:3000"
environment:
MB_DB_TYPE: postgres
MB_DB_DBNAME: metabase_app
MB_DB_PORT: 5432
MB_DB_USER: ${METABASE_DB_USER}
MB_DB_PASS: ${METABASE_DB_PASS}
MB_DB_HOST: postgres
MB_SITE_NAME: "Research Lab Analytics"
depends_on:
- postgres
volumes:
- metabase-data:/metabase-data
postgres:
image: postgres:16
environment:
POSTGRES_DB: metabase_app
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- pg-data:/var/lib/postgresql/data
volumes:
metabase-data:
pg-data:
Metabase supports connecting to many database types commonly used in research environments.
Navigate to Admin > Databases > Add Database in the Metabase UI. For a typical research PostgreSQL database:
Display name: Lab Experiment Database
Host: research-db.lab.university.edu
Port: 5432
Database name: experiments
Username: (use environment variable $DB_USER)
Password: (use environment variable $DB_PASS)
Enable "Auto-run queries" and set "Scan frequency" to daily for research databases that update regularly.
A common research use case is tracking experiment progress and results. Here is an example SQL query for monitoring experiment completion rates:
-- Experiment completion overview
SELECT
e.project_name,
COUNT(*) AS total_experiments,
COUNT(CASE WHEN e.status = 'completed' THEN 1 END) AS completed,
COUNT(CASE WHEN e.status = 'in_progress' THEN 1 END) AS in_progress,
COUNT(CASE WHEN e.status = 'failed' THEN 1 END) AS failed,
ROUND(
COUNT(CASE WHEN e.status = 'completed' THEN 1 END)::NUMERIC /
NULLIF(COUNT(*), 0) * 100, 1
) AS completion_rate
FROM experiments e
WHERE e.created_at >= CURRENT_DATE - INTERVAL '90 days'
GROUP BY e.project_name
ORDER BY completion_rate DESC;
-- Sample processing metrics
SELECT
DATE_TRUNC('week', s.processed_at) AS week,
s.sample_type,
COUNT(*) AS samples_processed,
AVG(s.quality_score) AS avg_quality,
PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY s.processing_time)
AS median_processing_hours
FROM samples s
WHERE s.processed_at >= CURRENT_DATE - INTERVAL '6 months'
GROUP BY DATE_TRUNC('week', s.processed_at), s.sample_type
ORDER BY week DESC, sample_type;
-- Track manuscript progress across the lab
SELECT
p.title,
p.lead_author,
p.status,
p.target_journal,
p.submission_date,
CASE
WHEN p.status = 'draft' THEN 1
WHEN p.status = 'internal_review' THEN 2
WHEN p.status = 'submitted' THEN 3
WHEN p.status = 'revision' THEN 4
WHEN p.status = 'accepted' THEN 5
WHEN p.status = 'published' THEN 6
END AS stage_number,
CURRENT_DATE - p.last_updated AS days_since_update
FROM publications p
WHERE p.year >= EXTRACT(YEAR FROM CURRENT_DATE) - 1
ORDER BY stage_number, p.last_updated;
Metabase supports scheduled reports and conditional alerts, which are useful for research operations.
Question: "Failed experiments in last 7 days"
Alert when: Results are above threshold (e.g., > 5 failures)
Check frequency: Daily
Notify: Lab manager email, Slack channel
This allows labs to automatically detect quality issues in experimental workflows.
Metabase supports embedding dashboards into other web applications via iframes or its embedding SDK.
<!-- Embed a dashboard in a lab portal -->
<iframe
src="http://metabase.lab.internal/public/dashboard/abc123-def456"
frameborder="0"
width="100%"
height="800"
allowtransparency
></iframe>
For authenticated embedding, use signed JWTs to control access:
import jwt
import time
embedding_secret = os.environ["METABASE_EMBEDDING_SECRET"]
payload = {
"resource": {"dashboard": 42},
"params": {"project_id": 7},
"exp": int(time.time()) + 600 # 10-minute expiry
}
signed = jwt.encode(payload, embedding_secret, algorithm="HS256")
embed_url = f"http://metabase.lab.internal/embed/dashboard/{signed}"
tools
Recommend AND run open-source AI tools, agents, Claude Code / Codex skills, and MCP servers for any stage of a literature review — searching, reading, extracting, synthesizing, screening, citation-checking, and paper writing. Use when the user asks "what tool should I use to..." OR "install/run/use <tool> to ..." for research/lit-review work: automating a survey or related-work section, PDF→Markdown extraction for LLMs (MinerU/marker/docling), PRISMA / systematic review (ASReview), citation-backed Q&A over PDFs (PaperQA2), wiring papers into Claude/Cursor via MCP (arxiv/paper-search/zotero servers), or chatting with a Zotero library. Ships a launcher (scripts/litrun.py) that installs each tool in an isolated venv and runs it. Curated catalog of 70+ vetted projects. 支持中英文(用于「文献综述工具选型」与「一键安装/运行」)。
development
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
documentation
Use when the project collects primary data or runs a field, lab, or survey experiment, before the intervention begins — write the pre-analysis plan, size the sample from a power calculation, and register with the AEA RCT Registry. Apply after the design is chosen in aer-identification and before any outcome data are seen.
tools
Guide economists to authoritative data sources with explicit, confirmed data specifications before retrieval; interfaces with Playwright MCP to navigate portals and extract real data, not articles about data.