> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 数据与分析

export const PromptBlock = ({children, type, agent, intent, playbookId}) => {
  var utm = 'utm_source=docs&utm_medium=use-case-gallery&utm_campaign=prompt-block';
  var tag = 'docs-use-case-gallery';
  var agentParams = (agent ? '&agent=' + agent : '') + (intent ? '&intent=' + intent : '') + (playbookId ? '&playbookId=' + playbookId : '');
  var label = type === 'schedule' ? 'Schedule in Devin' : type === 'playbook' ? 'Create Playbook' : type === 'knowledge' ? 'Add to Knowledge' : agent === 'advanced' ? 'Try in Devin' : agent === 'dana' ? 'Try in Dana' : agent === 'ada' ? 'Try in Ask Devin' : 'Try in Devin';
  var buildUrl = function (text) {
    var encoded = encodeURIComponent(text);
    if (type === 'schedule') return 'https://app.devin.ai/settings/schedules/create?' + utm + agentParams + '&prompt=' + encoded;
    if (type === 'playbook') return 'https://app.devin.ai/settings/playbooks/create?' + utm + '&body=' + encoded;
    if (type === 'knowledge') return 'https://app.devin.ai/knowledge?' + utm + '&body=' + encoded;
    if (agent === 'ada') return 'https://app.devin.ai/search?' + utm + '&noSubmit=true&prompt=' + encoded;
    return 'https://app.devin.ai/?tags=' + tag + '&' + utm + agentParams + '&prompt=' + encoded;
  };
  const ref = React.useRef(null);
  const [href, setHref] = React.useState('#');
  React.useEffect(() => {
    if (!ref.current) return;
    var codeEl = ref.current.querySelector('pre code');
    if (codeEl) {
      var text = codeEl.textContent.trim();
      if (text) setHref(buildUrl(text));
    }
    var header = ref.current.querySelector('[data-component-part="code-block-header"]');
    if (header && !header.querySelector('.prompt-block-devin-link')) {
      var link = document.createElement('a');
      link.href = href;
      link.target = '_blank';
      link.rel = 'noopener noreferrer';
      link.className = 'prompt-block-devin-link';
      link.style.cssText = 'display:inline-flex;align-items:center;gap:6px;text-decoration:none;color:#fff;font-size:11px;font-weight:500;padding:4px 10px;border-radius:6px;white-space:nowrap;background:#317CFF;transition:background 0.2s;margin-left:8px;';
      link.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg> ' + label;
      link.onmouseenter = function () {
        link.style.background = '#2968D9';
      };
      link.onmouseleave = function () {
        link.style.background = '#317CFF';
      };
      header.appendChild(link);
    }
    var existingLink = ref.current.querySelector('.prompt-block-devin-link');
    if (existingLink && href !== '#') existingLink.href = href;
  });
  return <div className="prompt-block" ref={ref}>{children}</div>;
};

<div id="overview">
  ## 概览
</div>

Devin 在数据处理、分析和可视化任务方面表现出色。无论是处理数据集、创建可视化图表，还是自动化数据工作流，Devin 都能帮助你精简并优化数据相关流程。

<div id="use-cases">
  ## 使用场景
</div>

1. 托管并填充用于数据分析的 Jupyter 笔记本
2. 创建自定义数据可视化
3. 分析和可视化金融与经济数据
4. 统计建模和数据处理
5. 时间序列分析与预测

<div id="example-prompts">
  ## 示例提示
</div>

<AccordionGroup>
  <Accordion title="可视化经通胀调整后的价格" icon="chart-line">
    <PromptBlock>
      ```txt 可视化经通胀调整后的价格 theme={null}
      嗨 Devin，请打开 https://beta.data.gov.sg/，并可视化展示组屋价格分布随时间的变化情况。然后将你发现的有趣见解反馈给我。
      ```
    </PromptBlock>
  </Accordion>

  <Accordion title="分析加州房价" icon="chart-line">
    <PromptBlock>
      ```txt 分析加州房价 theme={null}
      嗨 Devin！你能画一张按城市展示平均房价的图吗？只需包含最贵的前 20 个城市。这里是数据集：https://www.kaggle.com/datasets/kanchana1990/real-estate-dataset-california
      ```
    </PromptBlock>
  </Accordion>
</AccordionGroup>

<div id="example-sessions">
  ## 示例会话
</div>

<div id="data-analysis-visualization">
  ### 数据分析与可视化
</div>

**Netflix 剧集/电影分析**

一个针对 Netflix 内容库的交互式分析，使用 Python 和 Pandas 探索内容类型、上映日期和评分等方面的趋势。

[https://app.devin.ai/sessions/4f803558dc1e45ddb489fb93848015ae](https://app.devin.ai/sessions/4f803558dc1e45ddb489fb93848015ae)

<div id="code-repository-analysis">
  ### 代码仓库分析
</div>

**使用 Gource 的代码仓库可视化**

使用 Gource 对代码仓库提交历史进行可视化，直观呈现代码随时间的演进过程。

[https://app.devin.ai/sessions/8fe32e3a349a4842b2d787e5ccac931b](https://app.devin.ai/sessions/8fe32e3a349a4842b2d787e5ccac931b)

<div id="advanced-jupyter-notebook-examples">
  ### 高级 Jupyter 笔记本 示例
</div>

每个笔记本 展示了特定的数据分析技术：

* **[音频分析](https://app.devin.ai/sessions/bb9ff93037ed4d5f9690099e5269f285)**：用于声音处理的音频波形与频谱图可视化
* **[图像处理](https://app.devin.ai/sessions/a725564c943e4974ae2df16e54b14a5d)**：使用计算机视觉实现 CAPTCHA 识别
* **[数据可视化](https://app.devin.ai/sessions/ce43eb22d1aa48c594b1fd8915ed5130)**：使用颜色渐变对数据序列进行高级可视化
* **[统计分析](https://app.devin.ai/sessions/453af5136fea4500a8e3956e2644a8a8)**：基于概率策略的数学建模与优化

<div id="additional-visualizations">
  ### 更多可视化
</div>

**代码仓库分析**

* **[Drawdb 可视化](https://app.devin.ai/sessions/d98c5e3b4bef43c88b395a0862c36d76)**：数据库架构及关系的可视化分析
