Created
February 2, 2014 20:45
-
-
Save esbanarango/8774674 to your computer and use it in GitHub Desktop.
This file contains 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
/*Geo map for COLOMBIA WITH COORDS https://developers.google.com/chart/interactive/docs/gallery/geomap*/ | |
function drawVisualization() { | |
var dataTable = new google.visualization.DataTable(); | |
dataTable.addRows(3); | |
dataTable.addColumn('number', 'LATITUDE', 'Latitude'); | |
dataTable.addColumn('number', 'LONGITUDE', 'Longitude'); | |
dataTable.addColumn('number', 'Votantes', 'Value'); // Won't use this column, but still must define it. | |
dataTable.addColumn('string', 'HOVER', 'HoverText'); | |
dataTable.setValue(0,0,6.1730556); | |
dataTable.setValue(0,1,-75.5638889); | |
dataTable.setValue(0,2,300); | |
dataTable.setValue(0,3,"Envigado"); | |
dataTable.setValue(1,0,6.1916667); | |
dataTable.setValue(1,1,-74.5866667); | |
dataTable.setValue(1,2,500); | |
dataTable.setValue(1,3,"Puerto Nare"); | |
dataTable.setValue(2,0,6.0833333); | |
dataTable.setValue(2,1,-75.5); | |
dataTable.setValue(2,2,99); | |
dataTable.setValue(2,3,"Retiro"); | |
var options = {}; | |
options['region'] = 'CO'; | |
options['dataMode'] = 'markers'; | |
var geomap = new google.visualization.GeoMap( | |
document.getElementById('visualization')); | |
geomap.draw(dataTable, options); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment