Created
August 7, 2015 13:42
-
-
Save eienf/4e8f49271644aae728ff to your computer and use it in GitHub Desktop.
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.1", {packages:["geochart"]}); | |
google.setOnLoadCallback(drawRegionsMap); | |
function drawRegionsMap() { | |
/* 0…未踏、1…通過、2…接地、3…訪問、4…宿泊、5…居住 */ | |
var data = google.visualization.arrayToDataTable([ | |
["都道府県", "データ"], | |
["北海道", 4], | |
["青森", 1], | |
["岩手", 1], | |
["宮城", 4], | |
["秋田", 1], | |
["山形", 1], | |
["福島", 4], | |
["茨城", 0], | |
["栃木", 3], | |
["群馬", 3], | |
["埼玉", 4], | |
["千葉", 3], | |
["東京", 5], | |
["神奈川", 4], | |
["新潟", 4], | |
["富山", 5], | |
["石川", 4], | |
["福井", 4], | |
["山梨", 4], | |
["長野", 4], | |
["岐阜", 4], | |
["静岡", 4], | |
["愛知", 1], | |
["三重", 4], | |
["滋賀", 4], | |
["京都", 5], | |
["大阪", 5], | |
["兵庫", 4], | |
["奈良", 4], | |
["和歌山", 3], | |
["鳥取", 4], | |
["島根", 4], | |
["岡山", 1], | |
["広島", 1], | |
["山口", 4], | |
["徳島", 1], | |
["香川", 4], | |
["愛媛", 4], | |
["高知", 0], | |
["福岡", 0], | |
["佐賀", 0], | |
["長崎", 0], | |
["熊本", 0], | |
["大分", 4], | |
["宮崎", 0], | |
["鹿児島", 0], | |
["沖縄", 4], | |
]); | |
var options = { | |
region: 'JP', | |
resolution: 'provinces', | |
colorAxis: {colors:['#ffffff', '#2DFEFE', '#2AFE2F', '#FFFE38', '#FD0D1B','#FD29FD']}, | |
}; | |
var chart = new google.visualization.GeoChart(document.getElementById('regions_div')); | |
chart.draw(data, options); | |
} | |
</script> | |
</head> | |
<body> | |
<div id="regions_div" style="width: 600px; height: 400px;"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment