Bing Maps 8 Heat Maps with Gaussian Data

A few days ago I coded up a demo Web page that used the new Bing Maps 8 heat map. That demo generated a few thousand random locations using the getLocations() method in the Maps.TestDataGenerator module, and then displayed those locations as a heat map.

Well that was cool, but two things mildly bothered me. First, the built-in data generator module is not reproducible — every time you create locations, they’ll be different. During development, I want reproducible data so I can compare results of various code modifications.


The second issue was that the data generator creates uniformly distributed locations. This made the heat map cover the entire viewable area with an even distribution of points, so the resulting heat map looked a bit like camouflage rather than a realistic heat map.

By coincidence, I’ve been looking at generating reproducible Gaussian random numbers with JavaScript. So, I combined the Gaussian code with the heat map code to make a demo Web app that displays a heat map made from Gaussian data centered about a location (Portland, OR).

Now I’m happy.


This entry was posted in Machine Learning, Miscellaneous. Bookmark the permalink.