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.

RepresentationUse it forIn the gallery
Classed choroplethOne number per district, in five honest classes. Missing is hatched, never pale.Machhar: dengue weather this week against the district's past (percentile).
BivariateTwo 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 densityDensity 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 densityCounts 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.

RepresentationUse it forIn the gallery
Hexagon binsMany 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 surfaceWhere things concentrate, as a smooth glow. For patterns, not for reading exact values.Devrai: groves listed, as weight at each district's centre.
IsobandsA 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 contoursBands 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.
RidgelinesA 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.

RepresentationUse it forIn the gallery
Proportional circlesHow many, where: circle area is exact, so a circle twice the area is twice the number.Devrai: groves listed per district.
Dorling cartogramProportion over geography: circles pushed apart until none overlap. Every place stays visible.Devrai: groves listed per district, coloured by the name each region uses.
SpikesHuge 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 glyphsA 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 dataThe 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.

RepresentationUse it forIn the gallery
Wind particlesA 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.
FlowsFrom 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.
TracksA 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.
PulsesAttention, gently: fresh reports and alerts breathe; everything else stays still.Tiddi: surveys that found locusts (hoppers or adults), India, since 2020.
Time sweepA 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.

RepresentationUse it forIn the gallery
Neighbour networkWhat'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).
CatchmentsThe 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.

RepresentationUse it forIn the gallery
TerrainThe 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.

ThemeFor
PaperWarm, quiet paper. The default for data maps in daylight.
ChalkNear-white and cool. For dense colour where the base must almost vanish.
InkLine only, no fills: an engraved look for prints, textures and glyphs.
NightDeep blue-black. For light, motion and anything that should glow.
DuskDark and warm. The dark-mode twin of Paper.
ReliefPaper with the land's shape: hillshade from open terrain data. Terrain in 3D on request.
BlankLand 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.

TextureReads as
dotsEven dots: a quiet, countable area.
stippleRandom stipple: sand, scrub, bare ground.
hatchDiagonal hatch: regulated, designated, 'this is a zone'.
crossCross-hatch: built, dense, man-made.
wavesWaves: water, wet ground, tide.
crownsTree crowns: forest, groves, canopy.
reedsReeds: marsh, wetland, mangrove edge.
rowsFurrows: fields, cultivation.
bricksBricks: towns, settlement.
grainFine 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

WhatForLicence
MapLibre GL JSThe basemap, fill patterns, hillshade and 3D terrainBSD-3-Clause
deck.glGPU layers: symbols, aggregation, paths, trips, extrusion, filteringMIT
OpenFreeMap · OpenStreetMapVector tiles the themes are drawn fromODbL data, free tiles
MapterhornOpen elevation tiles for hillshade and terrainOpen, attributed
d3-contour, d3-force, d3-delaunayIsobands, the Dorling layout, catchmentsISC