A map drawn to a density it was handed
Everything in this collection treats distortion as a cost. It is measured, ranked, apportioned, bounded and blamed; four of this field’s anchors are four ways of pricing it and the whole of the choosing field is two ways of minimising it. The two ways a map is wrong sets the frame and every essay since has worked inside it: a projection is given, its derivatives are taken, and the numbers that come out are the damage.
Nothing here has ever asked for a distortion.
A cartogram does. It is a map whose areal scale factor is handed to it — so much page area per unit of something, region by region — and whose only job is to meet it. That inverts the site’s apparatus in a way that turns out to be productive rather than merely cute. The areal factor stops being an output and becomes a boundary condition, and every other invariant becomes the price.
The density is stated, not loaded
A cartogram of population needs population data, and this site does not take datasets — an area is a claim about a surface and a dataset’s surface is a vendor’s. The reason is the coastline decision this collection made early on: a dataset carries a generalisation level the reader cannot see, so a figure computed from one is partly a measurement of somebody’s vendor and the reader cannot tell how much.
For a cartogram that mistake would be made twice over, because the numbers would then be doing the arguing. A reader shown a population cartogram is being told two things at once — that some places are crowded, and that a map can be built to say so — and the second is the only one a projection collection can defend.
So the density here is a stated function: a floor plus a few smooth bumps at named places, with a sharpness that is a parameter. Its total mass over the sphere is a closed form,
so every quadrature below can be checked against arithmetic rather than against itself. Every figure names its density in the same breath as it names its projection, which is the site’s oldest habit applied to a second input.
The reduction that makes this cheap
A cartogram is usually presented as a hard numerical problem. It is only hard while the sphere is still in it.
The Lambert cylindrical projection carries the sphere to the rectangle , , and its Jacobian determinant is exactly — which is exactly the sphere’s own area element. So ground measure on that rectangle is , uniformly, and the fact that a cell of latitude and longitude has a closed-form area becomes the statement that the rectangle is a fair sheet of paper.
A cartogram of the sphere is therefore a map of that rectangle to itself whose Jacobian determinant is a prescribed function. The sphere never appears again.
That is worth stopping on, because it is the same move the site makes everywhere and it is easy to miss here. What survives a change of coordinates is the reason it works: the areal factor is an invariant, so a construction that gets it right on the rectangle gets it right on the sphere, whatever coordinates the rectangle was reached through.
The construction, which needs no iteration
The triangular map — Knothe’s, and Rosenblatt’s before it — pushes any positive density to the uniform one by two nested one-dimensional problems.
Let be the density on the rectangle, normalised to integrate to one. Take its marginal in ,
and send to the position its cumulative marginal puts it at. Then, for each separately, send to the position its conditional cumulative puts it at. Two quadratures, no solve, no mesh, no convergence criterion.
The Jacobian is lower triangular, because the first coordinate of the answer depends only on the first coordinate of the argument, so its determinant is the product of the two diagonal entries:
The marginal cancels. The determinant is the density, times the total area, exactly — not to a tolerance, not after refinement, exactly, by the algebra of a cumulative distribution and its own derivative.
Reading it with the site’s own instruments
The point of the reduction is not that the arithmetic is easy. It is that the result is a projection like any other, and the machinery that reads a projection does not know or care where it came from.
distortion() takes an object with a forward method, differences it four ways, and returns , , , , the areal factor and . It has never been shown anything but a formula. Handed a map defined by a pair of quadratures, it returns the same six numbers by the same route, and the areal factor it computes is a measurement of the drawn map rather than a restatement of the construction.
That distinction is the whole check. The construction says the determinant is ; the audit differences the map at radians and asks what the determinant actually is. If the two agree, the map is right and the arithmetic is right. If they disagree, one of them is wrong and the disagreement says which.
They agree to , which is the noise floor of a Richardson-extrapolated central difference on a function built from Simpson’s rule. There is nothing left over to report.
What it cost
A map has four derivatives at a point. Fixing the areal factor fixes one number, which is their determinant. Three degrees of freedom per point are left over, and the price of the request is where they land.
They land on the angle. Conformal means the two principal scale factors are equal, and nothing in the construction encourages that; the triangular map stretches hard in one direction and squeezes in the other wherever the density has a gradient.
The peak is on the flank, and that is not a detail. A uniform density of any value is met by a uniform scaling, which is a similarity and has no angular deformation whatsoever. What deforms a map is the change in what is being asked for, so the worst places on a cartogram are the boundaries between the crowded and the empty — exactly the places a reader looks at hardest.
What the quadrature is checked against
The construction is two integrals and every number above depends on both of them, so the site’s usual question applies: how does anyone know the integrals are right?
Not by refining them, which only shows that a quadrature has converged to whatever it converges to. The mass of the density has a closed form, term by term, and it is reached by a substitution that has nothing to do with Simpson’s rule: for a bump on the unit sphere, writing turns the surface integral into , which is elementary. Summing over the bumps and adding the floor’s gives the total.
A two-dimensional quadrature over the rectangle, at a resolution the construction never uses, agrees with that to three parts in a million. And it must disagree with the mass of a density it was not given, which is the half that makes it a check rather than a restatement: run the same comparison against another of the stated densities and it fails by more than a factor of two.
The same rule governs the tabulated cumulative marginal, which is the one place in the construction where a value is stored rather than computed. It is interpolated by a cubic Hermite whose end slopes are the exact marginal at each node — so the interpolant is continuously differentiable, its derivative is right at every node by construction, and the map’s own areal factor stays smooth across a cell boundary. A plain linear table was tried first and put a visible step into every measured and , at the grid spacing, which is exactly the signature a defect of that kind leaves.
Two numbers, not one
Reporting a single figure for the deformation of a cartogram is misleading, and the site nearly did it.
The map drawn above sits on top of the Lambert cylindrical rectangle, and that projection is already at 73.7° of angular deformation at 60° north and 133.0° at 78°, before any density has been applied. A total figure of 155° is therefore mostly a statement about the base map. So every measurement in this ladder reports two quantities: what the redistribution adds, computed from the Jacobian of the rectangle-to-rectangle map alone, and the total a reader actually sees.
For this density the redistribution alone reaches 139.1° at worst and averages 70.4° over the map. That is the number this anchor is about. The total is larger and belongs to a different argument — the one the equal-area cylindrical projections have been having since this collection began.
Every audit here therefore stops at 60° of latitude, and that is a decision about the instrument rather than about the map. The equal-area rectangle carries the poles to its own edges, where one degree of latitude occupies of the rectangle’s height against at the equator — so the last cell of any grid covers everything above about 78°, and a maximum taken over the whole sphere is a statement about one cell.
What a shape looks like on it
This is Tissot’s indicatrix with the sign of the argument reversed. Ordinarily the ellipse is what the map does to a circle and the areal factor is one of the things it reports. Here the areal factor was fixed first and the ellipse is what was left; the same object, read from the other end.
The reading a cartogram invites
There is a further cost, and it is not in the derivatives at all.
The four numbers a projection reports at a point describe what happens to an infinitesimal circle there. They say nothing about what happens to a distance between two places, because a distance is an integral along a curve and the curve passes through many points with different numbers. A scale bar is right in one place makes that argument for an ordinary projection; on a cartogram it is far worse, because the areal factor was chosen to vary rather than allowed to.
Measured over twelve pairs of the named places, with the page scaled so that the median pair reads exactly right — the most generous calibration available — the worst pair on this map is out by 35 per cent. A reader with a ruler and the legend’s scale is not making a bad measurement of a distance; they are making a measurement of something that is not a distance.
That is the subject of the fourth rung and it is mentioned here because the temptation is to treat the shape cost as the whole price. It is not. The shape cost is what the derivatives report; the reading cost is what a reader does with the page, and the two are different sizes.
There are two triangular maps, and the construction picks one
The construction is asymmetric by design — it spends its whole correction in x and then repairs y conditionally — and the asymmetry has a consequence the essay’s own summary implies without stating: the same density has a second triangular map, obtained by doing y first.
That map is as exact as this one. The determinant argument does not care which coordinate is marginalised: take the marginal in y, push y to its cumulative, then push x to its conditional cumulative, and the two diagonal entries multiply to the same 4π σ. Two constructions, one request, both met to the arithmetic’s floor.
They are not the same map, and they do not cost the same. The shape damage is decided by where the stretching lands, and the two orders put it in different places: the x-first map is nearly rigid in y along any line where the density’s x-marginal is flat, and the y-first map is nearly rigid in x wherever the y-marginal is. On a density whose features are elongated in one direction — which is what a real one usually is, since coastlines and populated belts run somewhere — the two will differ, and nothing about the density says in advance which is better.
This ladder measures neither. It measures the x-first map, which is the one the reduction reaches first through the Lambert rectangle, and it reports a worst angular deformation of 139.1° and a mean of 70.4°. Whether the y-first map on the same density is better or worse is a single re-run of the same code and is not in these figures.
That is worth recording as owed rather than glossing, because it sharpens the shortfall in the section above. The triangular map is close to the worst member of the family is stated there as an expectation; the cheapest possible test of it is the other member of a pair the construction already contains, and the difference between the two is a lower bound on how much better the family’s best member is than this one.
There is a third thing in the same neighbourhood and it is free. A uniform density costs nothing — the map is then a similarity, with no angular deformation anywhere — so the whole cost is a functional of how the density varies rather than of what it is. Scaling a density by a constant changes nothing at all, since the normalisation removes it; scaling its contrast is what moves the cost. The 25.99-to-one contrast of the density used here is therefore the parameter the 139.1° belongs to, and quoting the deformation without it is quoting half a measurement.
Where the model stops
Three things this construction does not do, and each of them is a rung further up.
It is not the only map that meets the request. Compose it with any area-preserving map of the rectangle — a shear, a swirl, a second cartogram of a uniform density — and the result meets the same density exactly. There is a whole infinite-dimensional family, and the triangular map is one member chosen for being computable rather than for being good.
It is not the least distorted member of that family. It is close to the worst. The triangular construction spends its entire correction in first and then repairs conditionally, which is as asymmetric as a construction can be, and the shape cost shows it.
It is not what anybody publishes. Every implementation of the last twenty years computes a diffusion cartogram, which produces a picture a reader recognises and which does not meet its target exactly. The pairing between those two facts is the subject of the next rung.
Who found it, and when
The triangular construction is Rosenblatt’s, from a 1952 paper on transforming multivariate distributions, and Knothe’s, from a 1957 paper on convex bodies; neither was thinking about maps. That two statisticians and a geometer arrived at the same object is the usual sign that the object is the natural one, and the reason it works here is that a cartogram and a change of variables in a probability integral are the same problem written in different notation.
The existence result behind it is older and more general. Moser’s theorem — that any two smooth positive densities of equal total mass on a compact manifold are related by a diffeomorphism — says that the request is always grantable, whatever the density, and says nothing whatever about the cost. The whole of this ladder lives in that gap.
Where the ladder goes next
The request can always be met, so this anchor never asks whether a map exists. It asks which of the infinitely many maps that meet it was chosen, what that choice cost, what a discretisation of the choice does when it goes wrong, and what a reader who takes a ruler to the result is actually measuring.
The boundary against the condition ladder is exactly there. That anchor’s answer is sometimes no such map exists — rung 7 is the essay in which a request is refused — and this one’s never is.
Named alongside this one
Essays reaching for the same objects. Nobody chose these; they are what the concept index makes visible.
- Everything else on the page pays for the areas angular deformation · areal factor · cartogram · density · principal scale factors · shape distortion
- The ellipses are a sample, drawn at a size somebody chose angular deformation · areal factor · equal-area · lambert cylindrical · principal scale factors
- A dot map's density is partly the projection's areal factor · density · equal-area · quadrature
- A map of a body with three axes angular deformation · equal-area · jacobian · principal scale factors
- An error ellipse is an indicatrix angular deformation · equal-area · jacobian · principal scale factors
- The sample was drawn on the page angular deformation · areal factor · equal-area · quadrature
What links here
Every essay whose body links to this one.
- A density that asks for no room at all
- Every density can be met and none is free
- The cheapest map that meets its areas
- A map that meets its target can fold
- The nearest equal-area map to an impossible request
- A cartogram keeps the shapes it inflates
- One number changed and the whole map moved
- The ground has an indicatrix too
The objects this essay names
Each one links to every other essay that touches it.
Angular deformationAreal factorBoundary conditionCartogramDensityEqual-areaJacobianLambert cylindricalPrincipal scale factorsQuadratureShape distortionTriangular map