Redash Analytics Guide 标志

Redash Analytics Guide

社区
wentorai
redash-analytics-guide

Redash 指南:使用 SQL 驱动研究数据仪表板并进行分享

概览

发布者wentorai
代码仓库research-plugins
技能名称redash-analytics-guide
星标数
294
复刻数
42
附带文件
仅含指令
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 wentorai 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Redash Analytics Guide AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/wentorai/research-plugins/tree/main/skills/analysis/dataviz/redash-analytics-guide
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wentorai/research-plugins.git /tmp/research-plugins
mkdir -p .claude/skills
cp -r /tmp/research-plugins/skills/analysis/dataviz/redash-analytics-guide .claude/skills/redash-analytics-guide
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Redash Analytics Guide,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Redash Analytics Guide。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Redash Analytics Guide 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Redash Analytics Guide

Overview

Redash is an open-source data visualization and dashboarding tool with over 28K stars on GitHub. It is designed for analysts and researchers who prefer writing SQL to explore and visualize data. Redash connects to virtually any data source that supports SQL or has an API, and provides a browser-based query editor with autocomplete, visualization builder, and dashboard composer.

For academic research groups, Redash offers a lightweight, self-hosted alternative to commercial BI tools. Its SQL-first approach is natural for researchers who already work with databases, and its sharing features make it straightforward to create dashboards that the entire lab can access. Unlike Metabase which emphasizes no-code exploration, Redash is specifically designed for users who are comfortable writing queries and want direct control over their data retrieval logic.

Redash supports over 35 data source types, including PostgreSQL, MySQL, SQLite, BigQuery, Elasticsearch, MongoDB, Google Sheets, CSV files, and even custom Python scripts. This versatility means researchers can build unified dashboards that pull data from multiple sources: experiment databases, survey platforms, instrument logs, and cloud storage.

Installation and Configuration

Docker Compose Deployment

bash
# Clone the Redash setup repository
git clone https://github.com/getredash/setup.git redash-setup
cd redash-setup

# Generate configuration
./setup.sh

# Or manually configure with Docker Compose

Docker Compose Configuration for Research Labs

yaml
version: "3"
services:
  redash:
    image: redash/redash:latest
    command: server
    ports:
      - "5000:5000"
    environment:
      REDASH_DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/redash
      REDASH_REDIS_URL: redis://redis:6379/0
      REDASH_SECRET_KEY: ${REDASH_SECRET_KEY}
      REDASH_MAIL_SERVER: smtp.university.edu
      REDASH_MAIL_PORT: 587
      REDASH_MAIL_USERNAME: ${MAIL_USERNAME}
      REDASH_MAIL_PASSWORD: ${MAIL_PASSWORD}
    depends_on:
      - postgres
      - redis

  worker:
    image: redash/redash:latest
    command: worker
    environment:
      REDASH_DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/redash
      REDASH_REDIS_URL: redis://redis:6379/0
    depends_on:
      - redash

  scheduler:
    image: redash/redash:latest
    command: scheduler
    environment:
      REDASH_DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/redash
      REDASH_REDIS_URL: redis://redis:6379/0
    depends_on:
      - redash

  postgres:
    image: postgres:16
    environment:
      POSTGRES_DB: redash
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    volumes:
      - pg-data:/var/lib/postgresql/data

  redis:
    image: redis:7-alpine
    volumes:
      - redis-data:/data

volumes:
  pg-data:
  redis-data:

Writing Research Queries

Experiment Results Summary

sql
-- Aggregate experiment results by condition and time period
SELECT
    e.condition_name,
    DATE_TRUNC('month', e.run_date) AS month,
    COUNT(*) AS num_runs,
    ROUND(AVG(e.primary_outcome)::NUMERIC, 4) AS mean_outcome,
    ROUND(STDDEV(e.primary_outcome)::NUMERIC, 4) AS std_outcome,
    ROUND(AVG(e.primary_outcome)::NUMERIC - 1.96 * STDDEV(e.primary_outcome)::NUMERIC / SQRT(COUNT(*)), 4) AS ci_lower,
    ROUND(AVG(e.primary_outcome)::NUMERIC + 1.96 * STDDEV(e.primary_outcome)::NUMERIC / SQRT(COUNT(*)), 4) AS ci_upper
FROM experiments e
WHERE e.project_id = {{project_id}}
  AND e.run_date >= {{start_date}}
GROUP BY e.condition_name, DATE_TRUNC('month', e.run_date)
ORDER BY month, condition_name;

The {{project_id}} and {{start_date}} syntax creates interactive parameter widgets that users can modify without editing the query.

Literature Review Metrics

sql
-- Track literature search and screening progress
SELECT
    r.review_name,
    r.search_database,
    COUNT(DISTINCT a.article_id) AS total_found,
    COUNT(DISTINCT CASE WHEN s.decision = 'include' THEN a.article_id END) AS included,
    COUNT(DISTINCT CASE WHEN s.decision = 'exclude' THEN a.article_id END) AS excluded,
    COUNT(DISTINCT CASE WHEN s.decision IS NULL THEN a.article_id END) AS pending,
    ROUND(
        COUNT(DISTINCT CASE WHEN s.decision IS NOT NULL THEN a.article_id END)::NUMERIC /
        NULLIF(COUNT(DISTINCT a.article_id), 0) * 100, 1
    ) AS screening_progress_pct
FROM systematic_reviews r
JOIN articles a ON a.review_id = r.id
LEFT JOIN screening_decisions s ON s.article_id = a.article_id
WHERE r.review_name = {{review_name}}
GROUP BY r.review_name, r.search_database
ORDER BY total_found DESC;

Grant Funding and Budget Tracking

sql
-- Monitor research grant expenditures
SELECT
    g.grant_name,
    g.funding_agency,
    g.total_budget,
    SUM(t.amount) AS total_spent,
    g.total_budget - SUM(t.amount) AS remaining,
    ROUND(SUM(t.amount)::NUMERIC / g.total_budget * 100, 1) AS pct_spent,
    g.end_date,
    (g.end_date - CURRENT_DATE) AS days_remaining,
    ROUND(
        (g.total_budget - SUM(t.amount))::NUMERIC /
        NULLIF((g.end_date - CURRENT_DATE), 0), 2
    ) AS daily_burn_budget
FROM grants g
JOIN transactions t ON t.grant_id = g.id
WHERE g.status = 'active'
GROUP BY g.grant_name, g.funding_agency, g.total_budget, g.end_date
ORDER BY pct_spent DESC;

Visualization Types for Research

Redash supports multiple visualization types that can be attached to any query result.

Available Chart Types

  • Line Chart - Time-series data, experiment progression, longitudinal studies
  • Bar Chart - Categorical comparisons, group means, frequency counts
  • Scatter Plot - Correlation analysis, cluster visualization
  • Pie / Donut Chart - Distribution breakdowns, category proportions
  • Area Chart - Cumulative metrics, stacked comparisons
  • Heatmap - Correlation matrices, temporal patterns
  • Box Plot - Distribution comparison across groups
  • Map - Geographic distribution of samples or collaborators
  • Pivot Table - Cross-tabulation of experimental factors
  • Counter - Single key metrics (total papers, h-index, sample count)
  • Word Cloud - Keyword frequency from abstracts or text analysis

Configuring a Visualization

After running a query, click "New Visualization" and configure:

  1. Select the chart type appropriate for your data
  2. Map columns to X axis, Y axis, group, and size dimensions
  3. Configure axis labels, ranges, and formatting
  4. Add annotations for significance levels or thresholds
  5. Save and add to a dashboard

Dashboard Design for Research Labs

Creating an Effective Research Dashboard

A well-designed research lab dashboard typically includes the following widgets arranged in a logical layout:

  1. Header row: Key counters (active projects, publications this year, pending reviews)
  2. Progress section: Line charts showing experiment completion over time
  3. Results section: Bar charts or box plots comparing treatment conditions
  4. Quality section: Scatter plots of quality metrics and control charts
  5. Pipeline section: Tables showing upcoming deadlines and task assignments

Parameterized Dashboards

Redash dashboards support global parameters that filter all widgets simultaneously:

Dashboard Parameters:
- Project: dropdown linked to projects table
- Date Range: date range picker
- Researcher: dropdown linked to team members table

This allows a single dashboard template to serve multiple research projects.

Scheduled Queries and Alerts

Automatic Data Refresh

Configure queries to run on a schedule to keep dashboards current:

  • Every 5 minutes: Instrument monitoring, live experiment tracking
  • Hourly: Computing cluster job status, data pipeline health
  • Daily: Experiment summaries, publication metrics
  • Weekly: Lab progress reports, budget summaries

Alert Configuration

Alert: "Low Sample Quality Detected"
Query: samples with quality_score < threshold in last 24h
Condition: When query returns results
Destination: Email to lab manager, Slack channel notification
Rearm after: 1 hour

API Access for Automation

Redash provides a REST API that researchers can use to integrate dashboards into automated workflows.

python
import requests

REDASH_URL = "http://redash.lab.internal"
redash_key = os.environ["REDASH_API_KEY"]

# Execute a query and get results
def run_query(query_id, parameters=None):
    url = f"{REDASH_URL}/api/queries/{query_id}/results"
    headers = {"Authorization": f"Key {redash_key}"}
    payload = {"parameters": parameters or {}}

    response = requests.post(url, json=payload, headers=headers)
    job = response.json().get("job", {})

    # Poll for results
    while job.get("status") not in (3, 4):
        result = requests.get(
            f"{REDASH_URL}/api/jobs/{job['id']}",
            headers=headers
        )
        job = result.json().get("job", {})

    # Fetch final results
    result = requests.get(
        f"{REDASH_URL}/api/queries/{query_id}/results.json",
        headers=headers
    )
    return result.json()

# Export dashboard data for reporting
results = run_query(42, {"project_id": 7})

References

常见问题

Redash Analytics Guide AI 技能有什么作用?

Redash 指南:使用 SQL 驱动研究数据仪表板并进行分享

为什么在 TypingMind 中使用 Redash Analytics Guide?

因为您只需安装一次,就能搭配任何模型使用。Redash Analytics Guide 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Redash Analytics Guide?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/wentorai/research-plugins/tree/main/skills/analysis/dataviz/redash-analytics-guide。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Redash Analytics Guide?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Redash Analytics Guide 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Redash Analytics Guide 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Redash Analytics Guide AI 技能免费吗?

是的。wentorai 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇