def mapper(self, key, line): if False: yield # I'm a generator! for hashtag, (location, occ_time) in iterateHashtagObjectInstances(line): location = UTMConverter.getUTMIdInLatLongFormFromLatLong( location[0], location[1], accuracy=LOCATION_ACCURACY ) self.mf_hastag_to_ltuo_occ_time_and_occ_location[hashtag].append((occ_time, location))
def map_tweet_to_hashtag_object_at_varying_accuracies(self, key, line): if False: yield # I'm a generator! for hashtag, (location, occ_time) in \ iterateHashtagObjectInstances(line): for accuracy in ACCURACIES: utm_id = UTMConverter.getUTMIdInLatLongFormFromLatLong(location[0], location[1], accuracy=accuracy) self.mf_hastag_to_ltuo_occ_time_and_occ_utm_id[hashtag].append((occ_time, utm_id))