So how do you create those cartograms?
Well you start, in this case, with a grid of density data.
And this is an old algorithm for doing this.
There's better techniques that are more sophisticated but
also much more complicated.
This is a nice way to do it.
If you just fill a grid in with density data such as your local
population density so within some unit area, what is the population density?
And so it could be heavily populated in this area and
lightly populated in these areas.
And so you create a grid like that of rectangular cells and
then you just scale each cell by that density value.
So the squares that have a population density
of one-half get shrunk by one-half in area.
So that's about 70% horizontally and vertically.
The areas that have population density one stay the same size, and
the areas that have larger population densities would grow proportionally, so
these squares would become twice as big, these squares become three times as big.
And then you can see that what we had as a grid before now becomes disconnected.
And so to reconnect it, we want to reconnect these corners to their average
of the four corners that shared that corner.
So we want to find a new point for
this corner equal to the average of these four previous corner points.
So we create a new set of grid vertices equal
to the average of the four grid vertices that shared them before.
Or three or two depending on, or one, if you're on the perimeter.
And so we create this new grid and this new grid is deformed.
And so based on this deformed grid We keep iterating that over and
over until we get a final deformed grid, and
then we look at the differences between the original grid points and
their new positions in the deformed grid that sets up a deformation.
It basically tells us what direction we should move data points.
Then, we take our shape vertices of the outline data of our original map and
deform them based on these arrows, and we can smoothly interpolate
these arrows if we need in between values in order to create the cartogram.
Its basically,
we take a vector graphics representation of our data of our map and then deform
the vertices based on this type of deformation to create the cartogram.
So another technique that might be better than a cartogram is the ordinary
choropleth, and we see choropleths all the time.
It's basically data that's plotted over regions of a map.
This is that same population data but
plotted inside the original outlines of our regions.
In here, population is Is just given by the saturation of the color,
and when we're looking at ordinal values,
basically we can see that China has more population than India does,
has more population than the U.S., which has more population than Brazil and so on.
So you get a better indication of the order of these things from a chloropleth
than you might with a cardogram because area is such a poor indicator order,
whereas density saturation hue, density being intensity of a color or
saturation in hue, are much better indicators of order.