Created
July 23, 2013 18:43
-
-
Save arjones/6065010 to your computer and use it in GitHub Desktop.
Sample using Google Visualization GeoCharts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type='text/javascript' src='https://www.google.com/jsapi'></script> | |
<script type='text/javascript'> | |
google.load('visualization', '1', {'packages': ['geochart']}); | |
google.setOnLoadCallback(drawMarkersMap); | |
function drawMarkersMap() { | |
var data = google.visualization.arrayToDataTable([ | |
['Ciudad', 'Tweets'], | |
['Buenos Aires', 1268], | |
['san miguel de tucuman', 98], | |
['cordoba', 23], | |
['la plata', 21], | |
['rio cuarto', 14], | |
['santa fe', 14], | |
['rosario', 5], | |
['mendoza', 4], | |
['moron', 4], | |
['baradero', 3], | |
['mar del plata', 3], | |
['san lorenzo', 2], | |
['ushuaia', 2], | |
['resistencia', 1], | |
['tigre', 1], | |
['lanus', 1], | |
['quilmes', 1], | |
['parana', 1] | |
]); | |
var options = { | |
region: 'AR', | |
displayMode: 'markers', | |
colorAxis: {colors: ['#FFCF2E', '#FF2200']} | |
}; | |
var chart = new google.visualization.GeoChart(document.getElementById('chart_div')); | |
chart.draw(data, options); | |
}; | |
</script> | |
</head> | |
<body> | |
<div id="chart_div" style="width: 1024px; height: 800px;"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment