Code to generate tidy data table