(self, columns, filters, as_dict=False)
return list(indicators.values())
Return a list of indicators to be used in a data source configuration that supports the given columns and
        indicators.
        :param columns: A list of objects representing columns in the report.
            Each object has a "property" and "calculation" key
        :param filters: A list of filter configuration objects
Return a list of indicators to be used in a data source configuration that supports the given columns and
        indicators.
        :param columns: A list of objects representing columns in the report.
            Each object has a "property" and "calculation" key
        :param filters: A list of filter configuration objects
Return a list of indicators to be used in a data source configuration that supports the given columns and indicators . : param columns : A list of objects representing columns in the report . Each object has a property and calculation key : param filters : A list of filter configuration objects
def indicators(self, columns, filters, as_dict=False):
        """
        Return a list of indicators to be used in a data source configuration that supports the given columns and
        indicators.
        :param columns: A list of objects representing columns in the report.
            Each object has a "property" and "calculation" key
        :param filters: A list of filter configuration objects
        """

        indicators = OrderedDict()
        for column in columns:
            # Property is only set if the column exists in report_column_options
            if column['property']:
                column_option = self.report_column_options[column['property']]
                for indicator in column_option.get_indicators(column['calculation']):
                    # A column may have multiple indicators. e.g. "Group By" and "Count Per Choice" aggregations
                    # will use one indicator for the field's string value, and "Sum" and "Average" aggregations
                    # will use a second indicator for the field's numerical value. "column_id" includes the
                    # indicator's data type, so it is unique per indicator ... except for choice list indicators,
                    # because they get expanded to one column per choice. The column_id of choice columns will end
                    # up unique because they will include a slug of the choice value. Here "column_id + type" is
                    # unique.
                    indicator_key = (indicator['column_id'], indicator['type'])
                    indicators.setdefault(indicator_key, indicator)

        for filter_ in filters:
            # Property is only set if the filter exists in report_column_options
            if filter_['property']:
                property_ = self.data_source_properties[filter_['property']]
                indicator = property_.to_report_filter_indicator(filter_)
                indicator_key = (indicator['column_id'], indicator['type'])
                indicators.setdefault(indicator_key, indicator)

        if as_dict:
            return indicators

        return list(indicators.values())
def indicators ( self , columns , filters , as_dict = False ) : indicators = OrderedDict ( ) for column in columns : # Property is only set if the column exists in report_column_options if column [ 'property' ] : column_option = self . report_column_options [ column [ 'property' ] ] for indicator in column_option . get_indicators ( column [ 'calculation' ] ) : # A column may have multiple indicators. e.g. "Group By" and "Count Per Choice" aggregations # will use one indicator for the field's string value, and "Sum" and "Average" aggregations # will use a second indicator for the field's numerical value. "column_id" includes the # indicator's data type, so it is unique per indicator ... except for choice list indicators, # because they get expanded to one column per choice. The column_id of choice columns will end # up unique because they will include a slug of the choice value. Here "column_id + type" is # unique. indicator_key = ( indicator [ 'column_id' ] , indicator [ 'type' ] ) indicators . setdefault ( indicator_key , indicator ) for filter_ in filters : # Property is only set if the filter exists in report_column_options if filter_ [ 'property' ] : property_ = self . data_source_properties [ filter_ [ 'property' ] ] indicator = property_ . to_report_filter_indicator ( filter_ ) indicator_key = ( indicator [ 'column_id' ] , indicator [ 'type' ] ) indicators . setdefault ( indicator_key , indicator ) if as_dict : return indicators return list ( indicators . values ( ) )