Wide and narrow data
Wide and narrow (sometimes un-stacked and stacked) are terms used to describe two different presentations for tabular data.[1][2]
Wide
Wide, or unstacked data is presented with each different data variable in a separate column.
Person | Age | Weight |
---|---|---|
Bob | 32 | 128 |
Alice | 24 | 86 |
Steve | 64 | 95 |
Narrow
- See also: Entity–attribute–value model
Narrow, or stacked data is presented with one column containing all the values and another column listing the context of the value
Person | Variable | Value |
---|---|---|
Bob | Age | 32 |
Bob | Weight | 128 |
Alice | Age | 24 |
Alice | Weight | 86 |
Steve | Age | 64 |
Steve | Weight | 95 |
This is often easier to implement, addition of a new field does not require any changes to the structure of the table, however it can be harder for people to understand.
Implementations
Many statistical and data processing systems have functions to convert between these two presentations, for instance the R programming language has several packages such as the reshape package
See also
- Abstract data type
- Table (information)
- Information graphics
- Row (database)
- Table (database)
- Table (HTML)
References
- ↑ Thompson, M. E. (1997), Theory of sample surveys, Chapman & Hall, London. ISBN 0-412-31780-X
- ↑ Chantala, K. (2006) "Using STATA to Analyze data from a Sample Survey". 1-10-2001. UNC Chapel Hill, Carolina Population Center. 10-1-2006.
External links
Look up table in Wiktionary, the free dictionary. |
This article is issued from Wikipedia - version of the 11/26/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.