Categorical visualizations
Last updated
Last updated
Categorical visualizations use a categorical attribute and the categories within it to apply styling to discrete categories of the attribute. On raster datasets, it uses a band instead of an attribute.
Categorical visualizations are defined using "type": "categorical"
and, for every supported style and label property used, either a single value that will apply to all categories or an array of different values for each category.
The Global Power Plants layer in Felt is an example of a categorical layer on a vector dataset
and is defined by the following style
Notice that we are saying that the primary_fuel
data attribute will be used to categorize elements and that the possible values of that attribute that we are interested in are "Nuclear"
, "Oil"
, "Coal"
, "Gas"
, "Wind"
, "Hydro"
and "Solar"
. Also notice that we are defining either a single value that will apply to all categories (i.e. size
) or a value for each category (i.e. color
)
The Cropscape CDL layer in Felt is an example of a categorical layer on a raster dataset
and is defined by the following style: