code written as part of the coursera data science specialisation