Repository navigation
Commit c62342e
Grey basemap, toggleable layers, and a legend that names the disclosure tier
The maps were drawn on satellite imagery, and a thin coloured polygon over the
green-and-brown of the coffee belt is invisible. Three changes, all aimed at the
same thing:
Black and white. A CSS filter on Leaflet's tile pane, so the imagery is
desaturated too and the drawn shapes are the only coloured thing on any base
layer -- rather than dropping the imagery, which is still there to switch to.
The obvious grey basemap, folium's cartodbpositron, emits a warning that CartoDB
now wants an API key; this uses Esri's Light Gray Canvas, keyless and the same
provider as the imagery already here. Every tile checked over all four fields at
three zooms before committing to it.
One colour for shapes, so hue is free to mean something. It now means exactly
two things, both readings: the disclosure tier and the verdict. Where two shapes
need telling apart they differ in weight, dash and fill.
Fitted, not fixed. These maps run from one three-hectare field to the whole
country and a single hand-picked zoom cut most of them off. Fitting exposed the
opposite problem -- at national zoom three hectares is under a pixel, so the
verdict map could not show the four verdicts it exists to show. Circle markers
are sized in pixels and survive every zoom; the polygon takes over as you zoom.
Layers and legend. Each overlay is a FeatureGroup with a checkbox, so the reader
can ask what changes when the palm extent goes away rather than take the
caption's word. The legend has a title and shows a dashed swatch for a dashed
shape.
L0 around L1, everywhere a boundary is drawn. AR2 answers a GeoID without a
grant at L0 with an S2 level-10 cell and with a grant at L1 with the boundary --
asked of the deployment, not assumed, and MASKED_LEVEL is pinned to it. Consent
is now something you can see: a dotted 81 km² cell with a 3 ha field inside it.
Fifteen checks, each verified by planting the regression it catches. Three did
not discriminate on the first attempt and were rewritten: the CartoDB check
spelled the vendor's name while folium renders the tiles from cartocdn.com, the
masked-cell check looked for the string "L0" and passed on a legend entry while
the cell was not drawn, and two older legend checks scraped inline styling and
broke on a restyle they had no opinion about. The legend now carries a class for
them to read.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 1778c68 commit c62342e
3 files changed
Lines changed: 2031 additions & 831 deletions
File tree
- dpi-demo
- services/tests
0 commit comments