Categorical

Categorical variables can be called by declaring categorical: true in your variable specification:

    // ...variables
    {
        variable: "Most Common Heating Fuel",
        numerator: "household_data",
        nProperty: "Fuel Type",
        categorical: true,
        colorScale: colors.colorbrewer.Dark2,
    }

You can use any data properties for categorical data, but note that the map will search for exact matches to the data categories. Similarly, you can use any color scheme, although colorBrewer's Qualitative Color Schemes (or similar) may be best suited for categorical variables.

Note that categorical variables will look for every unique value and assign it a color. For data columns or variables with a large number of unique values, this may not be the best option.

Last updated