Misc Data Analysis Code