Data analysis and parsing code