Finished data-preparation.R script