This tool can be used to list each of the unique values contained within a categorical field of an input vector file's attribute table. The tool outputs an HTML formatted report (output
) containing a table of the unique values and their frequency of occurrence within the data. The user must specify the name of an input shapefile (input
) and the name of one of the fields (field
) contained in the associated attribute table. The specified field should not contained floating-point numerical data, since the number of categories will likely equal the number of records, which may be quite large. The tool effectively provides tabular output that is similar to the graphical output provided by the attribute_histogram tool, which, however, can be applied to continuous data.
def list_unique_values(self, input: Vector, field_name: str) -> Tuple[str, int]: ...