Geochart intensity map with cities.

1,386 views
Skip to first unread message

Prescient INC

unread,
Mar 28, 2012, 9:14:49 AM3/28/12
to Google Visualization API
Currently I'm trying to develop a heat map by city.
I'm able to get a heat map if I use the option resolution: provinces.

Here is the code. What am I missing?

google.load('visualization', '1', {'packages': ['geochart']});
google.setOnLoadCallback(drawRegionsMap);
function drawRegionsMap() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'City');
data.addColumn('number', 'color');
//data.addColumn('number', 'Units');
data.addRows([
['528', 5],
['534', 1]
]);
var options = {
region: 'US-FL',
displayMode: 'regions',
resolution: 'provinces',
colorAxis: { colors: ['salmon', 'red']},
colors: ['salmon', 'red']

};
var chart = new
google.visualization.GeoChart(document.getElementById('chart_div'));
chart.draw(data, options);
};

asgallant

unread,
Mar 28, 2012, 2:01:34 PM3/28/12
to google-visua...@googlegroups.com
I think you want to set the resolution to 'metros'; 'provinces' is for assigning data for the state as a whole, not sub-regions of a state.

Prescient INC

unread,
Mar 28, 2012, 6:14:33 PM3/28/12
to google-visua...@googlegroups.com
Metros is not enough.
I need to get a little more granular.
I need a breakdown by city.

Prescient INC

unread,
Mar 28, 2012, 6:17:24 PM3/28/12
to google-visua...@googlegroups.com
I guess I have to work with Markers then.
Too bad you can't kml for the cities.
That might work.
 

On Wednesday, March 28, 2012 2:01:34 PM UTC-4, asgallant wrote:
Reply all
Reply to author
Forward
0 new messages