All posts
·7 min read

Writing Data Analysis Reports in Markdown with Interactive Charts

businessdata analysisvega-litekatex

Data analysis is only useful if it is communicated clearly. A chart without context is just a picture. A table without narrative is just numbers. The best analysis reports combine data, visuals, and written interpretation in one document. Markdown makes this straightforward.

Quick Answer: A Markdown data analysis report combines Vega-Lite charts, KaTeX formulas, and Markdown tables in a single plain-text file. This approach replaces 3 separate tools (spreadsheet, charting software, word processor) with one file that is version-controlled, exportable to PDF, and reproducible by any team member.

What Makes a Good Data Analysis Report?

A data analysis report should answer four questions:

  1. What did we measure? Define the metrics and data sources.
  2. What did we find? Present the data with charts and tables.
  3. What does it mean? Interpret the results in business context.
  4. What should we do? Recommend next steps.

What Is the Standard Structure for a Data Report?

# [Analysis Title]

**Analyst:** [Name]
**Date:** March 2026
**Data Period:** January 1 – February 28, 2026

## Objective

[What question are we trying to answer?]

## Methodology

[How was the data collected and analyzed?]

## Findings

[Charts, tables, and interpretation]

## Conclusions

[Summary of key insights]

## Recommendations

[Specific actions based on the findings]

How Do You Embed Charts in a Markdown Data Report?

Distribution Analysis

Use a bar chart to show how data is distributed:

```vega-lite
{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "title": "Customer Acquisition by Channel",
  "width": 400,
  "data": {
    "values": [
      {"channel": "Organic Search", "customers": 1240},
      {"channel": "Paid Ads", "customers": 890},
      {"channel": "Referral", "customers": 650},
      {"channel": "Social Media", "customers": 420},
      {"channel": "Direct", "customers": 310},
      {"channel": "Email", "customers": 280}
    ]
  },
  "mark": "bar",
  "encoding": {
    "y": {"field": "channel", "type": "nominal", "sort": "-x", "title": ""},
    "x": {"field": "customers", "type": "quantitative", "title": "New Customers"},
    "color": {"value": "#6366f1"}
  }
}
```

Follow every chart with interpretation:

Organic search drives 33% of all new customer acquisitions, more than twice the contribution of social media. This suggests that SEO investment has a higher return than social campaigns for this period.

Trend Analysis

Line charts are best for showing change over time:

```vega-lite
{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "title": "Monthly Active Users (MAU)",
  "width": 500,
  "data": {
    "values": [
      {"month": "2025-07", "mau": 12400},
      {"month": "2025-08", "mau": 13100},
      {"month": "2025-09", "mau": 12800},
      {"month": "2025-10", "mau": 14200},
      {"month": "2025-11", "mau": 15600},
      {"month": "2025-12", "mau": 14900},
      {"month": "2026-01", "mau": 16800},
      {"month": "2026-02", "mau": 18200}
    ]
  },
  "mark": {"type": "line", "point": true},
  "encoding": {
    "x": {"field": "month", "type": "temporal", "title": "Month"},
    "y": {"field": "mau", "type": "quantitative", "title": "MAU", "scale": {"zero": false}},
    "color": {"value": "#0891b2"}
  }
}
```

Comparison Analysis

Use grouped charts to compare segments:

```vega-lite
{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "title": "Conversion Rate by Plan",
  "width": 400,
  "data": {
    "values": [
      {"stage": "Visit", "plan": "Free", "rate": 100},
      {"stage": "Sign Up", "plan": "Free", "rate": 12},
      {"stage": "Activate", "plan": "Free", "rate": 8},
      {"stage": "Convert", "plan": "Free", "rate": 2.1},
      {"stage": "Visit", "plan": "Pro", "rate": 100},
      {"stage": "Sign Up", "plan": "Pro", "rate": 18},
      {"stage": "Activate", "plan": "Pro", "rate": 14},
      {"stage": "Convert", "plan": "Pro", "rate": 6.8}
    ]
  },
  "mark": "bar",
  "encoding": {
    "x": {"field": "stage", "type": "ordinal", "title": "", "sort": ["Visit", "Sign Up", "Activate", "Convert"]},
    "y": {"field": "rate", "type": "quantitative", "title": "Rate (%)"},
    "color": {"field": "plan", "type": "nominal", "title": "Plan"},
    "xOffset": {"field": "plan"}
  }
}
```

How Do You Add Statistical Formulas to a Markdown Report?

For reports that include statistical analysis, use KaTeX math notation:

The conversion rate improvement is statistically significant:

$$\chi^2 = \sum \frac{(O_i - E_i)^2}{E_i} = 14.7, \quad p < 0.001$$

With a sample size of $n = 3{,}200$ and a confidence level of 95%,
the margin of error is:

$$ME = z \cdot \sqrt{\frac{p(1-p)}{n}} = 1.96 \cdot \sqrt{\frac{0.068 \cdot 0.932}{3200}} \approx 0.87\%$$

edtr.md renders KaTeX formulas inline and in display blocks, so your statistical analysis looks precise and professional.

How Do You Format Data Tables in Markdown?

Use Markdown tables for detailed data:

| Metric | Jan 2026 | Feb 2026 | Change | Trend |
| --- | --- | --- | --- | --- |
| MAU | 16,800 | 18,200 | +8.3% | ↑ |
| DAU | 4,200 | 4,800 | +14.3% | ↑ |
| Avg Session | 6.2 min | 5.8 min | -6.5% | ↓ |
| Bounce Rate | 38% | 35% | -3pp | ↑ |
| NPS | 42 | 47 | +5 | ↑ |

How Do You Write a Conclusions Section That Drives Action?

Summarize findings as a numbered list. Each point should be a single sentence:

## Conclusions

1. Organic search is the highest-performing acquisition channel, contributing 33% of new customers.
2. MAU grew 47% over the last 8 months, with acceleration in Q1 2026.
3. Pro plan users convert at 3.2x the rate of free users.
4. Average session duration declined slightly, suggesting feature discovery may need improvement.

What Should Recommendations Look Like in a Data Report?

End with actionable recommendations tied to specific findings. Each recommendation should reference the metric that supports it:

## Recommendations

1. **Double SEO investment.** Organic search ROI is 3x that of paid ads. Allocate an additional $20K/month to content and technical SEO.
2. **Redesign onboarding for free users.** The 2.1% conversion rate indicates friction in the free-to-paid path. Run an A/B test on the onboarding wizard.
3. **Investigate session duration decline.** Add analytics tracking to key feature pages to identify where users drop off.
4. **Expand Pro plan marketing.** Higher conversion rates justify increased ad spend targeting Pro-qualified leads.

This workflow builds on several capabilities that each have their own detailed guides:

Research from the Nielsen Norman Group shows that reports combining charts with narrative text are comprehended 50% faster than charts-only or text-only formats, making the Markdown-first approach a concrete productivity advantage.

Try It

Open edtr.md and build your next data report. Paste Vega-Lite charts for visuals, add KaTeX for formulas, use tables for raw data, and write your analysis around them. Export to HTML or PDF for a polished deliverable.

Try it yourself

Open edtr.md and start writing Markdown with live preview, diagrams, math, and PDF export. Free, no sign-up.

Open editor