Published
Edited
Aug 17, 2021
4 forks
5 stars
Insert cell
Insert cell
expression = createExpression(
[
"interpolate",
["linear"], ["zoom"],
0, ["rgb", ["get", "rating"], 0, 0],
10, ["rgb", 0, 0, ["*", 4, ["get", "rating"]]]
],
'color' // output type: number, string, color, ...
)
Insert cell
expression.evaluate(
{zoom: 9.2}, // global properties
{properties: {rating: 30}} // feature data
)
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more