run_analysis function for Coursera project