The dataset file format

How a dataset file is laid out: four reserved header rows, then the data.

Last updated · 5 min read · Docs / Datasets


How the file is structured

A dataset is a plain text file: a grid of comma-separated values in a .csv, or tab-separated values in a .tsv. Each column of your file declares one axis: one kind of value the dataset holds — a design input you control, or a result a simulation produced. Each row beneath the headers is one candidate: one candidate building, with its value on every axis.

The first four rows are reserved: they declare the axis each column holds rather than holding data. The actual data begins on row 5 and continues to the end of the file.

The four reserved rows must appear in this exact order, and every column must supply a value for all four. Together they are the axis's declaration: its name, whether it is an input or an output, its data type, and how its values should be interpreted.


The four reserved header rows

RowHeaderAllowed valuesPurpose
1NameShort descriptive textThe display name of the axis.
2Usagein or outWhether the axis is an input or an output.
3TypeNUMBER or STRINGThe underlying data type of the axis's values.
4UnitDepends on Type (see below)How the axis's values are interpreted and presented.
Row 1 — Name
A short, descriptive name for the axis. It should not consist of numbers only, and most non-punctuation symbols are not allowed. Each axis must have a name, and a clear one pays off later: the name is what you will see on the axis and its filter in the viewer.
Row 2 — Usage
Either in or out (case-sensitive). Use in for design inputs you control and out for the results produced by a simulation. The distinction lets the toolkit treat the levers you set apart from the outcomes they drive.
Row 3 — Type
Either NUMBER or STRING (case-sensitive). This decides whether the axis's values are read as numbers or as text, and it constrains which units row 4 may declare.
Row 4 — Unit
The Unit value depends on the Type declared in row 3, and it must follow the rules for a URL slug. See choosing a unit below for the full breakdown.

Choosing a unit

The unit in row 4 tells the toolkit how to read and present an axis's values. Which units are allowed depends entirely on the Type declared in row 3.

Number units

When the axis is a NUMBER, the Unit must be the slug of a known unit in the database. The number units currently available are: degrees-c, eci, eui, fraction, ghgi, inch-f, integer, iteration, kg-co2, kwh, oci, percent, ratio, r-value, tonne-co2, u-value, wwr. See understanding units for what each one means and the range of values it accepts.

String units

When the axis is a STRING, the Unit must be exactly one of three reserved values. These are reserved for STRING axes and cannot be used on a NUMBER axis:

  • enum — a small, fixed set of labels (for example a quality rating).
  • graph — a profile axis: breakpoints such as a daily heating schedule.
  • image — a reference to a stored asset.

Slug rules

Every unit value is a slug — the same lower-case, URL-safe form used elsewhere in the toolkit. A slug must satisfy all of the following:

  • Only lower-case letters (a-z), digits (0-9), and the hyphen (-).
  • A hyphen may not be the first or last character (e-x is fine; -ex and ex- are not).
  • Hyphens may not be directly adjacent (ex-a-b is fine; ex--ab is not).

Example

A valid file with four columns, so four axes. The first four rows are the reserved headers; the data starts on row 5.

#Col 1Col 2Col 3Col 4
1HP FractionWindow QualityTEDIHeating Profile
2ininoutout
3NUMBERSTRINGNUMBERSTRING
4fractionenumecigraph
50.25Low42.1[0|12|28] | [290|269|248]
60.50High31.7[0|14|30] | [285|260|240]
A dataset with four axes and two candidates. Rows 1–4 are the reserved headers; rows 5–6 hold the data. The fourth axis has the graph unit, making it a profile axis.

Reading the axes left to right: a numeric heat-pump fraction, a string quality rating drawn from a fixed set, a numeric energy result, and a graph-encoded heating profile. Two of them are inputs (in) and two are outputs (out).


Rules for the data rows

From row 5 onward, every value must satisfy the axis its column declares:

  • No value may be empty.
  • A value on a NUMBER axis must be convertible to a number.
  • A value on a STRING axis must not be convertible to a number.
  • An enum axis may only hold a limited number of distinct values.
  • Each axis should hold more than one distinct value — an axis where every candidate has the same value carries no information to analyze.

File size and shape

The file as a whole also has size and shape limits:

  • It must hold a minimum number of candidates (data rows).
  • It must declare a minimum number of axes (columns), and stay under the maximum number of axes.
  • It must be no larger than 10 MB on disk.

These keep a dataset large enough to be worth analyzing and small enough to stay responsive in the viewer.

Maintained by Aaron Clausen.
Questions or corrections: aclausen@dialogdesign.ca

© DIALOG · Green Toolkit documentation