Data cleaning and analysis scripts