Melting and Transposing Data
Explore the melting, unmelting, and transposing of data.
We'll cover the following
Melting data
Another transformation we can do to data is “melt” it. Before looking at the method to melt data, let’s discuss the structure of data. Two ways to organize the same data are “wide” (also called “stacked” or “record” form) and “long” (sometimes called “tidy” form) data. (Note that this is different from “big data,” which refers to the amount of data.)
An
The dimensions can then be sliced to explore the data. We might want to view sales by store. A dimension may be hierarchical—for example, a store could have a region, zip code, and state—and we could view sales by any of these dimensions.
Here’s data that tracks students’ ages and scores. The test columns are fact columns, and the other columns are dimensions:
Get hands-on with 1400+ tech skills courses.