Analysis code for TPP Analysis project