Tutorial 6 of 7
Data checks, batch runs and automation with the API
Advanced 9 min
Check freshness and schema drift, convert a column with a verified factor, validate postal codes row by row, and build Chartroom projects from scripts or AI agents.
Freshness and schema drift
A Freshness check step runs DataFresh on a dataset (or, with Or check a public feed (URL), on a JSON or CSV address). Choose the Timestamp column or field and the Expected update interval. The findings say whether the data is fresh or stale and how old the newest record is.
Run it again after the next import: Chartroom passes the schema of the previous run to DataFresh, so the findings also list New fields since the last check and Fields missing since the last check — the early warning that an export changed its columns.
Convert a whole column
The Unit conversion step converts a numeric column — miles to kilometres, °F to °C, kWh to MJ. Enter Unit of the column, Target unit and the Name of the new column. On Run, Chartroom asks UnitProof for 0, 1 and 100 of the unit, derives the factor and the offset (temperatures have one), checks that the three results lie on one line and applies the conversion to every row. Incompatible units (a length into a mass) stop with UnitProof’s explanation. When you overwrite the original column, a snapshot keeps the old values.
Row-by-row address checks
The Address check step sends each row’s country, postal code and phone number to LocaleKit:
- Default country (ISO code) is used when there is no Country column or a cell is empty.
- Identical rows are checked only once, and at most Check at most this many rows (up to 500) per batch.
- The progress shows Running: 12 of 40 done…; the API’s rate limit adds short pauses on long lists.
The result counts invalid postal codes and implausible phone numbers, lists the Rows with problems, and creates a dataset (checked) with two extra columns. LocaleKit checks formats and lengths; it does not look up whether an address exists.
Projects as JSON
A Chartroom project is a documented JSON file. The schema is at /project.schema.json on the app host (and in the app folder as project-v1.schema.json). The essentials:
{
"format": "chartroom-project",
"version": 1,
"name": "Visits",
"datasets": [{ "id": "visits", "name": "Visits", "csv": "date,visits\n2026-01-05,98\n2026-01-06,104.5" }],
"steps": [
{ "id": "trend", "kind": "timeseries", "title": "Trend", "datasetId": "visits", "params": { "dateColumn": "date", "valueColumns": ["visits"] } },
{ "id": "line", "kind": "chart", "title": "Daily visits", "datasetId": "visits", "params": { "type": "line", "x": "date", "y": ["visits"] } }
]
}
Open it in the app as /app#project=<base64url of the JSON> or with File → Open file…. Missing settings fall back to the defaults of each step kind; invalid files are refused with a sentence that names the problem.
Tools for scripts and AI agents
Every tool behind a step is also an API and MCP tool on the app host: POST /api/v1/tools/<tool>/calculate with the same JSON input Chartroom sends, and /mcp for agents (Help → Tools used by Chartroom lists the tools and endpoints). A typical agent workflow: fetch data with software-adoption-explorer, analyse it with time-series-explorer, then write a Chartroom project with the dataset and steps so a person can open, check and print the report.
Ready to try it?