preprocessing for graph visualization of mass data