Created
May 27, 2013 16:28
-
-
Save gr33ndata/5657934 to your computer and use it in GitHub Desktop.
Code used to generate a heat map for the Egyptian textile industry. Google Geochart was used here, https://developers.google.com/chart/interactive/docs/gallery/geochart
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
<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([ | |
['City', 'Factories', 'Factories'], | |
['10th of Ramadan City', 68, 68], | |
['6th of October City', 38, 38], | |
['Alexandria', 9, 9], | |
['Assiut', 1, 1], | |
['Badr City', 5, 5], | |
['Belbees', 1, 1], | |
['Burj Al Arab City', 12, 12], | |
['Cairo', 125, 125], | |
['El Salam City', 2, 2], | |
['Gesr El Suez', 19, 19], | |
['Giza', 34, 34], | |
['Helwan', 4, 4], | |
['Mahalla', 11, 11], | |
['Minya', 1, 1], | |
['Munufiya', 3, 3], | |
['Obour City', 9, 9], | |
['Qalyubiyah', 20, 20], | |
['Sadat City', 15, 15], | |
['Shubra Al Khaimah', 39, 39], | |
['Sohag', 1, 1], | |
['Suez Canal Cities (Misc.)', 3, 3] | |
]); | |
var options = { | |
region: 'EG', | |
displayMode: 'markers', | |
colorAxis: {colors: ['green', 'blue']} | |
}; | |
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