Language
Login
Language Setting
X
English
日本語 [Japanese]
about this App
統計データを地図上に表示(塗り潰し)
useful
2
Loading...
if(typeof Application==="undefined"||!Application){var Application= {};} Application.gc = function() { this._init.apply(this, arguments); } Application.gc.prototype = { _data : null, _options : null, _prefecture : null, _init : function() { this._prefecture = this._getGooglePrefecture(); this._data = this._getGoogleDataTable(); this._options = this._getGoogleOption(); }, _configArray : function() { var array = [ { "caption" : "Location", "property" : "label" }, { "caption" : "平成21年従業員数", "property" : "平成21年従業員数" } ]; return array; }, _getGoogleOption : function() { var options = { region: 'JP', colorAxis: {colors: ['yellow', 'red']} }; return options; }, _getGoogleDataTable : function() { var configArray = this._configArray(); var prefectureArray = this._prefecture; var main = []; var array = []; $.each(configArray, function(index, obj) { array.push(obj.caption); }); array.push("都道府県名"); main.push(array); var mainArray = this._getObjectArray(); $.each(mainArray, function(i, objArray) { array = []; $.each(objArray, function(j, objData) { $.each(configArray, function(k, obj) { if (objData.property === obj.property) { var val = null; if (obj.property === "label") { $.each(prefectureArray, function(l, prefecture) { if (objData.value === prefecture.name ) { val = prefecture.codename; array[2] = objData.value; } }); } else { val = objData.value; } if (! isNaN(val)) { if (Math.floor(val).toString() == val.toString()) { // yay! we have an int val = parseInt(val); } else { // it's a float or something else. val = parseFloat(val); } } array[k] = val; } }); }); main.push(array); }); return main; }, _getObjectArray : function() { var main = []; $.each(LinkData.getWorks(), function(workKey, workValue) { $.each(LinkData.getFiles(workValue), function(fileKey, fileValue) { $.each(LinkData.getSubjects(workValue, fileValue), function(subjKey, subjValue) { var array = []; $.each(LinkData.getProperties(workValue, fileValue), function(propKey, propValue) { var obj = {}; var propLabel = propValue; var arr = propValue.split("#"); if (arr.length > 1) { propLabel = decodeURIComponent(arr[1]); } var objValue = LinkData.getObjects(workValue, fileValue, subjValue, propValue)[0]; obj.property = propLabel; obj.value = objValue; array.push(obj); }); main.push(array); }); }); }); return main; }, getData : function() { return this._data; }, getOptions : function() { return this._options; }, _getGooglePrefecture : function() { var array = [ {name:"北海道", codename:"Hokkaido", code:"JP-01"}, {name:"青森県", codename:"Aomori", code:"JP-02"}, {name:"岩手県", codename:"Iwate", code:"JP-03"}, {name:"宮城県", codename:"Miyagi", code:"JP-04"}, {name:"秋田県", codename:"Akita", code:"JP-05"}, {name:"山形県", codename:"Yamagata", code:"JP-06"}, {name:"福島県", codename:"Fukushima", code:"JP-07"}, {name:"茨城県", codename:"Ibaraki", code:"JP-08"}, {name:"栃木県", codename:"Tochigi", code:"JP-09"}, {name:"群馬県", codename:"Gunma", code:"JP-10"}, {name:"埼玉県", codename:"Saitama", code:"JP-11"}, {name:"千葉県", codename:"Chiba", code:"JP-12"}, {name:"東京都", codename:"Tokyo", code:"JP-13"}, {name:"神奈川県", codename:"Kanagawa", code:"JP-14"}, {name:"新潟県", codename:"Niigata", code:"JP-15"}, {name:"富山県", codename:"Toyama", code:"JP-16"}, {name:"石川県", codename:"Ishikawa", code:"JP-17"}, {name:"福井県", codename:"Fukui", code:"JP-18"}, {name:"山梨県", codename:"Yamanashi", code:"JP-19"}, {name:"長野県", codename:"Nagano", code:"JP-20"}, {name:"岐阜県", codename:"Gifu", code:"JP-21"}, {name:"静岡県", codename:"Shizuoka", code:"JP-22"}, {name:"愛知県", codename:"Aichi", code:"JP-23"}, {name:"三重県", codename:"Mie", code:"JP-24"}, {name:"滋賀県", codename:"Shiga", code:"JP-25"}, {name:"京都府", codename:"Kyoto", code:"JP-26"}, {name:"大阪府", codename:"Osaka", code:"JP-27"}, {name:"兵庫県", codename:"Hyogo", code:"JP-28"}, {name:"奈良県", codename:"Nara", code:"JP-29"}, {name:"和歌山県", codename:"Wakayama", code:"JP-30"}, {name:"鳥取県", codename:"Tottori", code:"JP-31"}, {name:"島根県", codename:"Shimane", code:"JP-32"}, {name:"岡山県", codename:"Okayama", code:"JP-33"}, {name:"広島県", codename:"Hiroshima", code:"JP-34"}, {name:"山口県", codename:"Yamaguchi", code:"JP-35"}, {name:"徳島県", codename:"Tokushima", code:"JP-36"}, {name:"香川県", codename:"Kagawa", code:"JP-37"}, {name:"愛媛県", codename:"Ehime", code:"JP-38"}, {name:"高知県", codename:"Kochi", code:"JP-39"}, {name:"福岡県", codename:"Fukuoka", code:"JP-40"}, {name:"佐賀県", codename:"Saga", code:"JP-41"}, {name:"長崎県", codename:"Nagasaki", code:"JP-42"}, {name:"熊本県", codename:"Kumamoto", code:"JP-43"}, {name:"大分県", codename:"Oita", code:"JP-44"}, {name:"宮崎県", codename:"Miyazaki", code:"JP-45"}, {name:"鹿児島県", codename:"Kagoshima", code:"JP-46"}, {name:"沖縄県", codename:"Okinawa", code:"JP-47"} ]; return array; } } var drawMarkersMap = function() { var gc = new Application.gc(); var data = google.visualization.arrayToDataTable(gc.getData()); var options = gc.getOptions(); var chart = new google.visualization.GeoMap(document.getElementById('chart_div')); chart.draw(data, options); } google.load('visualization', '1', {'packages': ['geomap']}); google.setOnLoadCallback(drawMarkersMap);
<h2>都道府県別従業員数</h2> <div id="chart_div" style="width: 900px; height: 500px;"></div>
Preview
Input Data
ReadMe
Snapshots
LinkData Work
Table Data
都道府県別従業者数(従業者10人以上の事業所)緯度経度付き
Contributor:nobuotto
Update:Dec 5, 2011
1801 Downloads, 4 Applications
経済産業省 工業統計調査 平成21年確報 産業編 第16表 都道府県別従業者数(従業者10人以上の事業所)のLOD
都道府県別従業者数(従業者数10名以上)緯度経度付き
Add LinkData work(LinkData)
Link http://app.linkdata.org/run/app1s9i?tab=readme
jquery-1.7.1.min.js
https://www.google.com/jsapi
Work
Add
Clear
insert work id or work name.