Code for exploratory analysis and visualization