Data analysis and transformation