• forked:参議院議員通常選挙(神奈川県選出)投票結果レポート
Import an externally hosted application
Check style

  • JavaScript
  • CSS
  • HTML
  • Images
  • Input Data
  • ReadMe
  • forked:参議院議員通常選挙(神奈川県選出)投票結果レポート
  • http://code.jquery.com/jquery-1.8.3.min.js  
  • jquery-ui-1.9.2.custom.min.js  
  • pivot.js  
  •  
  • history

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
 
/*
This is a Example program to retrieve and display the data. 
Press the Run button on the right of the screen (described the behavior of the Example program below). 
Please create a new application rewrite this program work. 
*/
var all_data;        
function initialize(){
    all_data = new Array();
    // データをLinkDataから取得 
    tmp_a_data = new Array();
    $.each(LinkData.getWorks(), function(workKey, workValue) {
        $.each(LinkData.getFiles(workValue), function(fileKey, fileValue) {
            $.each(LinkData.getSubjects(workValue, fileValue), function(subjKey, subjValue) {
                            var tmp_data = {}
                //tmp_data["id"] = subjValue;
                $.each(LinkData.getProperties(workValue, fileValue), function(propKey, propValue) {
                    $.each(LinkData.getObjects(workValue, fileValue, subjValue, propValue), function(objKey, objValue) {
                                                if(propValue == "http://www.w3.org/2000/01/rdf-schema#label"){
                            tmp_data["区"] = objValue;
                        }else if(propValue == "http://linkdata.org/property/rdf1s831i#%E6%8A%95%E7%A5%A8%E6%97%A5"){
                            tmp_data["投票日"] = objValue;
                        }else if(propValue == "http://xmlns.com/foaf/0.1/gender"){
                            tmp_data["性別"] = objValue;
                        }else if(propValue == "http://linkdata.org/property/rdf1s831i#%E6%9C%89%E6%A8%A9%E8%80%85%E6%95%B0"){
                            tmp_data["有権者数"] = objValue;
                        }else if(propValue == "http://linkdata.org/property/rdf1s831i#%E6%8A%95%E7%A5%A8%E8%80%85%E6%95%B0"){
                            tmp_data["投票者数"] = objValue;
                        }
                    });
                });
                                tmp_a_data.push(tmp_data);
            });
        });
    });
    //全データ
    all_data = tmp_a_data;
    
    //$.getScript("pivot.js", function(){  //2013.07.08 changed
        var derivers = $.pivotUtilities.derivers;
            $("#output").pivotUI(all_data, {
                //derivedAttributes: { 
                //    "num_tohyosya Bin": derivers.bin("num_tohyosya", 100)
                //},
                rows: ["区"],
                cols: ["投票日"],
                vals:["投票者数"],
                aggregatorName:"count",
                effectsName: "Heatmap"
            });
    //}); //2013.07.08 changed
 
};
 
window.onload = function() {
    $(function(){
        initialize();        
    }); 
};
 
http://code.jquery.com/jquery-1.8.3.min.js
jquery-ui-1.9.2.custom.min.js
pivot.js
Playing...

http://code.jquery.com/jquery-1.8.3.min.js
jquery-ui-1.9.2.custom.min.js
pivot.js