View source: R/style_helpers.R
interpolate | R Documentation |
This function generates an interpolation expression that can be used to style your data.
interpolate(
column = NULL,
property = NULL,
type = "linear",
values,
stops,
na_color = NULL
)
column |
The name of the column to use for the interpolation. If specified, |
property |
The name of the property to use for the interpolation. If specified, |
type |
The interpolation type. Can be one of |
values |
A numeric vector of values at which stops occur. |
stops |
A vector of corresponding stops (colors, sizes, etc.) for the interpolation. |
na_color |
The color to use for missing values. Mapbox GL JS defaults to black if this is not supplied. |
A list representing the interpolation expression.
interpolate(
column = "estimate",
type = "linear",
values = c(1000, 200000),
stops = c("#eff3ff", "#08519c")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.