Layered Interactive Maps for Infrastructure Siting: Clustering, Heat Layers, and Quantile Colour Coding
How planners combine marker clustering, quantile-based colour thresholds, and demand heat layers in a single interactive web map to decide where new infrastructure — like EV chargers — should go next.
The siting problem behind the map
Deciding where to put the next unit of physical infrastructure — a charging point, a clinic, a transit stop — is fundamentally a spatial statistics problem dressed up as a map. You have a set of existing installations, each with a performance number attached (revenue, utilisation, footfall), and you need to answer two questions at once: which of the existing sites are actually working, and where are the gaps that the next investment should fill? A table of coordinates and numbers cannot answer that at a glance; a map layered with the right visual encoding can.
A worked example that shows the pattern clearly is a network of electric-vehicle charging stations spread across a city's districts. Each station has a location, an operator, and a few months of session logs that roll up into total revenue and utilisation. The interesting part is not plotting the dots — it's deciding what each dot's colour, size, and grouping should communicate, and then adding a second and third layer that tell a different part of the same story without turning the map into noise.
Quantile colour coding instead of a fixed scale
The first temptation with a "high/medium/low" legend is to pick round-number thresholds — say, above 100,000 currency units is "high." That breaks the moment the dataset shifts: a strong month across the whole network would reclassify almost everything as "high," making the map useless for comparison. The more robust approach is to compute thresholds from the data itself, using quantiles of the metric being mapped.
Concretely: sort every station by trailing revenue, then mark anything above the 75th percentile as top-tier, anything between the 50th and 75th as mid-tier, and the rest as low-tier. Because the thresholds are recomputed from the current dataset every time the map refreshes, the colour split stays meaningful as the network grows — you're always looking at "the best-performing quarter of what exists today," not an arbitrary number picked eighteen months ago. This is the same logic behind choropleth colour breaks in tools like Plotly Express, just applied to point markers instead of filled polygons.
The practical effect on the map: a green marker means "this location earns more than three-quarters of comparable locations," a blue marker means "middling," and a grey marker means "underperforming relative to peers, worth investigating or replacing." That single colour rule replaces paragraphs of tabular explanation.
Clustering so the map stays legible while zoomed out
Plot sixty markers on a city-wide view and at low zoom they visually collide into an unreadable blob — you can't tell if a dense-looking area has three stations or thirty. Marker clustering solves this by dynamically grouping nearby points into a single numbered badge whenever the map is zoomed out far enough that they'd overlap. Zoom in, and the cluster progressively "explodes" back into individual markers as there's enough screen space to show them without overlap.
The cluster badge itself can carry information too — sizing or colour-coding the badge by how many markers it contains (small cluster vs. large cluster) gives an at-a-glance density read even before zooming in: a large badge over one neighbourhood immediately flags it as saturated, while a lone unclustered marker flags an isolated outpost. Clustering radius is a tunable parameter — a tighter radius clusters less aggressively and shows more individual detail sooner as you zoom in; a looser radius keeps the map calmer at the cost of hiding detail longer.
A second layer: demand heat instead of individual points
Existing station locations answer "where is infrastructure already sitting." A separate question — "where is the underlying demand" — needs a different visual layer, because demand doesn't live at discrete points; it's a continuous surface across the map. A heat layer approximates that surface by drawing overlapping, semi-transparent radius circles or true kernel-density blobs around known demand signals (population density, existing session volume nearby, search/enquiry data), coloured on a red-to-blue intensity scale.
The key design decision is keeping the heat layer and the station-marker layer as toggleable, independent layers rather than merging them into one view. Overlaying both permanently creates visual competition — the eye can't judge marker colour and background heat intensity simultaneously. Letting the user switch between "existing stations," "demand heat," and a third "recommended new locations" layer turns one map into three purpose-built views without three separate pages.
Turning the map into a recommendation layer
The most useful layer isn't descriptive (what exists) but prescriptive (what should exist next). A simple, transparent way to build this is a scored overlay: for every candidate neighbourhood, combine a normalised demand estimate with a normalised measure of how saturated that area already is by existing infrastructure, into a single 0–100 opportunity score. Neighbourhoods with high demand and low existing saturation score highest; neighbourhoods that are already dense with infrastructure score low regardless of demand, because the marginal value of one more unit there is small.
Rendering that score as its own marker layer — larger or gold-coloured markers for the top-scoring candidates, smaller orange markers for good-but-not-best options — gives decision-makers a ranked shortlist directly on the map, with a popup on each candidate showing the underlying numbers (estimated demand, current saturation, projected return) so the score isn't a black box. This closes the loop from "here's what exists" to "here's what to build next," which is the actual deliverable a siting analysis needs to produce.
Frequently Asked Questions
Why use quantiles instead of fixed colour thresholds on a map?
Fixed thresholds (e.g. "above 100,000 is high") go stale as the dataset changes — a strong month can reclassify almost everything as "high." Quantile-based thresholds are recomputed from the current data every time, so the colour split always represents a relative ranking (e.g. "top 25% of current locations") rather than an arbitrary absolute number chosen once and forgotten.
What does marker clustering actually solve?
At low zoom, dozens of nearby point markers visually overlap into an unreadable blob. Clustering groups them into a single numbered badge until the user zooms in far enough for the points to be shown individually without collision, keeping the map legible at every zoom level instead of only at street-level zoom.
Why keep heat layers and marker layers separate instead of combining them?
A heat layer encodes a continuous background intensity (demand), while markers encode discrete point values (specific stations). Rendering both simultaneously creates visual competition for the eye. Making them independent, toggleable layers lets each one be read cleanly, and lets one map serve multiple analytical questions instead of one cluttered view trying to answer all of them at once.
How is a 'recommended location' score typically built?
A common approach normalises two or more signals — estimated local demand and current infrastructure saturation — onto comparable 0–1 scales, then combines them (often demand minus a saturation penalty, or a weighted average) into a single opportunity score. High demand with low saturation scores highest; areas already dense with infrastructure score low even if demand is high, since the marginal benefit of adding one more unit there is smaller.