Thematic map
- Find the layer and field:
list_layers, thenread_featureswith a smalllimitto see the values. A numeric field suits graduated or proportional symbols; text or a few distinct values suit unique values. - Style it with
run_commandlayer.symbology:- Numbers:
{"layer": L, "type": "graduated", "field": F, "classes": 5, "method": "naturalBreaks"}(orquantile,equalInterval,geometricInterval,standardDeviation,arithmeticProgression,headTailBreaks(a few very large values among many small ones), or"breaks": [upper bounds]for classes set by hand), with an optional"ramp". For counts or sizes,"type": "proportional"usually reads better than colour. - Categories:
{"layer": L, "type": "unique", "field": F}. More than about 12 categories is hard to read, so suggest grouping first. - Colours:
layer.rampchanges the ramp afterwards (search_commands"color scheme" for the names). Use sequential ramps for amounts, diverging ones for values around a midpoint.
- Numbers:
- Context: dim other layers with
layer.transparency, or hide them withlayer.visibility.map.basemappaperkeeps a choropleth readable. - Labels, if they help:
labels.field, thenlabels.enable{"on": true}. Keep them sparse withlabels.style(size, halo) or a visibility range. - Frame the view with
layer.zoomTo, then export withshare.exportMap{"path": "map.png"}. Exporting writes a file, so the user is asked first. For a page with a legend and title, load theprint-layoutskill.
Say what you did in a sentence or two: which field, how many classes, which method. Everything can be undone.