Numeric visualizations (color & size)
Numeric visualizations use a numeric attribute to either vary colors or sizes between ranges of values and are defined in FSL with "type: numeric"
.
Ranges are calculated between 3-10 discrete steps using a classification method or on a continuous scale between an attribute’s min and max values. Felt offers the following methods to symbolize numeric data:
Color
Color numeric
values in your data using the color
property.
Stepped color
This map shows the percent of renter occupied housing units by US county. Each county is colored according to the step of ranges it falls into using a sequential color palette where light colors are assigned to low values and darker colors for high values.
The style for this map is defined
with the visualization
type: numeric
numericAttribute: "Renter occupied (%)"
and the computedsteps
using Jenks Natural Breaks over 5 classesthe sequential
color
array where each color is applied to a distinctstep
range
Continuous Color
The map below shows average accumulated precipitation in the State of California between the years 1900 - 1960 and is colored along a continuous range between the min and max of the precipitation values.
In this case, the numeric style is applied using a continuous method.
In the
config
block, thenumericAttribute: PRECIP
hassteps
that range between the min and max values of[2.5,125]
The
color
property has an array of three colors["#fde89b", "#f37b8a", "#4d53b3"]
that are interpolated to give each precipitation value a unique color
Any time there are fewer colors than values in a numeric style, they are interpolated in the (hcl color space).
Felt also supports stepped and continuous color numeric visualizations on raster datasets like you can see on the map below
which includes a raster layer with the following style
Notice that in the config
block we are using band
instead of numericAttribute
to define which band will be used for display
Size
Size numeric
values in your point or line data using the size
property.
Stepped size
The map below shows earthquakes over the past year sized with 5 manually defined steps.
In this case, the numeric style is applied using a classed method.
In the
config
block, thenumericAttribute: mag
has manually-definedsteps
for 5 classesThe
size
property has an array of five sizes, one for each defined class
Map link: Earthquakes Stepped Size
Continuous size
The map below shows tonnes of corn that have been exported from Ukraine since August 2022 under the UN’s Black Sea Grain Initiative. The symbol size for each country is proportionate to its value in the data.
To do this the min and max steps
from the numericAttribute: tonnes
are interpolated to be proportionately sized between a min and max point size — size:[5,48]
Last updated