Grow AI Skills Saved

Task guide · Worked case

CSV to HTML report

Build a chart report from a real CSV, with field definitions, reproducible calculations and a downloadable result.

Case checked October 29, 2026 · Grow AI Skills

Create an HTML report by giving the Chart Report skill a CSV, the meaning of its fields and a precise comparison to make. Keep the calculations alongside the finished page, then open that page and check the charts against the numbers. This example uses the real Palmer Penguins dataset and produces a report you can download and open locally.

The case includes the unchanged CSV, field definitions, request, calculation script, metrics, HTML, two browser screenshots and the numeric audit. This is one recorded example, generated by following the downloaded skill's instructions and running its bundled helpers. It does not establish that every CSV or agent will produce the same result.

Start with the real CSV and its field definitions

Download penguins.csv. It contains 344 observations from 2007 to 2009, with eight columns. Palmer Penguins credits Allison Horst, Alison Hill and Kristen Gorman; the underlying observations come from Gorman and the Palmer Station LTER program. The case retains a pinned source URL and SHA-256 and the dataset's CC0 license.

What each column means in this example
FieldMeaning and use
speciesAdelie, Chinstrap or Gentoo; the grouping field.
islandBiscoe, Dream or Torgersen; retained, not used as a filter.
bill_length_mm, bill_depth_mmBill measurements in millimetres; retained for other analyses.
flipper_length_mmFlipper length in millimetres; retained for other analyses.
body_mass_gBody mass in grams; NA means missing. The group mean uses only measured masses.
sexRecorded sex, with missing values. A missing sex does not discard a measured mass.
yearObservation year. All years in this file are included.

Keep an untouched copy of the CSV. For your own export, add the date range, unit and meaning of one row before asking for a report. A row representing an order is different from one representing an order line. That decision changes counts and averages.

Generate the page and retain the calculations

  1. Open the Chart Report skill page, download its ZIP and follow its installation instructions. This case used the packaged 41637ff source revision. It requires Python 3.10+, Node.js 22+ and Chrome or Chromium.
  2. Extract the case into a working folder. Start an agent task with that folder available, then supply the CSV, source record and this request. Use the invocation appropriate to your agent; the resource page has both supported forms.
Use $qiaomu-chart-report. Read penguins.csv, source.json and DATA-LICENSE.md. Create an English, self-contained HTML report for a reader learning data reporting. Compare species counts and measured body masses. Treat NA as missing, never as zero; retain rows with missing sex when their mass is present. Preserve the source CSV. Compute metrics.json with species counts, mass denominators, means and medians using a reproducible Python script. Show the exact summary table, units, source and descriptive limits. Use bundled ECharts and recipes, no CDN. Deliver report-plan.md, report.html, metrics.json, the calculation script, audit.json and real desktop/mobile screenshots. Run the strict numeric audit and inspect both screenshots. Do not infer causation, statistical significance or population abundance.
  1. Review the report plan before accepting charts. The example compares species counts and measured body masses. Two category comparisons and an exact summary table answer that question without implying a time trend.
  2. Run python3 compute_metrics.py in the extracted case folder. The script writes metrics.json from the CSV. It excludes NA only for the measurement being summarized and checks that measured plus missing masses equal all rows.
  3. Ask the agent to build the self-contained HTML with the skill's bundled ECharts runtime and run the strict numeric audit. Open the result at desktop and mobile widths. Keep the raw inputs and calculation script when sharing the report.

The bundled helpers can be rerun from the working folder below. Set SKILL_DIR to the installed skill folder. The case ZIP includes the template, so the embedding command rebuilds the HTML without another model call.

python3 "$SKILL_DIR/scripts/embed_chart_lib.py" report.template.html report.html --libraries echarts
python3 "$SKILL_DIR/scripts/audit_report.py" report.html --data penguins.csv --data metrics.json --strict-numbers --json-output audit.json
node "$SKILL_DIR/scripts/render_html.mjs" report.html report-desktop.png --width 1440 --height 900 --full-page
node "$SKILL_DIR/scripts/render_html.mjs" report.html report-mobile.png --width 390 --height 844 --full-page

Check these results before sharing

Species counts are 152 Adelie, 68 Chinstrap and 124 Gentoo, totaling 344. The body-mass comparison uses 342 measured values; two masses are missing. These are different denominators.

Recomputed body-mass results
SpeciesMeasured mass nMean (g)
Adelie1513700.7
Chinstrap683733.1
Gentoo1235076.0

Gentoo has the highest mean in this sample. The report pools years, islands and sex categories; it does not show individual distributions, test significance, establish a cause or estimate population abundance. Keep those limits beside the comparison.

Generated Palmer Penguins HTML report showing species counts, body-mass means and the exact summary table.
Actual browser capture of the generated HTML. View the mobile capture or download the HTML.

The retained numeric audit found no unmatched visible numbers. That check finds values in the supplied data and metrics; it does not prove that a formula or interpretation is correct. The calculation script and summary table make those choices inspectable.

Fix the input or output that caused the problem

  • If your row count differs from 344, inspect the delimiter and header first. Use a CSV parser, since a quoted comma belongs inside a field. The supplied script uses Python's CSV reader.
  • If a mean is too low, check whether NA became zero. If the mass denominator becomes 333, check for a blanket filter that also removed rows with missing sex.
  • If charts disappear without an internet connection, rebuild using the bundled runtime. A CDN script link leaves the report dependent on that server.
  • If the report passes the numeric audit but makes an unsupported claim, revise the claim. An audit can match a number that was used with the wrong denominator.

For chart creation inside ChatGPT, use the existing ChatGPT chart guide. For a standalone report with downloadable evidence, use this workflow and retain its files. The next case turns source-linked research notes into an editable presentation.

Get the skill for your own task

Download the corresponding skill and follow its installation instructions. Return to Docs & data for other document and data workflows.