For mappl, this was going to be our killer feature. We already allowed you spin up a heatmap of all manner of statistics in isolation, but the plan was to allow you to take any two stats and combine them together on one map, allowing you to see where there was a strong positive or negative correlation between the two.
Every stat we map is already available in a simple range of zero to one for every location on the map. Zero is the lowest value, and one the highest. If you’re looking at crime rates, for example, zero will be the lowest crime rate in the country, and one the highest. Everywhere else in the country gets a fractional value somewhere between those extremes depending on how the crime rate there compares to the maximum.
If you then take two stats, you’ll have two values for each place on the map, one for each stat. You then need to pick four colours: one for when both stats are low (close to zero), one for when both are high (close to one), one for low:high, and one for high:low.
We chose red, green, blue and yellow respectively.
Throw in a bit of maths to allow you to blend those four colours together so you can represent all points between the extremes and you’ve got yourself a two-dimensional colour map. Every place on the map can be assigned a colour as a function of the value of the two stats that you’re looking to compare.
Check it out!