Here‘s another visualization I’ve been working on. Lots of wildlife biology these days deals with how animals interact with the human world around them. Here in the forests of western Alberta, that generally means either forestry activity (cutblocks) or oil infrastructure (wells, pipelines, seismic lines, facilities, etc.). This is a proof-of-concept map, showing a randomized individual (maybe a bear…?) moving amongst randomly placed points (maybe oil wells…?). As the individual moves closer to a point, the point size increases.
The tricky part was managing the distance calculations. It was bogging down in the attempt to calculate the distance to every point on the map (500 of them) each time a new point was drawn. To overcome this limitation, I set it so for every 25 new locations it would find all of the points within 50km and remember them – usually it was about 50 points. Then, for each newly drawn point, it would cycle through only those 50 nearest points and adjust their symbology to be inversely related to distance.
Note: works fine in Chrome, not so well in Firefox, and don’t even bother trying it in Internet Explorer.