Transforming parsed data into a "matrix"