mapper and reducer for extracting the engagement data