Various useful pieces of code for data cleaning and analysis