1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
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" : "幸福度",
"property" : "http://www.unisys.co.jp/research/happiness_ranking/property/total_ranking"
];
return array;
_getGoogleOption : function() {
var options = {
region: 'JP',
width:'800px',
height:'600px',
colors: [0x267114,0x50AA00,0xA5EF63,0xE0FFD4]
};
return options;
_getGoogleDataTable : function() {
var configArray = getConfigArray();
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);
//a(val);
//a(array[2]);
setRanking(array[2],val);
// it's a float or something else.
val = parseFloat(val);
array[k] = val;
return main;
_getObjectArray : function() {
$.each(LinkData.getWorks(), function(workKey, workValue) {
$.each(LinkData.getFiles(workValue), function(fileKey, fileValue) {
$.each(LinkData.getSubjects(workValue, fileValue), function(subjKey, subjValue) {
$.each(LinkData.getProperties(workValue, fileValue), function(propKey, propValue) {
var obj = {};
#footer { background: gray; color: white; position: absolute; bottom: 0; width: 100%; height: 20px;}
<div id="content1">
</div>
<div id="content2">
<div id="content3">
<div id="content4" style='width:650px;background-color:CornSilk'>
<div></div><div></div><div></div>
<div id="prefectureRankingMap" style="display:none;width:1124px;background-color:Beige">
<h1 style='padding:20px 0px 0px 50px;'>都道府県別 幸福度ランキング</h1>
<div style='padding:20px 0px 0px 50px;'>
<SELECT id="sel1" name="selColumn">
<OPTION value="http://www.unisys.co.jp/research/happiness_ranking/property/total_ranking">総合ランキング</OPTION>
<OPTION value="http://www.unisys.co.jp/research/happiness_ranking/property/basic_index">基本指標</OPTION>
<OPTION value="http://www.unisys.co.jp/research/happiness_ranking/property/health_index">健康分野</OPTION>
<OPTION value="http://www.unisys.co.jp/research/happiness_ranking/property/culture_index">文化分野</OPTION>
<OPTION value="http://www.unisys.co.jp/research/happiness_ranking/property/work_index">仕事分野</OPTION>
<OPTION value="http://www.unisys.co.jp/research/happiness_ranking/property/life_index">生活分野</OPTION>
<OPTION value="http://www.unisys.co.jp/research/happiness_ranking/property/education_index">教育分野</OPTION>
</SELECT> マップの都道府県をクリックしてください.
<div style ="vertical-align:top;">
<table style='margin-left:50px;'>
<tr>
<td width="800px">
<div id="chart_div" style="width: 800px; height: 600px;"></div>
</td>
<td width="200px" valign="top">
<div id="ranking_div" style="width: 200px; height: 300px;">
<div style='margin-left:50px;'>
<h4 id="rankTitle"></h4>
<table style='margin-left:50px;' border="1">
<th width="100px" bgcolor='0x50AA00'>第1位</th><td width="100px" bgcolor='White'><div id="rank1"></div></td>
</tr>
<th bgcolor='0x50AA00'>第2位</th><td bgcolor='White'><div id="rank2"></div></td>
<th bgcolor='0x50AA00'>第3位</th><td bgcolor='White'><div id="rank3"></div></td>
<th bgcolor='White'></th><td bgcolor='White'> </td>
<th width="100px" bgcolor='Honeydew'>第45位</th><td width="100px" bgcolor='White'><div id="rank45"></div></td>
<th bgcolor='Honeydew'>第46位</th><td bgcolor='White'><div id="rank46"></div></td>
<th bgcolor='Honeydew'>第47位</th><td bgcolor='White'><div id="rank47"></div></td>
</table>
<div id="content5" style='width:600px;background-color:CornSilk'>
<!--
<div id="prefecture_div" style="width: 200px; height: 300px;">
<canvas width="200" height="300" id="radar"></canvas>
-->
<div style='padding:20px 0px 0px 50px;'><p>データの引用元:<a href="http://www.unisys.co.jp/com/books.html" target="_blank">『日本でいちばんいい県 都道府県別幸福度ランキング』</a> 寺島 実郎, 日本総合研究所, 日本ユニシス株式会社総合技術研究所 (2012).東洋経済新報社</p></div>
<!--<div id="footer"><p>データの引用元:『日本でいちばんいい県 都道府県別幸福度ランキング』寺島 実郎, 日本総合研究所, 日本ユニシス株式会社総合技術研究所 (2012).東洋経済新報社</p></div>
Click the Browse button or drag and drop to choose files to upload
The Maximum upload size is 1MB.(bmp,gif,jpeg,jpg,png)
*Required field
Add name for another language
You can upload jpg, gif, png file formats
Add description for another language
Fork original application has been updated. >>see
Original application has been updated. >>see
Playing...
Please enter a valid URL