Français - English

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.

Heatmap Algorithm

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/

Choropleth algorithm

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

Other heatmaps from elsewhere on the web

Other housing price choropleths on the web