this is not a heat map

The term “heat map” has become increasingly confused. Perhaps it doesn’t matter, but for the record the above map is a choropleth map. It’s been branded by Google (as one of the Google Gadgets) with the sexier label “heat map”, and this (mis)usage is catching on. The term heat map is already equivocal. First, as a non-geographic, non-map representation, the heat map is a treemap-like graphical technique used to represent a two-dimensional array of data.

As a cartographer, though, I’ve always (well, ok, for a year or so anyway) taken heat maps to be a thematic mapping technique in which a (typically) diverging, (usually) thermal-like color scheme is used to represent density in a continuous fashion. Like the following (from Cartifact’s Downtown L.A. homeless map).

This technique holds the use of color (well, value or lightness really, not hue) in common with choropleth mapping. That is, they share the same visual variable (though, as noted, heat maps almost always utilize a diverging color scheme, in which both hue and value/lightness are varied). The difference is that choropleth maps represent data by enumeration units (countries, states, counties, blocks) while the heat map technique is continuous and not aggregated to enumeration units.

As I say, perhaps it doesn’t matter, and I’m not really advocating that Google Gadgets users (and others) learn the term “choropleth map”. Indeed, I’d be just as happy with the also-misleading term “color map”, as at least it does not already stand for two different symbologies.

delaunay triangulation in ActionScript 3

update: for a cool usage of Delaunay triangulation, see my isolining package for ActionScript 3

The Delaunay triangulation was invented in 1934 by Boris Delaunay. According to Paul Bourke,

The Delaunay triangulation is closely related geometrically to the Direchlet tesselation also known as the Voronoi or Theissen tesselations. These tesselations split the plane into a number of polygonal regions called tiles. Each tile has one sample point in its interior called a generating point. All other points inside the polygonal tile are closer to the generating point than to any other. The Delauney triangulation is created by connecting all generating points which share a common tile edge. Thus formed, the triangle edges are perpendicular bisectors of the tile edges.

What all that means is that the resultant triangles will be as equilateral as possible. The triangular mesh has the advantage of minimizing the distance over which interpolations must take place.

Go ahead, try it out.

With the idea of creating client-side isolines and inspired in part by the spirit of Keith Peters’ ongoing MathWorld Problem of the Week, I set out to write an AS3 class to create the above triangulation. After an hour of hacking, I gave up, and decided to just port the algorithm from another language. I chose Florian Jenett’s Java version, itself a port of Paul Bourke’s original C. The port was easy, and makes it a cinch to create a triangulation of, say, selected weather stations in the U.S.

(sorry - unprojected)

Of course, this triangulation isn’t really interesting in its own right, but rather for what it allows us to do, at run-time, with near real-time data, in Flash. On that, check this out.

(a temperature isoline map generated in Flash from a field of only 50 or so weather stations of the form lat, lon, temp)

I’ll release a full isolining package — complete with smoothing and hypsometric tinting — soon. For now, here’s the source code to the Delaunay triangulation in AS3.

filling the void

Great Salt Lake quad

I defend my thesis next Tuesday, so have been staying away from here lately. I will return soon.

“Map” above is the USGS Rozel Point SW Quadrangle.