So I've been toying with "heatmaps", and I've been drawing maps of real estate price trends in Edinburgh:
in Montreal:
and in Sofia:
Conceptually, the algorithm evaluates, for every pixel "p" on the map, a weighted average of all observed flats prices in town, the weights being given by a gaussian of the distance from "p" to the pixel where the flat appears on the map. In other words, every pixel's colour corresponds to an average of the flat prices immediately surrounding it, as well as, to a lesser extent, flats further away.
The resulting values are mapped directly to a simple linear HSB colour spectrum that goes from pure blue to pure red.
A density function determines the heatmap opacity, making the heatmap layer transparent in areas where we have little or no data, such as large parks. That function is based on a sigmoid of the sum of the weights used in the weighted average described above. The sigmoid keeps the density uniform everywhere, while creating a quick fade-out where the data gets too sparse.
The code is written in Java and is available here:
https://www.assembla.com/code/saintamh/subversion/nodes/tilemaker/
The data were found on real estate websites.
Zoopla have heatmaps of property sales prices in all the UK, including Edinburgh. I quite love them, and they were a big inspiration for this project. Here's a screenshot, that shows they're fairly different from mine:
Firstly, the level of detail here is finer-grained than on my map. You can actually individual blocks being more or less expensive than the next. I hesitated a lot when it came to picking the level of detail. A finer-grained heatmap sticks closer to the data, and the eye can still easily see which areas are more expensive than others. On the other hand, I feel that the map's main purpose is really to extract the overall trend, not to precisely point out individual cheap or expensive blocks. In any case I don't have as much data as Zoopla do, and I picked a coarser resolution because it hides some of that data sparseness.
The other thing is Zoopla's map has a more subtle colour scheme, which avoids the bright green, and gives better contrast perhaps between poor and rich areas. Actually I find the city looks more bipolar (all-rich or all-poor areas) in their map than mine.
Zoopla's algo doesn't fade out the map in uninhabited areas, and actually displays in those regions artefacts that could give hints as to how the algo works:
Though I really haven't figured out at all what approach their algorithm takes.
In all, I'd say Zoopla's are my favourite real estate price heatmaps out there.
The English National Heat Map looks great. I like how the surface gets more and more detailed as you zoom in, rather than just expanding the same image.
WalkScore.com has great heatmaps.
MeilleursAgents.com has maps of real estate price for France.
They're choropleths, not heatmaps like these, but perhaps that's the better way of drawing real estate prices? After all, there is no continuous surface of real estate prices that exists out there — unlike a heatmap for temperatures, or terrain elevation, real estate heatmaps draw a fully made-up surface.
I also really like their colour scheme.