How the Kit works
Three layers under every Maplore map: the spine holds the numbers, the place registry says where each one belongs, and the Kit decides how it is drawn.
Three layers
- Spine
- One database of every value Maplore publishes, each tied to the run that made it and its source. Published as plain files: value files by place and period, boundary tiles, and each atlas's own files.
- Places
- Every state, district, block, village and panchayat in India's Local Government Directory, keyed on its LGD code. Every number hangs on a place; every boundary has a stated source.
- Kit
- How it is drawn: basemap themes, colour, textures, 23 representations, motion and legends, as plain modules any Maplore page loads. See them all.
The stage
Every Kit map is one stage: a MapLibre basemap in one of Maplore's themes, India's outline from Survey of India, and deck.gl layers woven in underneath the place names (interleaved, so data and basemap share one WebGL context and one depth order). Each representation owns a named slot on the stage; moving ones are rebuilt from one shared clock each frame. Data comes from the spine: the Kit's own published geography (districts drawn for India-scale maps, a point inside each district, and which districts share a border) plus each atlas's value files.
Representations
Each takes plain data and returns its layers and its key. None fetches anything, so any atlas can use any of them.
Surfaces
A value for every area.
| Representation | Use it for | In the gallery |
|---|---|---|
| Classed choropleth | One number per district, in five honest classes. Missing is hatched, never pale. | Machhar: dengue weather this week against the district's past (percentile). |
| Bivariate | Two numbers at once: where both are high (the dark corner) is where to look. | Machhar: dengue's warmth score against its humidity score, by district. |
| Texture density | Density as marks, not colour: prints in one ink, and leaves colour for a second variable. | Devrai: sacred groves listed per district, tinted by the name each region uses. |
| Dot density | Counts you can almost count: each dot is a fixed number, scattered inside its area. | Devrai: listed groves, one dot for every five. |
Fields
Continuous surfaces from points and grids.
| Representation | Use it for | In the gallery |
|---|---|---|
| Hexagon bins | Many points, counted into even cells: density without the clutter; extruded for drama. | Tiddi: locust field surveys in India, the last 90 days (FAO Locust Hub). |
| Heat surface | Where things concentrate, as a smooth glow. For patterns, not for reading exact values. | Devrai: groves listed, as weight at each district's centre. |
| Isobands | A continuous field in bands: rain, temperature, moisture. Reads like a weather chart. | Tiddi: rain over the last 30 days across the desert breeding belt (ECMWF via Open-Meteo). |
| Tanaka contours | Bands lit from the north-west: a field reads as a landscape, highs rise off the page. | Tiddi: soil moisture at 7–28 cm, the ground locusts lay eggs in. |
| Ridgelines | A grid drawn as a range of hills, row by row. For texture and mood more than lookup. | Tiddi: soil moisture at 7–28 cm across the desert breeding belt. |
Symbols
One mark per place.
| Representation | Use it for | In the gallery |
|---|---|---|
| Proportional circles | How many, where: circle area is exact, so a circle twice the area is twice the number. | Devrai: groves listed per district. |
| Dorling cartogram | Proportion over geography: circles pushed apart until none overlap. Every place stays visible. | Devrai: groves listed per district, coloured by the name each region uses. |
| Spikes | Huge ranges without covering the map: height carries the number, the base stays small. | Machhar: dengue weather index this week, by district. |
| Prisms (3D) | Areas raised by value. Striking for a poster or an opening shot; pair with a flat map to read. | Machhar: dengue weather index this week. |
| Radial glyphs | A whole cycle at each place: twelve months, twenty-four hours. Compare shapes, not numbers. | Pratirodh: resistance genes in city drains by calendar month, with each city's wet season. |
| Names as data | The words are the map: names sized by how much they carry, the smaller giving way. | Devrai: the local names for sacred groves, sized by how many groves carry each. |
Motion
Things that travel, drawn moving.
| Representation | Use it for | In the gallery |
|---|---|---|
| Wind particles | A vector field in motion: wind, currents, migration pressure. Speed in colour, direction in flow. | Tiddi: wind at 850 hPa (about 1.5 km up, where swarms fly), ECMWF forecast. |
| Flows | From here to there, how much: arcs sized by volume, travellers moving along them. | Tiddi: where today's wind would carry a swarm leaving each breeding area in three days. |
| Tracks | A journey unfolding: routes, drift, spread. The ghost line shows the whole path ahead. | Tiddi: the same wind drift, drawn day by day as a swarm would fly it. |
| Pulses | Attention, gently: fresh reports and alerts breathe; everything else stays still. | Tiddi: surveys that found locusts (hoppers or adults), India, since 2020. |
| Time sweep | A window of time sliding forward: what was seen when. Filtering on the GPU keeps it smooth. | Tiddi: every field survey in India over the last 90 days, a fortnight at a time. |
Networks
Places joined to places.
| Representation | Use it for | In the gallery |
|---|---|---|
| Neighbour network | What's next door: every district joined to those it borders, and a spread moving hop by hop. | Spine: districts that share a border (PostGIS, from the registry's boundaries). |
| Catchments | The area each site covers: nearest station, nearest clinic, nearest survey. | Tiddi: the nearest locust survey of the last 90 days, for any spot in the desert. |
Relief
The shape of the land.
| Representation | Use it for | In the gallery |
|---|---|---|
| Terrain | The land's shape in 3D, from open elevation data: valleys, ridges, the ghats and the Himalaya. | Mapterhorn open terrain tiles; hillshade and 3D terrain in the Relief theme. |
Themes
A theme is a set of colour tokens on one recipe over open vector tiles, so every Maplore map shares one cartography, and a new look is a dozen lines.
| Theme | For |
|---|---|
| Paper | Warm, quiet paper. The default for data maps in daylight. |
| Chalk | Near-white and cool. For dense colour where the base must almost vanish. |
| Ink | Line only, no fills: an engraved look for prints, textures and glyphs. |
| Night | Deep blue-black. For light, motion and anything that should glow. |
| Dusk | Dark and warm. The dark-mode twin of Paper. |
| Relief | Paper with the land's shape: hillshade from open terrain data. Terrain in 3D on request. |
| Blank | Land and sea only. For cartograms, glyphs and anything that replaces geography. |
Textures
Patterns drawn on canvas at three densities, seeded so they never change between loads or prints. A texture carries a kind of land or a density without using colour, so colour stays free for a second variable, and the map still prints in one ink.
| Texture | Reads as |
|---|---|
| dots | Even dots: a quiet, countable area. |
| stipple | Random stipple: sand, scrub, bare ground. |
| hatch | Diagonal hatch: regulated, designated, 'this is a zone'. |
| cross | Cross-hatch: built, dense, man-made. |
| waves | Waves: water, wet ground, tide. |
| crowns | Tree crowns: forest, groves, canopy. |
| reeds | Reeds: marsh, wetland, mangrove edge. |
| rows | Furrows: fields, cultivation. |
| bricks | Bricks: towns, settlement. |
| grain | Fine grain: a near-flat tint with a tooth, for print. |
Motion
- One clock. Everything that moves on a stage reads the same clock, so motion can be paused, scrubbed or tied to a date slider in one place.
- The GPU does the moving. Paths are traced once (wind streamlines, flows, tracks); the GPU animates the trails. Time windows filter on the GPU, so nothing is re-sent per frame.
- Still for those who ask. A visitor who has asked their device for reduced motion gets one still frame of every moving representation, never an animation.
- Camera shots. A story can open with a sequence of camera moves that hold on each place, and jump instead of fly with reduced motion.
Rules every representation keeps
- Missing is missing. No value is drawn as missing (hatched), never as zero or the palest class.
- Honest scales. Areas are proportional to values (circles by square root); classes are stated with their edges; heavy-tailed data can use head/tail breaks rather than hiding in one class.
- Colour that reads. Palettes are Maplore's own, interpolated in a perceptual colour space so steps look even, with separate tunings for paper and night.
- No location that should not be found. Dot density places dots at random inside an area, never at a record's position; sensitive atlases (Devrai) publish counts only.
- India's outline, not the basemap's. Themes draw no country or state names and no boundary lines from the tiles; the stage draws Survey of India's outline.
- Labels above data. Data goes under the first label layer; names that would overlap give way, smaller first.
Using it
<script src="https://cdn.jsdelivr.net/npm/maplibre-gl@5.24.0/dist/maplibre-gl.js"></script>
<script src="https://cdn.jsdelivr.net/npm/deck.gl@9.4.0/dist.min.js"></script>
<script type="module">
import { createStage } from "https://maplore.in/kit/stage.js";
import * as spine from "https://maplore.in/kit/spine.js";
import { choropleth, wind } from "https://maplore.in/kit/reps.js";
const stage = await createStage("map", { theme: "paper" });
const [fc, v] = await Promise.all([spine.districts(), spine.values("machhar.dengue.pct_vs_past")]);
const map = choropleth({ data: fc, value: (f) => v.get(f.id) ?? null, palette: "heat", method: "equal" });
stage.set("dengue", map.layers, map.native); // map.legend is the key, as HTML
</script> Built on
| What | For | Licence |
|---|---|---|
| MapLibre GL JS | The basemap, fill patterns, hillshade and 3D terrain | BSD-3-Clause |
| deck.gl | GPU layers: symbols, aggregation, paths, trips, extrusion, filtering | MIT |
| OpenFreeMap · OpenStreetMap | Vector tiles the themes are drawn from | ODbL data, free tiles |
| Mapterhorn | Open elevation tiles for hillshade and terrain | Open, attributed |
| d3-contour, d3-force, d3-delaunay | Isobands, the Dorling layout, catchments | ISC |