Question: their is 2 attachment timesheet second a. I have provided you with my coding file as a txt document b. The data file that is

 their is 2 attachment timesheet second a. I have provided you
with my coding file as a txt document b. The data file
their is 2 attachment
timesheet that is uploaded is the timesheet of truckers C. The columns are
second
: ID numbers of Drivers, the weeks they are driving, no of

a. I have provided you with my coding file as a txt document b. The data file that is uploaded is the timesheet of truckers C. The columns are : ID numbers of Drivers, the weeks they are driving, no of hours in each week they are driving and the miles they are covering each week. d. Write two map reduce programs which will demonstrate a. Each driver has driven total no, of hours b. Each driver has total no. of miles c. Your code will have comments e. You will paste your coding files, their corressponding outcomes in the form of jpg on the powerpoint slides and upload the powerpoints. * You do not have to do the way I have programmed, as long as you are providing the correct program generating the correct outputs you will get full points. timesheet.csv Rating Counter.txt from mrjob.job import MRJob class MRRating Counter (MRJOD) : def mapper (self, key, line): (userID, movies, rating, timestamp) line.split('\t') yield rating, 1 # yield - return the ratings and no 1 adds all the ratings up in the reducer stage def reducer (self, rating, occurences): yield rating, sum(occurences) if name main 3 MRRatingCounter.run() 16.1.76,3300 2 10.2.79,3300 3 10 3,6,280 4 10,4,70,3100 5 10 5,70,3200 6 10,6,70,3300 10.7,70,3000 8 16,9,76,3306 9 10,9,70,3264 16 10,10,50/2506 11 10 11,70,2900 12 10, 12: 70,3100 13 1,13,70,336 14 10,14,78,3300 15 10 15 76 3366 16 18:16.70,3400 17 19 17,70,3306 1 10,18,70,3306 19 16, 19.79,3300 29 10.20 30 1280 21 10.2150, 2500 22 10, 2,70,3300 22 10 2370,3366 24 10,24,7336 25 16, 2,7,336 26 16,26,6,2600 27 16 27,66,2706 28 10 28,33,1206 29 10,29,78,3306 3 10,07,3309 1 18,31,72,3166 32 10:2,70,3286 3 18,33,78,3366 34 10:34 76 33pm 35 16 35 , 36 18,36,19,1000 37 10.37,65, 2706 38 10,7,336 9 10,39,70,399 48 10,4,703166 41 10,41,70,3300 42 10:42,70,3100 43 10:43 7,3369 44 10,44,70,3366 45 10:45,65,2700 46 10:46:57:2366 19:47 74,3406 4 10:48,76,3406 10:49,68,280p from mrjob. job import MRJOB class MRRatingCounter (MRJOD): def mapper (self, key, line): (userID, movieId, rating, timestamp) yield rating, 1 line.split('\t') # yield - return the ratings and no 1 adds all the ratings up in the reducer stage def reducer(self, rating, occurences): yield rating, sum(occurences) name main': MRRatingCounter.run() a. I have provided you with my coding file as a txt document b. The data file that is uploaded is the timesheet of truckers C. The columns are : ID numbers of Drivers, the weeks they are driving, no of hours in each week they are driving and the miles they are covering each week. d. Write two map reduce programs which will demonstrate a. Each driver has driven total no, of hours b. Each driver has total no. of miles c. Your code will have comments e. You will paste your coding files, their corressponding outcomes in the form of jpg on the powerpoint slides and upload the powerpoints. * You do not have to do the way I have programmed, as long as you are providing the correct program generating the correct outputs you will get full points. timesheet.csv Rating Counter.txt from mrjob.job import MRJob class MRRating Counter (MRJOD) : def mapper (self, key, line): (userID, movies, rating, timestamp) line.split('\t') yield rating, 1 # yield - return the ratings and no 1 adds all the ratings up in the reducer stage def reducer (self, rating, occurences): yield rating, sum(occurences) if name main 3 MRRatingCounter.run() 16.1.76,3300 2 10.2.79,3300 3 10 3,6,280 4 10,4,70,3100 5 10 5,70,3200 6 10,6,70,3300 10.7,70,3000 8 16,9,76,3306 9 10,9,70,3264 16 10,10,50/2506 11 10 11,70,2900 12 10, 12: 70,3100 13 1,13,70,336 14 10,14,78,3300 15 10 15 76 3366 16 18:16.70,3400 17 19 17,70,3306 1 10,18,70,3306 19 16, 19.79,3300 29 10.20 30 1280 21 10.2150, 2500 22 10, 2,70,3300 22 10 2370,3366 24 10,24,7336 25 16, 2,7,336 26 16,26,6,2600 27 16 27,66,2706 28 10 28,33,1206 29 10,29,78,3306 3 10,07,3309 1 18,31,72,3166 32 10:2,70,3286 3 18,33,78,3366 34 10:34 76 33pm 35 16 35 , 36 18,36,19,1000 37 10.37,65, 2706 38 10,7,336 9 10,39,70,399 48 10,4,703166 41 10,41,70,3300 42 10:42,70,3100 43 10:43 7,3369 44 10,44,70,3366 45 10:45,65,2700 46 10:46:57:2366 19:47 74,3406 4 10:48,76,3406 10:49,68,280p from mrjob. job import MRJOB class MRRatingCounter (MRJOD): def mapper (self, key, line): (userID, movieId, rating, timestamp) yield rating, 1 line.split('\t') # yield - return the ratings and no 1 adds all the ratings up in the reducer stage def reducer(self, rating, occurences): yield rating, sum(occurences) name main': MRRatingCounter.run()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!