Data analysis codes