Skip to content

Tidy Data Maker

The Tidy Data Maker reshapes non-tidy data into a long, import-ready format. It is useful when your source data has values spread across multiple columns (for example, one column per year or per sex). Accessible from the datasets index page by clicking the Tidy Data Maker link.

Using the Tidy Data Maker

1. Paste wide format data (CSV/TSV)

Paste your data into the text area. The tool accepts comma-, tab-, or semicolon-delimited data.

What you name your columns determines what gets codified; what you check (in step 2) determines what gets melted.

Area hierarchy level name → codified to area codeDimension name → codified to value codeDimension value, checked → melted & codifiedDimension value, unchecked → carried over, not codified
Case 1 — Area pivot the usual case
Wide (pasted)
Province Male Female Total
North100120220
South8090170
area codemelt → Sexmelt → Sexmelt → Sex
Tidy (long)
ProvinceSexPopulation
NorthMale100
NorthFemale120
NorthTotal220
SouthMale80
area codevalue codevalue
Case 2 — Dimension pivot
Wide (pasted)
Age group Male Female Total
0-4403878
5-9454287
value codemelt → Sexmelt → Sexmelt → Sex
Tidy (long)
Age groupSexPopulation
0-4Male40
0-4Female38
0-4Total78
5-9Male45
value codevalue codevalue
Case 3 — Extra dimensions carried over selection drives the split
Wide (pasted)
Province Male Female Total Urban Rural
North10012022060160
South809017050120
area codemelt → Sexmelt → Sexmelt → Sexcarried overcarried over
Tidy (long)
ProvinceUrbanRuralSexPopulation
North60160Male100
North60160Female120
North60160Total220
South50120Male80
area codeunchangedunchangedvalue codevalue
Only one dimension can be melted at a time. Check Male/Female/Total to melt into Sex; leave Urban/Rural unchecked and they ride along on every row, un-codified.
A column is codified if its name matches an area hierarchy level or a dimension. Among dimension-value-named columns, the ones you check get melted and codified against the chosen dimension; the ones you leave unchecked are carried over unchanged.

2. Select columns to melt/pivot

Checkboxes appear for each column in your pasted data. Checked columns are melted into variable/value rows. Unchecked columns remain as columns in the output.

Select the dimension and indicator to use for the melted columns:

  • New "Dimension" column name — pick the dimension the melted column headers represent (e.g. Year, Sex)
  • New "Value" column name — pick the indicator the values represent (e.g. Population)

If any checked columns are named after an existing dimension or area hierarchy level, values will automatically be codified (labels replaced by database codes) in the Codified CSV output.

Click Apply to generate the reshaped data.

3. Tidy data (long format)

The reshaped data is displayed in a preview table and text area. From here you can:

  • Download CSV — saves the tidy file with human-readable labels
  • Download Codified CSV — saves the tidy file with dimension and area labels replaced by their database codes, ready for import

Unmatched values

If any values in the checked columns cannot be matched to existing dimension or area codes, a warning is shown listing the unmapped values. You can optionally check Exclude unmatched rows from all CSVs to skip those rows in the output. After adjusting, click Apply again and download the file.

Next step

Import the resulting file via the Datasets page (see Importing data).