The tidy data standard was formalised by statistician Hadley Wickham to streamline data analysis.
Datasets in the wild are messy in countless unique ways, requiring custom code for every operation.
Tidy datasets share a single consistent geometry that analytical tools are built to expect.
Rule one: each variable must have its own column.
Rule two: each observation must have its own row.
Rule three: each type of observational unit must form its own distinct table.
A common untidy pattern puts column names that are actually values across the top of a table.
For example, placing years like 2021, 2022, and 2023 as column headers treats values as variable names.
In tidy format, there would be a single year column and a single revenue column.
Untidy tables often resemble presentation spreadsheets formatted for human eyes rather than computers.
While wide layout tables are convenient for quick reading, they break automated charting tools.
Plotting libraries expect to map one aesthetic element like the horizontal axis to one named column.
Transforming untidy data into tidy format involves pivoting and melting operations.
Once data is tidy, analysts spend far less time reshaping tables and far more time exploring patterns.
Tidy structure creates an orderly pipeline from raw messy inputs to clean reproducible insights.