Language
Login
Language Setting
X
English
日本語 [Japanese]
about this App
石巻市 転出転入(県外)
useful
1
Loading...
window.onload = function() { //alert("qqq"); var canvas = document.querySelector('canvas'); var context = canvas.getContext('2d'); context.font = "18px 'MS Pゴシック'"; context.strokeText("石巻市 転出転入の状況(県外) 平成29年中", 20, 20); context.fillStyle = 'rgba(250, 0, 0, 0.5)'; //塗りつぶし色 context.fillRect(20,50,100,50); context.lineWidth = 2; context.strokeStyle = 'rgb(0, 0, 0)'; //線の色 context.strokeRect(20,50,100,50); context.font = "10px 'MS Pゴシック'"; context.strokeText("転出>転入", 140, 60); context.strokeText("XXX", 20, 60); context.strokeText("XXX:県名", 140, 75); context.lineWidth = 2; context.strokeStyle = 'rgba(0, 0, 0, 0.7)'; //線の色 context.strokeRect(20,110,100,50); context.strokeText("転入>転出", 140, 120); var ken_tbl = [ ["北海道",750, 80, 150, 150], ["青森",750, 250, 150, 50], ["岩手",825, 300, 75, 50], ["秋田",750, 300, 75, 50], ["宮城",825, 350, 75, 50], ["山形",750, 350, 75, 50], ["福島",800, 400, 100, 50], ["新潟",700, 400, 100, 50], ["茨城",850, 450, 50, 50], ["栃木",800, 450, 50, 50], ["群馬",750, 450, 50, 50], ["長野",700, 450, 50, 125], ["千葉",850, 500, 50, 100], ["埼玉",750, 500, 100, 25], ["東京",800, 525, 50, 25], ["神奈川",800, 550, 25, 50], ["山梨",750, 525, 50, 50], ["静岡",700, 575, 100, 50], ["富山",650, 400, 50, 50], ["岐阜",650, 450, 50, 100], ["愛知",650, 550, 50, 50], ["石川",600, 375, 50, 50], ["福井",550, 425, 100, 50], ["滋賀",600, 475, 50, 75], ["三重",600, 550, 50, 100], ["京都",500, 475, 100, 50], ["奈良",550, 525, 50, 75], ["大阪",500, 525, 50, 75], ["和歌山",500, 600, 100, 50], ["兵庫",450, 475, 50, 100], ["鳥取",375, 475, 75, 50], ["岡山",375, 525, 75, 50], ["香川",375, 625, 75, 50], ["徳島",375, 675, 75, 50], ["島根",300, 475, 75, 50], ["広島",300, 525, 75, 50], ["愛媛",300, 625, 75, 50], ["高知",300, 675, 75, 50], ["山口",250, 475, 50, 100], ["福岡",150, 575, 100, 50], ["大分",200, 625, 50, 50], ["宮崎",200, 675, 50, 50], ["佐賀",125, 575, 25, 75], ["熊本",150, 625, 50, 100], ["鹿児島",150, 725, 100, 50], ["長崎",100, 575, 25, 75], ["沖縄",50, 800, 75, 50] ]; //alert("start"); var keyword = getParameterFromURL("subject"); // obtain keyword from the URL "?subject=" var list = ""; // list to be displayed var aaa = 0; var ken = ""; var suuji; var sashihiki = 0; var ii; $.each(LinkData.getWorks(), function(workKey, workValue) { // File loop $.each(LinkData.getFiles(workValue), function(fileKey, fileValue) { var hit = ""; // list of subjects whose URI matches keyword var nHit = 0; // number of subjects whose URI matches keyword // Subject loop $.each(LinkData.getSubjects(workValue, fileValue), function(subjKey, subjValue) { $.each( LinkData.getTriplesBySubject(workValue, fileValue, subjValue), function( tripleKey, tripleValue ) { var prop = tripleValue.property; //alert(prop); var Nam = getLastName(prop); //alert(Nam); var obj = tripleValue.object; //alert(obj); var lab = tripleValue.label; //alert(lab); if(Nam === "都道府県名-県"){ ken = obj; //alert("県"+ken); } if(Nam === "差引"){ suuji = obj; sashihiki = Number(suuji); for ( ii = 0; ii < 47; ii++ ){ //alert(ken_tbl[ii][0]); if (ken === ken_tbl[ii][0]) { //alert("県一致"); var i1 = ken_tbl[ii][1]; var i2 = ken_tbl[ii][2]; var i3 = ken_tbl[ii][3]; var i4 = ken_tbl[ii][4]; if (sashihiki < 0) { context.fillStyle = 'rgba(250, 0, 0, 0.5)'; //塗りつぶし色 context.fillRect(i1,i2,i3,i4); context.lineWidth = 2; context.strokeStyle = 'rgb(0, 0, 0)'; //線の色 context.strokeRect(i1,i2,i3,i4); context.font = "9px 'MS ゴシック'"; context.font = "12px 'MS ゴシック'"; context.fillStyle = 'rgb(0, 0, 0)'; //塗りつぶし色 context.fillText(ken, i1, i2+10); context.fillText(sashihiki,i1,i2+25); } else { context.lineWidth = 2; context.strokeStyle = 'rgba(0, 0, 0, 0.7)'; //線の色 context.strokeRect(i1,i2,i3,i4); context.fillStyle = 'rgb(0, 0, 0)'; //塗りつぶし色 context.fillText(ken, i1, i2+10); } } //alert("for_end"); } //alert("ken初期化"); ken = ""; } }); }); }); }); //alert("total"); $("#result").append( list ); //drawChart(total,str2); window.find(highlight); }; // Get a parameter value in URL (e.g. ?paramString=value ) function getParameterFromURL( paramString ) { var value = ""; var topWindow = top.window.location.search; if( topWindow ){ var q = decodeURIComponent(topWindow.substring(1,topWindow.length)).split("&"); for ( var i = 0; i < q.length; i++ ){ var r = q[i].split("="); if ( r[0] == paramString ) value = r[1]; } } return value; } // Highlight keyword in the string function highlight( string, keyword ) { if ( keyword.length > 0 ) { var ss = string.split(keyword); var len = ss.length; if ( len > 1 ) { string = ss[0]; for ( i = 1; i < len; i++ ) // string += "<font color=\"red\">"+keyword+"</font>"+ss[i]; string += "<span class=\"highlight\">"+keyword+"</span>"+ss[i]; } } return string; } // get the last name of the string separated with # and / function getLastName( string ) { string = decodeURIComponent(string); var sharp = string.split("#"); var slash = sharp[sharp.length-1].split("/"); var lastName = slash[slash.length-1]; return lastName; } // return a link to Google map search function addLinkToMap( latitude, longitude ) { var s = "<br><a target=\"_blank\" href=\"http://www.google.com/maps/?q=" + latitude + "," + longitude + "\">Show map</a>"; return s; } // shortening URL e.g. http://.../123.jpg function shortenURL( url ) { url = decodeURIComponent(url); var slash = url.split("/"); var lastName = slash[slash.length-1]; return url.split(":")[0]+"://.../"+lastName; }
span.highlight {color: red;} span.propertyName {color: gray;} span.subject { color: blue; } span.object{ color: black; } body { background: white; } a, a span { text-decoration: underline; } a:hover, a span:hover { text-decoration: none; } font-weight: 100;
<script type="text/javascript"> </script> <body> <canvas width="1200" height="1000"></canvas> </body>
Preview
Input Data
ReadMe
Snapshots
LinkData Work
Table Data
宮城県石巻市 転入転出状況
Contributor:石巻市, ICT総合推進課
Update:Dec 26, 2019
364 Downloads, 2 Applications
転入転出状況 (1)県内 単位:人 資料:石巻市市民課 ファイル名:tenshutunyuu_kennai 各市町村の年中の数値の定義は以下の通り [当該市町村から石巻市へ転入];[石巻市から当該市町村へ転出];[差引] (2)県外 単位:人 資料:石巻市市民課 ファイル名:tenshutunyuu_kengai 各都道府県の年中の数値の定義は以下の通り [当該都道府県から石巻市へ転入];[石巻市から当該都道府県へ転出];[差引]
tenshutunyuu_kengai
[
]
tenshutunyuu_kennai
[
]
Add LinkData work(LinkData)
Link http://app.linkdata.org/run/app1s1335i?tab=readme
jquery-1.11.2.min.js
Work
Add
Clear
insert work id or work name.