data analysis code