def process_profile(self, profile):
        logger.info(u"build_refsets: on {url_slug}".format(url_slug=profile.url_slug))

        for product in profile.products_not_removed:
            if product.biblio.display_title == "no title":
                # logger.info("no good biblio for tiid {tiid}".format(
                #     tiid=product.tiid))
                continue

            year = product.year
            try:
                year = year.replace("'", "").replace('"', '')
                if int(year[0:4]) < 2000:
                    year = "pre2000"
            except (__HOLE__, AttributeError):
                year = "unknown"

            self.record_product(
                year=year, 
                genre=product.genre, 
                host=product.host, 
                mendeley_discipline=product.mendeley_discipline)

            for metric in product.metrics:

                raw_value = metric.most_recent_snap.raw_value
                # only add to histogram if it is a number, not a string or mendeley dict etc
                if not isinstance(raw_value, (int, long, float)):
                    continue

                self.record_metric(
                    year=year, 
                    genre=product.genre, 
                    host=product.host, 
                    mendeley_discipline=product.mendeley_discipline, 
                    provider=metric.provider, 
                    interaction=metric.interaction, 
                    raw_value=raw_value)
dataset/ETHPy150Open Impactstory/total-impact-webapp/totalimpactwebapp/reference_set.py/RefsetBuilder.process_profile