Global grid of coloured squares representing temperature data on interactive map - google-maps

I'm trying to create an interactive map (Google Map / OpenStreetMap etc.) showing a global grid of coloured squares representing temperature data. The length of each side of a square inside the grid is 0.5 degrees in terms of the UTM.
I have temperature data for the centre of each square on the grid. These could be min, max etc. I wish to plot this data on an interactive map so that the result will be a kind of heatmap where low values will be bluish and high values will be reddish.
I would expect the result to be similar to this, but interactive:
I have searched for about eight hours and I can't seem to find a viable solution.
I have looked at Fusion Tables, and followed a tutorial to get this example: Fusion Table Example, so I've looked into making a KML file of the 0.5 degrees grid, but got stuck here.
I have looked at CartoDB and made this but if you zoom in, the points are circular and scale smaller as you zoom in. I wish the points to be square and to stay the same size for all zoom levels.
I was thinking of doing something like this but I imagine having this grid on the entire global map would cause it to be very slow.
I hope to have drop-downs on the page to switch to different parameters like max, min temperature etc, and for the overlay to change.
I already have a grid working here but the user simply clicks on a grid to get the temperature graph for that grid. If the user could click something to turn on the coloured grid to see a kind of heat map when they zoom out, that would be great, but I'm a bit lost as to which direction to take. Any help would be greatly appreciated.

Related

I am trying to superimpose a heat map onto a 2D image of a femur

I'm not sure where to start, as I'm pretty green at this. I've completed research finding n=34 lengths found along the femur. I would like to create a graph that represents the intensity of certain lengths and plot it along a superimposed image of a femur. This would ideally look something like what is attached heatmap?contourmap? of bone. Does anyone know where I can start? Thank you

google java maps api - heatmap too faint

I am using geocoding and maps api to heatmap a lot of entries (12000+) (these will be filtered down to ~5-600 a map) currently using a random 500 dataset from these.
The problem is some of these addresses haven't geocoded correctly (e.g. showing miles away sometimes not on same continent) which is not an issue on it's own (happy for these to be ignored and just be in the oblivion) however these are drastically reducing visibility of map so when zoomed in even with opacity set as high as possible they are a barely visible pinprick on map.
Is there a simple way of just stopping these few erroneous entries from interfering or will I have to weed them out?
Below is sample of how it looks...
Compared to how I'd like it to look (different data set created created previously in fusion tables)...
(these are same zoom levels on google maps, top one just cropped more to show how difference)
For anyone else who come across this...
maxIntensity: The maximum intensity of the heatmap. By default, heatmap colors are dynamically scaled according to the greatest concentration of points at any particular pixel on the map. This property allows you to specify a fixed maximum. Setting the maximum intensity can be helpful when your dataset contains a few outliers with an unusually high intensity.
I found setting this on a sliding scale was best to dynamically adjust map depending on amount of data points in map.

Changing Maps "detail/resolution" while still zooming in/out

I'm toying around with d3.js and some other javascript libraries plotting geoJSON data in the browser. I've done some cool things with the data, but to give it a bit more context I want to lay it over a map that fills the browser (i'll probably make it opaque to not distract). I've spent a few hours with the google and bing API, which have great "zoom" options, but I want to specify how detailed the map becomes without further restricting how far I can zoom in. Is there a way to do this? I.e. I want to zoom further in and be able to pan around, without all of the side streets appearing-- maintaining the "main drags" of the city I'm working with.
I'm open to using different resources, but this is not a commercial product so I don't want to pay anything. As far as I know, the option for increasing and decreasing the detail/resolution of the pane is by increasing or decreasing the zoom variable. Thanks.
Edit: There really doesn't need to be much interaction with the map. This is kind of the intention http://www.caudillweb.com/temp/d3_choropleth.html, but since it will be at the city level, as you can see when you zoom in that far all sorts of different elements and side streets appear, taking away from the clean view at a more zoomed-out level and it begins to distract from the data.

Heat map visualization for discrete values on Google Maps

I'm working on the following scenario: I have a geographical location and I need to create a heat-map visualization of travel times (by car) from that location to anywhere around. I'm planning on using Google Distance Matrix API for getting travel duration. But, since it has a limit on the no of API calls, I need to somehow limit the calls.
My plan, so far, is the following: compute the travel duration (basically a numeric value) to a set of points evenly distributed on a grid around the given position (e.g. 0.5km east, 0.5 km east-0.5km north, 0.5 km east-1 km north etc.). This points would represent the centers of square-shaped areas and I will consider the travel duration to the center as the travel duration to anywhere in the area. Display these areas as colored squares on a Google Maps in a heatmap style.
A good example of something that looks alike is this: http://project.wnyc.org/transit-time/#40.72280,-73.95464,12,709 .
So, my questions are:
Does it seem like a good strategy?
Is there a better visualisation strategy for something like this?
How can I create those square-shaped colored areas on Google Maps?
Thanks!
Calculating duration would surely involve traffic flow rather than simply distance. If your calculations are purely on distance you could use the Google Maps direction requests to calculate the distance to each point.
I'm not sure a heat map is the way forward for this scenario.
There a number of way you could achieve this. Here's a few:
a. Use a custom overlay
(https://developers.google.com/maps/documentation/javascript/examples/overlay-simple)
b. Draw polygons on the map and give them different colours based on
the journey duration. This would involve taking the area in question and slicing it up in to polygons however you need to. These polygons could take the same shape as your example. You would need to be rather precise with your latlng. SQL's spacial querys would help you here depending on the tech your using. (https://developers.google.com/maps/documentation/javascript/examples/polygon-arrays)
c. Depending on how specific you wanted to be you could draw circles with different radius value and different colours.
d. You could make custom markers in the shapes you require and add them to the map in the correct latlng in order to fill an area. You could have different markers for different duration and add them accordingly.
I'm sure there are other options as well.

Subway lines in KML with different colors on one track?

My first KML project was an animated map of the Washington DC Metro system (see Animating Metro with KML and Google Earth). Unfortunately, where Metro lines share the same track, only one color prevails. The real map shows a wider line with both colors side by side.
Is there a way to draw a line in KML (Google Earth) with two side-by-side colors? I've seen a way to have a different color on the edges of the line, but that's different.
I could cheat by changing the coordinates of each station, but aside from computational difficulties, I'd have to continuously changes to positions every time the user zooms, to prevent a gap between colors (or an overlap).
Other subway systems show more than two colors running alongside each other, so an option to show multiple colors would be nice. And this is not really a gradient, as the colors don't fade together; they should be distinct, assuming the pixel width is wide enough.
This is probably a feature request, though surely someone else has run across this problem before Google Earth v6? Would love to be able to do this, or find a good workaround in the interim.
Michael
http://www.mvjantzen.com/blog/
The short answer is no, although you could probably create a custom MVC object that renders the line for you as desired (i.e. you would not need to alter the Kml)
http://code.google.com/apis/maps/articles/mvcfun.html
That said, your cheat method could work too - and I would disagree that
"...I'd have to continuously changes to positions every time the user
zooms, to prevent a gap between colors"
You can set the <gx:physicalWidth> property which allows you to set the width of a LineString to be in meters, rather than pixels.
https://developers.google.com/kml/documentation/kmlreference#gxphysicalwidth
In the case of your track example, this means you can set the width of the track to match the underlying imagery no matter what altitude the end user views it from.