These maps show overall city-wide trends in residential real estate prices. Commercial property is excluded from the data.
Note that the colours do not reflect price per square meter, which might have been a better metric of property value, but simply price per property. Neighbourhoods where properties just tend to be smaller will appear in cooler colours because of that. The only reason for this approach is that I didn't have enough data on property surface sizes.
The values are mapped directly to a simple linear HSB colour spectrum that goes from pure blue to pure red. They are mapped according to their respective position in a sorted list of all property prices, not according to the actual value of the property. This is the reason why the scale at the botton has irregular intervals. If regular intervals were used, almost the entire map would be blueish-green, because the few most expensive properties would stretch the scale way too far.
The data was found on real estate websites. The same data was used for the heatmaps and the choropleths.
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 flat. 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.
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 (actually in Kiwi, a Java preprocessor that I use) and is available here:
http://svn.saintamh.org/code/tilemaker/
The algorithm for choropleths is a lot simpler: we take the street layout from the OpenStreetMap.org API, and use them to split the city into "zones", which correspond roughly to city blocks. We then colour each zone according to an average of the prices of the flats that fall within it.
The source code for the Choropleths is written in Python and found here:
http://svn.saintamh.org/code/choropleths/py/choropleths.py
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 gorgeous choropleth maps of real estate price for France. I really like their colour scheme.