Language
ログイン
言語設定
X
English
日本語 [Japanese]
オープンデータを使ってアプリを作ろう
アプリケーションの作成と公開をサポートするサイト
お問い合わせ
HOME
チュートリアル
アプリ新規作成
アプリのFork
公開アプリ一覧
アプリ作品の情報
統計表 目次 表版
fullscreen
石巻市, ICT総合推進課
0
評価指数
いいね!
0
Loading...
このアプリ作品で使われているデータと同じ形式のデータを作成し、このアプリに適用することができます。
ひな形として使うファイルをリストから選択し、"Create Templete"をクリックして下さい。
アプリケーション
fullscreen
play
stop
reload
Play
JavaScript
CSS
HTML
概要
保存した実行結果
統計表 目次 表版
jquery-1.11.2.min.js
統計表 目次 表版
統計表 目次 表版
統計表 目次 表版
統計表 目次 表版
/* This is a Example program to retrieve and display the list of the data. Press the play/reload button on the right of the upper screen, and the program is executed. The program first displayes the subjects that match the keyword completely. The program highlights the list fragments that match the keyword. The keyword is retrieved from the query following "subject=" in the URL, where the keyword must be encoded. Please create a new application by rewriting this program work. The following is the same content in Japanese. このサンプルプログラムはデータを取得してリスト表示します。画面右上のplay又はreloadボタンを押すとプログラムが実行されます。プログラムはキーワードに完全一致するサブジェクトを最初に表示します。またプログラムはキーワードに部分一致するリスト中の部分をハイライトします。キーワードはURLの中で"subject="に続くクエリーから取得されます。ただし、キーワードはURIエンコードされている必要があります。このプログラムを書き変えて新しいアプリケーションを作成してください。 */ window.onload = function() { var keyword = getParameterFromURL("subject"); // obtain keyword from the URL "?subject=" var list = ""; // list to be displayed var line_data = new Array(); // Work loop $.each(LinkData.getWorks(), function(workKey, workValue) { $("#result").append("<h3>" + LinkData.getWorkName(workValue) + "</h3>"); line_data[0] = "章"; line_data[1] = "分類"; line_data[2] = "表"; line_data[3] = "表(再詳細化後)"; line_data[4] = "データセット情報へのリンク"; line_data[5] = "ファイル名"; list = "<tr><td>" + line_data[0] + "</td><td>" + line_data[1] + "</td><td>" + line_data[2] + "</td><td>" + line_data[3] + "</td><td>" + line_data[4] + "</td><td>" + line_data[5] + "</td></tr>"; line_data[0] = ""; line_data[1] = ""; line_data[2] = ""; line_data[3] = ""; line_data[4] = ""; line_data[5] = ""; $("#result").append( list ); // 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 list += "<hr><h4>Viewing file: " + fileValue + "</h4>"; // Subject loop $.each(LinkData.getSubjects(workValue, fileValue), function(subjKey, subjValue) { //list = "123"; //list += " "; //list += "</h4>"; //$("#result").append( list ); //list += "<hr><h4>subjValue: " + subjValue + "</h4>"; //$("#result").append( list ); $.each(LinkData.getProperties(workValue, fileValue), function(propKey, propValue) { list = ""; $.each(LinkData.getObjects(workValue, fileValue, subjValue, propValue), function(objKey, objValue) { if(propValue == "http://linkdata.org/property/rdf1s3986i#Class"){ //list += "<hr><h4>" //list += objValue; //list += " "; line_data[0] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s3986i#FirstName"){ //list += objValue; //list += " "; line_data[1] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s3986i#SecondName"){ //list += objValue; //list += " "; line_data[2] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s3986i#TableName"){ //list += objValue; //list += " "; line_data[3] = objValue; }else if(propValue == "http://linkdata.org/property/rdf1s3986i#DataSet"){ if(objValue == "-"){ //list += "- "; //list += "<br>"; line_data[4] = "-"; }else{ //list += "<a href=\"" + objValue + "\" target=\"_blank\"><span class=\"object\">" + shortenURL(objValue) + "</span></a>"; //list += " "; //list += "<br>"; line_data[4] = "<a href=\"" + objValue + "\" target=\"_blank\"><span class=\"object\">" + shortenURL(objValue) + "</span></a>"; } }else if(propValue == "http://linkdata.org/property/rdf1s3986i#FileName"){ if(objValue == "-"){ //list += "- "; //list += "<br>"; line_data[5] = "-"; }else{ //list += "<a href=\"" + objValue + "\" target=\"_blank\"><span class=\"object\">" + shortenURL(objValue) + "</span></a>"; //list += " "; //list += "<br>"; line_data[5] = objValue; } } }); }); list = "<tr><td>" + line_data[0] + "</td><td>" + line_data[1] + "</td><td>" + line_data[2] + "</td><td>" + line_data[3] + "</td><td>" + line_data[4] + "</td><td>" + line_data[5] + "</td></tr>"; $("#result").append( list ); line_data[0] = ""; line_data[1] = ""; line_data[2] = ""; line_data[3] = ""; line_data[4] = ""; line_data[5] = ""; list = ""; }); }); }); //var derivers = $.pivotUtilities.derivers; //line_data[0] = "12345"; //line_data[1] = "12345"; //line_data[2] = "12345"; //list = "<tr><td>" + line_data[0] + "</td><td>" + line_data[1] + "</td><td>" + line_data[2] + "</td></tr>"; //$("#result").append( list ); //line_data[0] = "999"; //line_data[1] = "99"; //line_data[2] = "9999"; //list = "<tr><td>" + line_data[0] + "</td><td>" + line_data[1] + "</td><td>" + line_data[2] + "</td></tr>"; //$("#result").append( list ); //line_data[0] = "999999"; //line_data[1] = "99"; //line_data[2] = "9999999"; //list = "<tr><td>" + line_data[0] + "</td><td>" + line_data[1] + "</td><td>" + line_data[2] + "</td></tr>"; //$("#result").append( list ); //$("#output").pivotUI(line_data, { //rows: ["保育所名"], //cols: ["児童年齢"], //vals:["児童人数"], //aggregatorName:"sum", //effectsName: "Heatmap" //}); $("#result").append( list ); 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; }
table.pvtTable { font-family:arial; font-size: 8pt; text-align: left; border-collapse: collapse; } table.pvtTable tr th, table.pvtTable tr th { background-color: #e6EEEE; border: 1px solid #CDCDCD; font-size: 8pt; padding: 5px; } table.pvtTable .pvtColLabel {text-align: center;} table.pvtTable .pvtTotalLabel {text-align: right;} table.pvtTable tr td { color: #3D3D3D; padding: 5px; background-color: #FFF; border: 1px solid #CDCDCD; vertical-align: top; text-align: right; } .pvtTotal, .pvtGrandTotal { font-weight: bold; } .pvtAxisContainer { border: 1px solid gray; background: #EEE; padding: 5px; min-width: 20px; min-height: 20px; } .pvtAxisContainer li { margin: 5px; padding: 5px; list-style-type: none; cursor:move; } .pvtHorizList li { display: inline; }
<div id="result"></div>
jquery-1.11.2.min.js
このアプリをForkして新しいアプリを作る
ダウンロード
Fork元のアプリは更新されました.
>>see
アプリは更新されました.
>>see
ツイート
このアプリ作品をwebから探す
作者
メッセージ送信
石巻市, ICT総合推進課
実行回数
280
ウェブサイト
ライセンス
Fork count
0
作成日
2015年12月24日
最終更新日
2016年7月5日
"
" コミュニティへの投稿が完了しました。投稿したアプリ作品は、コミュニティ管理者によって承認されるとコミュニティに公開されます。
エントリー先のコミュニティとカテゴリ名を選択し、「エントリー」ボタンをクリックして下さい。
チュートリアル
アプリ作品の削除をする場合は削除をクリックしてください
送信者
名前
*
E-mail
*
件名
*
メッセージ
*
アクセス認証
*
送信
キャンセル
入力データ
関連アイデア
このアプリ作品で入力データとして使われているデータ作品のリストです。
チェックボックスの選択を変更すると、入力データを変更して実行することができます。
宮城県石巻市 統計表 目次
作者: 石巻市, ICT総合推進課
更新日: 2018年12月11日
1350 ダウンロード
,
4 アプリケーション
Agriculture_and_forestry_Census
DLjun_DataSet_Ishinomakishi
OpenData_Ohter_site
all_opendata_list_ishinomakishi
kokusei_ichiran
opendata_list_ishinomakishi
toukeihyou_mokuji
自分のデータを入力する
このアプリを使ったアイデアはまだ公開されていません
アイデアを作成
ニュースフィード
linkdata.org に関するツイート