Add average_data to codebook