choropleth
A dataset column joined onto a map's regions and shaded by value.


#Attributes
basemapThe boundary pack the join shades, or an attached
.geojson dataset by #id.worldus-statescanada-provincesaustralia-statesuk-countiesnz-regionseurope-admin1choropleth:valueregionsThe
column matched against each region's name or code.valueThe column of numbers each region reads, which
colour shades along.colourThe ramp the regions shade along by
value, or a map that paints each region flat.value-colour-styleAlso written:
colorDefault
multicolourinvertFlips the ramp, putting deep colour at low values.
Default
falsestyleHow each region is filled: solid, hatched, dotted or outlined.
fill-style-styleDefault
solidsliceThe column that long-format data is sliced by, showing the slice the scene's control stands on.
opacityHow heavy the shading sits over the basemap.
Default
1hiddenDeclared but not drawn.
Default
false#Derived attributes
Computed while the element renders — read one with #id.name in attribute position or {{#id.name}} in prose, never set.
minThe smallest joined value.
maxThe largest joined value.
meanThe mean of the joined values.
countHow many regions the join covered.
#Allowed in
#Examples


region:world{
choropleth#gdp(basemap: world; regions: #economy.country; value: #economy.gdppc)
}

region:world{
choropleth(basemap: world; regions: #anomaly.country; value: #anomaly.delta; colour: #anomaly.delta -> -2..2 -> temperature)
}

region:world{
slider:t(column: #rates.year; name: Year)
choropleth(regions: #rates.country; value: #rates.rate; slice: #rates.year; colour: #rates.rate -> 0..220 -> multicolour)
}#Notes
- A region the join does not cover keeps the plain land fill.
- A
value:column of words compiles but shades nothing. - The legend gives a strip for each scale.