def generate_factors(self, today_values, yesterday_values, json_factor_entries):
        """generate_factors method will generate factors using factors data."""
        rv = []
        for factor in today_values.get('factors', []):
            name = factor['name']
            other = get_value_from_dict_list(today_values['factors'], 'name', name)
            diff = factor['score'] - other['score'] if other else 0
            matched_factor = get_value_from_dict_list(json_factor_entries, 'key', name)
            try:
                factor_description = matched_factor.get('description', '')
                factor_name = matched_factor.get('name', '')
            except KeyError:
                factor_description = 'data is not there'
                factor_name = 'Not Available'
            except AttributeError:
                factor_description = 'data is not there'
                factor_name = 'Not Available'

            rv.append({
                'body': 'Factor',
                'Factor': name,
                'Factor Name': factor_name,
                'subject': self.domain,
                'dateYesterday': format_date_string(yesterday_values.get('date', '')),
                'dateToday': format_date_string(today_values.get('date', '')),
                'scoreYesterday': other['score'] if other else 0,
                'scoreToday': factor['score'],
                'scoreChange': diff,
                'diff': diff,
                'factorDescription': "{}".format(factor_description),
                "ss_time": today_values.get("date", ""),
            })

        return rv
generate_factors method will generate factors using factors data.
Solutions/SecurityScorecard Cybersecurity Ratings/Data Connectors/SecurityScorecardFactor/SecurityScorecardFactorSentinelConnector/scorecard.py