Skip to content

Instantly share code, notes, and snippets.

@isstaif
Created June 24, 2012 09:10
Show Gist options
  • Select an option

  • Save isstaif/2982567 to your computer and use it in GitHub Desktop.

Select an option

Save isstaif/2982567 to your computer and use it in GitHub Desktop.
A sample of a health atlas map demonstrating the number of hospitals in Syrian provinces using Google Visualization API
<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 = new google.visualization.DataTable();
data.addColumn('string', 'City');
data.addColumn('number', 'Number of Hospitals');
data.addRows([
['SY-DI', 51],
['SY-RD', 53],
['SY-HL', 113],
['SY-ID', 33],
['SY-LA', 23],
['SY-TA', 19],
['SY-HI', 45],
['SY-HM', 50],
['SY-HA', 32],
['SY-DY', 26],
['SY-RA', 12],
['SY-DR', 15],
['SY-SU', 5],
['SY-QU', 1]
]);
var options = {
region: 'SY',
resolution: 'provinces',
colorAxis: {colors: ['yellow', 'green']}
};
var chart = new google.visualization.GeoChart(document.getElementById('chart_div'));
chart.draw(data, options);
};
</script>
</head>
<body>
<div id="chart_div" style="width: 900px; height: 500px;"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment