Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Library to generate heat map map overlay based off point values not point densities

I have a set of data points where each point is expressed as a lat/lng. Each of these points has a value associated with it that changes over time. I would like to produce a heatmap animation overlay on top of a map that reflects this change in value over time. Note: I am fine with producing a series of static "snapshots" and piecing them together frame-by-frame into an animation, so the heatmap library itself does not have to support animation.

My first attempt was to use the HeatMapLayer which is a part of the Google Maps visualization library. However as per the question Heatmap based on average weights and not on the number of data points, it would seem that this particular visualization library insists on weighing the density of points in determining what color to use surrounding a given point.

I am after a solution that only considers the value of the points rather than the density. To give an example, assume one wanted to visualize the ambient temperature of a city over time, but there were more thermometers installed in some parts of the city than others. You wouldn't want a small area with many thermometers installed to show up red just because there were many thermometers - you'd want it to show up red only if it was hot there.

Basically, I want a single color for each of my points that reflects the intensity of the point's value, and then a gradient spatial transition between any two point's colors. It doesn't have to be Google Maps - the key criteria is just i) must base colors off point values not point densities ii) must overlay on top of a map and iii) ideally has a programming abstraction that talks in terms of lat/lng's, rather than requiring manual conversion to e.g. Euclidean space.

like image 542
Bryce Thomas Avatar asked Feb 19 '14 05:02

Bryce Thomas


People also ask

Can Tableau do heat maps?

You can create maps in Tableau that reveal patterns or relative concentrations that might otherwise be hidden due to overlapping marks on a map. One common map type for this is a density map, also called a heatmap.

What are heatmaps used for?

By definition, Heat Maps are graphical representations of data that utilize color-coded systems. The primary purpose of Heat Maps is to better visualize the volume of locations/events within a dataset and assist in directing viewers towards areas on data visualizations that matter most. But they're much more than that.


1 Answers

global tempsYou can do this with multiple:

gmaps.symbol_layer

and then just layer them up:

fig_gmap.add_layer(red_markers)

fig_gmap.add_layer(yellow_markers)

fig_gmap.add_layer(green_markers)

fig_gmap.add_layer(blue_markers)

I haven't been able to successfully pass a value that gives me a good temp color for the heat maps, just always get some variation on the density thing, which is a one trick pony. It would be nice having a way to do this and animate the marker icon without java.

like image 119
Rex Lewis Avatar answered Nov 16 '22 02:11

Rex Lewis