postrest 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/app.rb +1 -1
- data/public/index.htm +116 -0
- data/public/node_modules/pivottable/CONTRIBUTING.md +19 -0
- data/public/node_modules/pivottable/LICENSE.md +9 -0
- data/public/node_modules/pivottable/ReadMe.md +155 -0
- data/public/node_modules/pivottable/bower.json +31 -0
- data/public/node_modules/pivottable/c3_renderers.coffee +155 -0
- data/public/node_modules/pivottable/d3_renderers.coffee +73 -0
- data/public/node_modules/pivottable/dist/c3_renderers.js +256 -0
- data/public/node_modules/pivottable/dist/c3_renderers.js.map +1 -0
- data/public/node_modules/pivottable/dist/c3_renderers.min.js +2 -0
- data/public/node_modules/pivottable/dist/c3_renderers.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/d3_renderers.js +105 -0
- data/public/node_modules/pivottable/dist/d3_renderers.js.map +1 -0
- data/public/node_modules/pivottable/dist/d3_renderers.min.js +2 -0
- data/public/node_modules/pivottable/dist/d3_renderers.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/export_renderers.js +80 -0
- data/public/node_modules/pivottable/dist/export_renderers.js.map +1 -0
- data/public/node_modules/pivottable/dist/export_renderers.min.js +2 -0
- data/public/node_modules/pivottable/dist/export_renderers.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/gchart_renderers.js +183 -0
- data/public/node_modules/pivottable/dist/gchart_renderers.js.map +1 -0
- data/public/node_modules/pivottable/dist/gchart_renderers.min.js +2 -0
- data/public/node_modules/pivottable/dist/gchart_renderers.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.css +97 -0
- data/public/node_modules/pivottable/dist/pivot.es.js +78 -0
- data/public/node_modules/pivottable/dist/pivot.es.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.es.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.es.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.fr.js +78 -0
- data/public/node_modules/pivottable/dist/pivot.fr.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.fr.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.fr.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.js +1511 -0
- data/public/node_modules/pivottable/dist/pivot.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.min.css +1 -0
- data/public/node_modules/pivottable/dist/pivot.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.nl.js +78 -0
- data/public/node_modules/pivottable/dist/pivot.nl.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.nl.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.nl.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.pt.js +104 -0
- data/public/node_modules/pivottable/dist/pivot.pt.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.pt.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.pt.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.ru.js +78 -0
- data/public/node_modules/pivottable/dist/pivot.ru.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.ru.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.ru.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.tr.js +104 -0
- data/public/node_modules/pivottable/dist/pivot.tr.js.map +1 -0
- data/public/node_modules/pivottable/dist/pivot.tr.min.js +2 -0
- data/public/node_modules/pivottable/dist/pivot.tr.min.js.map +1 -0
- data/public/node_modules/pivottable/dist/tips_data.min.js +247 -0
- data/public/node_modules/pivottable/examples/c3.html +61 -0
- data/public/node_modules/pivottable/examples/d3.html +49 -0
- data/public/node_modules/pivottable/examples/fully_loaded.html +80 -0
- data/public/node_modules/pivottable/examples/gchart.html +53 -0
- data/public/node_modules/pivottable/examples/gh-fork-ribbon.css +140 -0
- data/public/node_modules/pivottable/examples/gh-fork-ribbon.ie.css +78 -0
- data/public/node_modules/pivottable/examples/index.html +85 -0
- data/public/node_modules/pivottable/examples/local.html +74 -0
- data/public/node_modules/pivottable/examples/montreal_2014.csv +366 -0
- data/public/node_modules/pivottable/examples/montreal_2014.html +106 -0
- data/public/node_modules/pivottable/examples/mps.csv +309 -0
- data/public/node_modules/pivottable/examples/mps.html +45 -0
- data/public/node_modules/pivottable/examples/mps.json +1 -0
- data/public/node_modules/pivottable/examples/mps_agg.html +44 -0
- data/public/node_modules/pivottable/examples/mps_csv.html +42 -0
- data/public/node_modules/pivottable/examples/mps_export.html +44 -0
- data/public/node_modules/pivottable/examples/mps_fr.html +40 -0
- data/public/node_modules/pivottable/examples/mps_prepop.html +42 -0
- data/public/node_modules/pivottable/examples/onrefresh.html +52 -0
- data/public/node_modules/pivottable/examples/rcsvs.html +87 -0
- data/public/node_modules/pivottable/examples/scatter.html +53 -0
- data/public/node_modules/pivottable/examples/show_code.js +17 -0
- data/public/node_modules/pivottable/examples/simple.html +41 -0
- data/public/node_modules/pivottable/examples/simple_agg.html +51 -0
- data/public/node_modules/pivottable/examples/simple_function.html +57 -0
- data/public/node_modules/pivottable/examples/simple_ui.html +42 -0
- data/public/node_modules/pivottable/examples/simple_ui_from_table.html +60 -0
- data/public/node_modules/pivottable/export_renderers.coffee +57 -0
- data/public/node_modules/pivottable/gchart_renderers.coffee +111 -0
- data/public/node_modules/pivottable/gulpFile.js +95 -0
- data/public/node_modules/pivottable/images/animation.gif +0 -0
- data/public/node_modules/pivottable/images/filters.png +0 -0
- data/public/node_modules/pivottable/images/gender_age_bins.png +0 -0
- data/public/node_modules/pivottable/images/gender_imbalance.png +0 -0
- data/public/node_modules/pivottable/images/gender_imbalance_instructions.png +0 -0
- data/public/node_modules/pivottable/images/initial_state.png +0 -0
- data/public/node_modules/pivottable/images/province_x_party_heatmap.png +0 -0
- data/public/node_modules/pivottable/images/province_x_party_heatmap_instructions.png +0 -0
- data/public/node_modules/pivottable/images/simple.png +0 -0
- data/public/node_modules/pivottable/images/simple_ui.png +0 -0
- data/public/node_modules/pivottable/images/whats_what.png +0 -0
- data/public/node_modules/pivottable/index.html +14 -0
- data/public/node_modules/pivottable/node_modules/jquery/AUTHORS.txt +278 -0
- data/public/node_modules/pivottable/node_modules/jquery/LICENSE.txt +36 -0
- data/public/node_modules/pivottable/node_modules/jquery/README.md +65 -0
- data/public/node_modules/pivottable/node_modules/jquery/bower.json +14 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.js +9842 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.min.js +4 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.min.map +1 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.slim.js +7877 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.slim.min.js +4 -0
- data/public/node_modules/pivottable/node_modules/jquery/dist/jquery.slim.min.map +1 -0
- data/public/node_modules/pivottable/node_modules/jquery/package.json +122 -0
- data/public/node_modules/pivottable/node_modules/jquery/sizzle/LICENSE.txt +36 -0
- data/public/node_modules/pivottable/node_modules/jquery/sizzle/dist/sizzle.js +2143 -0
- data/public/node_modules/pivottable/node_modules/jquery/sizzle/dist/sizzle.min.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/sizzle/dist/sizzle.min.map +1 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax.js +845 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/jsonp.js +100 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/load.js +83 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/parseJSON.js +13 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/parseXML.js +27 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/script.js +68 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/var/location.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/var/nonce.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/var/rquery.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/ajax/xhr.js +167 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes.js +11 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes/attr.js +142 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes/classes.js +177 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes/prop.js +125 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes/support.js +36 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/attributes/val.js +177 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/callbacks.js +232 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core.js +494 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/DOMEval.js +14 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/access.js +65 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/init.js +134 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/parseHTML.js +41 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/ready.js +103 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/support.js +18 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/core/var/rsingleTag.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css.js +515 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/addGetHookIf.js +24 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/adjustCSS.js +65 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/curCSS.js +60 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/defaultDisplay.js +72 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/hiddenVisibleSelectors.js +18 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/showHide.js +48 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/support.js +121 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/cssExpand.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/getStyles.js +15 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/isHidden.js +16 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/rmargin.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/rnumnonpx.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/css/var/swap.js +24 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data.js +187 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/Data.js +200 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/accepts.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/support.js +23 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/var/acceptData.js +18 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/var/dataPriv.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/data/var/dataUser.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/deferred.js +158 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/deferred/exceptionHook.js +19 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/deprecated.js +32 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/dimensions.js +54 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/effects.js +629 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/effects/Tween.js +121 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/effects/animatedSelector.js +13 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/effects/support.js +58 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event.js +710 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event/ajax.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event/alias.js +27 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event/focusin.js +53 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event/support.js +9 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/event/trigger.js +199 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/exports/amd.js +24 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/exports/global.js +26 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/intro.js +44 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/jquery.js +37 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation.js +481 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/_evalUrl.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/buildFragment.js +102 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/createSafeFragment.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/getAll.js +21 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/setGlobalEval.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/support.js +33 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/nodeNames.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/rleadingWhitespace.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/rscriptType.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/var/rtagName.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/manipulation/wrapMap.js +27 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/offset.js +218 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/outro.js +2 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/queue.js +143 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/queue/delay.js +22 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/selector-native.js +211 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/selector-sizzle.js +14 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/selector.js +1 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/serialize.js +125 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/support.js +63 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/traversing.js +175 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/traversing/findFilter.js +100 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/traversing/var/dir.js +20 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/traversing/var/siblings.js +15 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/arr.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/class2type.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/concat.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/deletedIds.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/document.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/documentElement.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/hasOwn.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/indexOf.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/pnum.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/push.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/rcssNum.js +7 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/rnotwhite.js +3 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/slice.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/support.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/var/toString.js +5 -0
- data/public/node_modules/pivottable/node_modules/jquery/src/wrap.js +79 -0
- data/public/node_modules/pivottable/package.json +70 -0
- data/public/node_modules/pivottable/pivot.coffee +957 -0
- data/public/node_modules/pivottable/pivot.es.coffee +57 -0
- data/public/node_modules/pivottable/pivot.fr.coffee +57 -0
- data/public/node_modules/pivottable/pivot.nl.coffee +55 -0
- data/public/node_modules/pivottable/pivot.pt.coffee +80 -0
- data/public/node_modules/pivottable/pivot.ru.coffee +56 -0
- data/public/node_modules/pivottable/pivot.tr.coffee +80 -0
- data/public/node_modules/pivottable/pivottable.jquery.json +33 -0
- data/public/node_modules/pivottable/tests/boot.js +152 -0
- data/public/node_modules/pivottable/tests/index.html +35 -0
- data/public/node_modules/pivottable/tests/pivot_spec.coffee +458 -0
- data/public/vendor.js +5 -0
- metadata +232 -1
@@ -0,0 +1,106 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<title>Pivot Demo</title>
|
6
|
+
|
7
|
+
<!-- external libs from cdnjs -->
|
8
|
+
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.css">
|
9
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
10
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
|
11
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-csv/0.71/jquery.csv-0.71.min.js"></script>
|
12
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
|
13
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.js"></script>
|
14
|
+
|
15
|
+
<!-- PivotTable.js libs from ../dist -->
|
16
|
+
<link rel="stylesheet" type="text/css" href="../dist/pivot.css">
|
17
|
+
<script type="text/javascript" src="../dist/pivot.js"></script>
|
18
|
+
<script type="text/javascript" src="../dist/c3_renderers.js"></script>
|
19
|
+
<script type="text/javascript" src="../dist/export_renderers.js"></script>
|
20
|
+
|
21
|
+
<style>
|
22
|
+
body { font-family: Verdana; }
|
23
|
+
.c3-line, .c3-focused {stroke-width: 3px !important;}
|
24
|
+
.c3-bar {stroke: white !important; stroke-width: 1;}
|
25
|
+
.c3 text { font-size: 12px; color: grey;}
|
26
|
+
.tick line {stroke: white;}
|
27
|
+
.c3-axis path {stroke: grey;}
|
28
|
+
.c3-circle { opacity: 1 !important; }
|
29
|
+
</style>
|
30
|
+
|
31
|
+
<!-- for examples only! script to show code to user -->
|
32
|
+
<script type="text/javascript" src="show_code.js"></script>
|
33
|
+
</head>
|
34
|
+
|
35
|
+
<body>
|
36
|
+
<script type="text/javascript">
|
37
|
+
// This example loads the "Montreal Weather 2014" dataset
|
38
|
+
// from a CSV and shows date handling with derivers and
|
39
|
+
// sort overriding. This example also features custom
|
40
|
+
// aggregators, C3 Charts and hidden attributes.
|
41
|
+
|
42
|
+
$(function () {
|
43
|
+
|
44
|
+
var dateFormat = $.pivotUtilities.derivers.dateFormat;
|
45
|
+
var sortAs = $.pivotUtilities.sortAs;
|
46
|
+
var tpl = $.pivotUtilities.aggregatorTemplates;
|
47
|
+
|
48
|
+
$.get("montreal_2014.csv", function(montreal_2014) {
|
49
|
+
$("#output").pivotUI($.csv.toArrays(montreal_2014), {
|
50
|
+
|
51
|
+
aggregators: {
|
52
|
+
"Mean Temp (Celsius)":
|
53
|
+
function() { return tpl.average()(["Mean Temp (C)"])},
|
54
|
+
"Max Temp (Celsius)":
|
55
|
+
function() { return tpl.max()(["Max Temp (C)"]) },
|
56
|
+
"Min Temp (Celsius)":
|
57
|
+
function() { return tpl.min()(["Min Temp (C)"]) },
|
58
|
+
"Total Rain (mm)":
|
59
|
+
function() { return tpl.sum()(["Total Rain (mm)"]) },
|
60
|
+
"Total Snow (cm)":
|
61
|
+
function() { return tpl.sum()(["Total Snow (cm)"]) }
|
62
|
+
},
|
63
|
+
derivedAttributes: {
|
64
|
+
"year": dateFormat("Date", "%y", true),
|
65
|
+
"month": dateFormat("Date", "%m", true),
|
66
|
+
"day": dateFormat("Date", "%d", true),
|
67
|
+
"month name": dateFormat("Date", "%n", true),
|
68
|
+
"day name": dateFormat("Date", "%w", true)
|
69
|
+
},
|
70
|
+
|
71
|
+
sorters: function(attr) {
|
72
|
+
if(attr == "month name") {
|
73
|
+
return sortAs(["Jan","Feb","Mar","Apr", "May",
|
74
|
+
"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]);
|
75
|
+
}
|
76
|
+
if(attr == "day name") {
|
77
|
+
return sortAs(["Mon","Tue","Wed", "Thu","Fri",
|
78
|
+
"Sat","Sun"]);
|
79
|
+
}
|
80
|
+
},
|
81
|
+
|
82
|
+
hiddenAttributes: ["Date","Max Temp (C)","Mean Temp (C)",
|
83
|
+
"Min Temp (C)" ,"Total Rain (mm)","Total Snow (cm)"],
|
84
|
+
|
85
|
+
renderers: $.extend(
|
86
|
+
$.pivotUtilities.renderers,
|
87
|
+
$.pivotUtilities.c3_renderers,
|
88
|
+
$.pivotUtilities.export_renderers
|
89
|
+
),
|
90
|
+
|
91
|
+
rows: ["year", "month name"],
|
92
|
+
cols: ["day name"]
|
93
|
+
|
94
|
+
|
95
|
+
});
|
96
|
+
});
|
97
|
+
});
|
98
|
+
</script>
|
99
|
+
|
100
|
+
<p><a href="index.html">« back to examples</a></p>
|
101
|
+
|
102
|
+
<div id="output" style="margin: 10px;"></div>
|
103
|
+
|
104
|
+
</body>
|
105
|
+
|
106
|
+
</html>
|
@@ -0,0 +1,309 @@
|
|
1
|
+
Name,Party,Province,Age,Gender
|
2
|
+
"Liu, Laurin",NDP,Quebec,22,Female
|
3
|
+
"Mourani, Maria",Bloc Quebecois,Quebec,43,Female
|
4
|
+
"Sellah, Djaouida",NDP,Quebec,,Female
|
5
|
+
"St-Denis, Lise",NDP,Quebec,72,Female
|
6
|
+
"Fry, Hedy",Liberal,British Columbia,71,Female
|
7
|
+
"Turmel, Nycole",NDP,Quebec,70,Female
|
8
|
+
"Sgro, Judy",Liberal,Ontario,68,Female
|
9
|
+
"Raynault, Francine",NDP,Quebec,67,Female
|
10
|
+
"Davidson, Patricia",Conservative,Ontario,66,Female
|
11
|
+
"Smith, Joy",Conservative,Manitoba,65,Female
|
12
|
+
"Wong, Alice",Conservative,British Columbia,64,Female
|
13
|
+
"O'Neill Gordon, Tilly",Conservative,New Brunswick,63,Female
|
14
|
+
"Ablonczy, Diane",Conservative,Alberta,63,Female
|
15
|
+
"Duncan, Linda Francis",NDP,Alberta,63,Female
|
16
|
+
"Bennett, Carolyn",Liberal,Ontario,62,Female
|
17
|
+
"Nash, Peggy",NDP,Ontario,61,Female
|
18
|
+
"Mathyssen, Irene",NDP,Ontario,61,Female
|
19
|
+
"Sims, Jinny Jogindera",NDP,British Columbia,60,Female
|
20
|
+
"Foote, Judy",Liberal,Newfoundland and Labrador,60,Female
|
21
|
+
"Crowder, Jean",NDP,British Columbia,60,Female
|
22
|
+
"Davies, Libby",NDP,British Columbia,59,Female
|
23
|
+
"Yelich, Lynne",Conservative,Saskatchewan,59,Female
|
24
|
+
"Day, Anne-Marie",NDP,Quebec,58,Female
|
25
|
+
"May, Elizabeth",Green,British Columbia,58,Female
|
26
|
+
"Murray, Joyce",Liberal,British Columbia,58,Female
|
27
|
+
"Findlay, Kerry-Lynne D.",Conservative,British Columbia,57,Female
|
28
|
+
"Brown, Lois",Conservative,Ontario,57,Female
|
29
|
+
"Laverdi�re, H�l�ne",NDP,Quebec,57,Female
|
30
|
+
"Boutin-Sweet, Marjolaine",NDP,Quebec,57,Female
|
31
|
+
"Crockatt, Joan",Conservative,Alberta,56,Female
|
32
|
+
"Chow, Olivia",NDP,Ontario,55,Female
|
33
|
+
"McLeod, Cathy",Conservative,British Columbia,55,Female
|
34
|
+
"Finley, Diane",Conservative,Ontario,55,Female
|
35
|
+
"LeBlanc, H�l�ne",NDP,Quebec,54,Female
|
36
|
+
"Grewal, Nina",Conservative,British Columbia,54,Female
|
37
|
+
"Hughes, Carol",NDP,Ontario,54,Female
|
38
|
+
"Shea, Gail",Conservative,Prince Edward Island,53,Female
|
39
|
+
"Truppe, Susan",Conservative,Ontario,53,Female
|
40
|
+
"Young, Wai",Conservative,British Columbia,52,Female
|
41
|
+
"Gallant, Cheryl",Conservative,Ontario,52,Female
|
42
|
+
"Boivin, Fran�oise",NDP,Quebec,52,Female
|
43
|
+
"Block, Kelly",Conservative,Saskatchewan,51,Female
|
44
|
+
"Ayala, Paulina",NDP,Quebec,50,Female
|
45
|
+
"Groguh�, Sadia",NDP,Quebec,50,Female
|
46
|
+
"Charlton, Chris",NDP,Ontario,49,Female
|
47
|
+
"Bergen, Candice",Conservative,Manitoba,48,Female
|
48
|
+
"Perreault, Manon",NDP,Quebec,46,Female
|
49
|
+
"James, Roxanne",Conservative,Ontario,46,Female
|
50
|
+
"Ambler, Stella",Conservative,Ontario,46,Female
|
51
|
+
"Duncan, Kirsty",Liberal,Ontario,46,Female
|
52
|
+
"Glover, Shelly",Conservative,Manitoba,45,Female
|
53
|
+
"Aglukkaq, Leona",Conservative,Territories,45,Female
|
54
|
+
"Raitt, Lisa",Conservative,Ontario,44,Female
|
55
|
+
"Ambrose, Rona",Conservative,Alberta,43,Female
|
56
|
+
"Leitch, Kellie",Conservative,Ontario,42,Female
|
57
|
+
"Leslie, Megan",NDP,Nova Scotia,39,Female
|
58
|
+
"Hassainia, Sana",NDP,Quebec,38,Female
|
59
|
+
"Adams, Eve",Conservative,Ontario,38,Female
|
60
|
+
"Rempel, Michelle",Conservative,Alberta,32,Female
|
61
|
+
"Papillon, Annick",NDP,Quebec,32,Female
|
62
|
+
"Sitsabaiesan, Rathika",NDP,Ontario,31,Female
|
63
|
+
"Quach, Anne Minh-Thu",NDP,Quebec,30,Female
|
64
|
+
"Ashton, Niki",NDP,Manitoba,30,Female
|
65
|
+
"Moore, Christine",NDP,Quebec,29,Female
|
66
|
+
"Morin, Isabelle",NDP,Quebec,28,Female
|
67
|
+
"Blanchette-Lamothe, Lysane",NDP,Quebec,28,Female
|
68
|
+
"Brosseau, Ruth Ellen",NDP,Quebec,28,Female
|
69
|
+
"Latendresse, Alexandrine",NDP,Quebec,28,Female
|
70
|
+
"Dor� Lefebvre, Rosane",NDP,Quebec,28,Female
|
71
|
+
"Morin, Marie-Claude",NDP,Quebec,27,Female
|
72
|
+
"Michaud, �laine",NDP,Quebec,27,Female
|
73
|
+
"P�clet, �ve",NDP,Quebec,24,Female
|
74
|
+
"Freeman, Myl�ne",NDP,Quebec,23,Female
|
75
|
+
"Borg, Charmaine",NDP,Quebec,22,Female
|
76
|
+
"Bateman, Joyce",Conservative,Manitoba,,Female
|
77
|
+
"Hiebert, Russ",Conservative,British Columbia,43,Male
|
78
|
+
"Jacob, Pierre",NDP,Quebec,59,Male
|
79
|
+
"Vellacott, Maurice",Conservative,Saskatchewan,57,Male
|
80
|
+
"Boughen, Ray",Conservative,Saskatchewan,75,Male
|
81
|
+
"O'Connor, Gordon",Conservative,Ontario,73,Male
|
82
|
+
"Cotler, Irwin",Liberal,Quebec,72,Male
|
83
|
+
"Oliver, Joe",Conservative,Ontario,72,Male
|
84
|
+
"Tilson, David Allan",Conservative,Ontario,71,Male
|
85
|
+
"Fantino, Julian",Conservative,Ontario,70,Male
|
86
|
+
"Kent, Peter",Conservative,Ontario,69,Male
|
87
|
+
"Plamondon, Louis",Bloc Quebecois,Quebec,69,Male
|
88
|
+
"Schellenberger, Gary",Conservative,Ontario,69,Male
|
89
|
+
"Lauzon, Guy",Conservative,Ontario,68,Male
|
90
|
+
"Harris, Richard M.",Conservative,British Columbia,68,Male
|
91
|
+
"Goldring, Peter",Conservative,Alberta,68,Male
|
92
|
+
"Atamanenko, Alex",NDP,British Columbia,67,Male
|
93
|
+
"Payne, LaVar",Conservative,Alberta,67,Male
|
94
|
+
"Breitkreuz, Garry W.",Conservative,Saskatchewan,67,Male
|
95
|
+
"Genest, R�jean",NDP,Quebec,66,Male
|
96
|
+
"MacKenzie, Dave",Conservative,Ontario,66,Male
|
97
|
+
"Hyer, Bruce",NDP,Ontario,66,Male
|
98
|
+
"MacAulay, Lawrence",Liberal,Prince Edward Island,66,Male
|
99
|
+
"Galipeau, Royal",Conservative,Ontario,65,Male
|
100
|
+
"Marston, Wayne",NDP,Ontario,65,Male
|
101
|
+
"Hawn, Laurie",Conservative,Alberta,65,Male
|
102
|
+
"Kramp, Daryl",Conservative,Ontario,65,Male
|
103
|
+
"Shipley, Bev",Conservative,Ontario,65,Male
|
104
|
+
"Kerr, Greg",Conservative,Nova Scotia,65,Male
|
105
|
+
"Comartin, Joe",NDP,Ontario,65,Male
|
106
|
+
"Norlock, Rick",Conservative,Ontario,64,Male
|
107
|
+
"McKay, John",Liberal,Ontario,64,Male
|
108
|
+
"Mayes, Colin",Conservative,British Columbia,64,Male
|
109
|
+
"Rae, Bob",Liberal,Ontario,64,Male
|
110
|
+
"Harris, Jack",NDP,Newfoundland and Labrador,64,Male
|
111
|
+
"Duncan, John",Conservative,British Columbia,64,Male
|
112
|
+
"Chisu, Corneliu",Conservative,Ontario,63,Male
|
113
|
+
"Garneau, Marc",Liberal,Quebec,63,Male
|
114
|
+
"Easter, Arnold Wayne",Liberal,Prince Edward Island,63,Male
|
115
|
+
"Aspin, Jay",Conservative,Ontario,63,Male
|
116
|
+
"Goodale, Ralph",Liberal,Saskatchewan,63,Male
|
117
|
+
"Albrecht, Harold",Conservative,Ontario,63,Male
|
118
|
+
"Gravelle, Claude",NDP,Ontario,63,Male
|
119
|
+
"Komarnicki, Ed",Conservative,Saskatchewan,63,Male
|
120
|
+
"Flaherty, James Michael (Jim)",Conservative,Ontario,62,Male
|
121
|
+
"Rankin, Murray",NDP,British Columbia,62,Male
|
122
|
+
"McCallum, John",Liberal,Ontario,62,Male
|
123
|
+
"Warawa, Mark",Conservative,British Columbia,62,Male
|
124
|
+
"Obhrai, Deepak",Conservative,Alberta,62,Male
|
125
|
+
"Benoit, Leon Earl",Conservative,Alberta,62,Male
|
126
|
+
"Leung, Chungsen",Conservative,Ontario,62,Male
|
127
|
+
"Morin, Marc-Andr�",NDP,Quebec,61,Male
|
128
|
+
"Sopuck, Robert",Conservative,Manitoba,61,Male
|
129
|
+
"Ritz, Gerry",Conservative,Saskatchewan,61,Male
|
130
|
+
"Garrison, Randall",NDP,British Columbia,61,Male
|
131
|
+
"Lunney, James",Conservative,British Columbia,61,Male
|
132
|
+
"Lukiwski, Tom",Conservative,Saskatchewan,61,Male
|
133
|
+
"Carmichael, John",Conservative,Ontario,60,Male
|
134
|
+
"Menzies, Ted",Conservative,Alberta,60,Male
|
135
|
+
"Valcourt, Bernard",Conservative,New Brunswick,60,Male
|
136
|
+
"Ashfield, Keith",Conservative,New Brunswick,60,Male
|
137
|
+
"Nicholson, Rob",Conservative,Ontario,60,Male
|
138
|
+
"Young, Terence H.",Conservative,Ontario,60,Male
|
139
|
+
"Toews, Vic",Conservative,Manitoba,60,Male
|
140
|
+
"Sullivan, Mike",NDP,Ontario,60,Male
|
141
|
+
"Patry, Claude",NDP,Quebec,59,Male
|
142
|
+
"Keddy, Gerald",Conservative,Nova Scotia,59,Male
|
143
|
+
"Bevington, Dennis Fraser",NDP,Territories,59,Male
|
144
|
+
"Allen, Malcolm",NDP,Ontario,59,Male
|
145
|
+
"Rafferty, John",NDP,Ontario,59,Male
|
146
|
+
"Dreeshen, Earl",Conservative,Alberta,59,Male
|
147
|
+
"Kamp, Randy",Conservative,British Columbia,59,Male
|
148
|
+
"Merrifield, Rob",Conservative,Alberta,59,Male
|
149
|
+
"Woodworth, Stephen",Conservative,Ontario,58,Male
|
150
|
+
"McColeman, Phil",Conservative,Ontario,58,Male
|
151
|
+
"Lebel, Denis",Conservative,Quebec,58,Male
|
152
|
+
"Lizon, Wladyslaw",Conservative,Ontario,58,Male
|
153
|
+
"Holder, Ed",Conservative,Ontario,58,Male
|
154
|
+
"Valeriote, Frank",Liberal,Ontario,58,Male
|
155
|
+
"Christopherson, David",NDP,Ontario,58,Male
|
156
|
+
"Mulcair, Thomas J.",NDP,Quebec,58,Male
|
157
|
+
"Daniel, Joe",Conservative,Ontario,58,Male
|
158
|
+
"Karygiannis, Jim",Liberal,Ontario,57,Male
|
159
|
+
"Godin, Yvon",NDP,New Brunswick,57,Male
|
160
|
+
"Dionne Labelle, Pierre",NDP,Quebec,57,Male
|
161
|
+
"Preston, Joe",Conservative,Ontario,57,Male
|
162
|
+
"B�langer, Mauril",Liberal,Ontario,57,Male
|
163
|
+
"Fast, Edward",Conservative,British Columbia,57,Male
|
164
|
+
"Tweed, Mervin C.",Conservative,Manitoba,57,Male
|
165
|
+
"Dion, St�phane",Liberal,Quebec,57,Male
|
166
|
+
"Van Kesteren, Dave",Conservative,Ontario,57,Male
|
167
|
+
"Cuzner, Rodger",Liberal,Nova Scotia,57,Male
|
168
|
+
"Martin, Pat",NDP,Manitoba,57,Male
|
169
|
+
"Stoffer, Peter",NDP,Nova Scotia,56,Male
|
170
|
+
"Miller, Larry",Conservative,Ontario,56,Male
|
171
|
+
"Blanchette, Denis",NDP,Quebec,56,Male
|
172
|
+
"Nunez-Melo, Jos�",NDP,Quebec,56,Male
|
173
|
+
"Goguen, Robert",Conservative,New Brunswick,55,Male
|
174
|
+
"Scarpaleggia, Francis",Liberal,Quebec,55,Male
|
175
|
+
"Sweet, David",Conservative,Ontario,55,Male
|
176
|
+
"Anderson, David",Conservative,Saskatchewan,55,Male
|
177
|
+
"Chisholm, Robert",NDP,Nova Scotia,55,Male
|
178
|
+
"Stanton, Bruce",Conservative,Ontario,55,Male
|
179
|
+
"Goodyear, Gary",Conservative,Ontario,54,Male
|
180
|
+
"Weston, John",Conservative,British Columbia,54,Male
|
181
|
+
"Dechert, Bob",Conservative,Ontario,54,Male
|
182
|
+
"Shory, Devinder",Conservative,Alberta,54,Male
|
183
|
+
"Pilon, Fran�ois",NDP,Quebec,54,Male
|
184
|
+
"Hayes, Bryan",Conservative,Ontario,54,Male
|
185
|
+
"Gigu�re, Alain",NDP,Quebec,54,Male
|
186
|
+
"Sorenson, Kevin",Conservative,Alberta,54,Male
|
187
|
+
"Benskin, Tyrone",NDP,Quebec,53,Male
|
188
|
+
"Menegakis, Costas",Conservative,Ontario,53,Male
|
189
|
+
"Harper, Stephen",Conservative,Alberta,53,Male
|
190
|
+
"Wilks, David",Conservative,British Columbia,53,Male
|
191
|
+
"Regan, Geoff",Liberal,Nova Scotia,53,Male
|
192
|
+
"McGuinty, David",Liberal,Ontario,52,Male
|
193
|
+
"Gosal, Bal",Conservative,Ontario,52,Male
|
194
|
+
"Aubin, Robert",NDP,Quebec,52,Male
|
195
|
+
"Eyking, Mark",Liberal,Nova Scotia,52,Male
|
196
|
+
"Brown, Gordon",Conservative,Ontario,52,Male
|
197
|
+
"Allen, Mike",Conservative,New Brunswick,52,Male
|
198
|
+
"Clement, Tony",Conservative,Ontario,51,Male
|
199
|
+
"Cannan, Ronald",Conservative,British Columbia,51,Male
|
200
|
+
"Rousseau, Jean",NDP,Quebec,51,Male
|
201
|
+
"Opitz, Ted",Conservative,Ontario,51,Male
|
202
|
+
"Toet, Lawrence",Conservative,Manitoba,50,Male
|
203
|
+
"Cash, Andrew",NDP,Ontario,50,Male
|
204
|
+
"Lamoureux, Kevin",Liberal,Manitoba,50,Male
|
205
|
+
"Scott, Craig",NDP,Ontario,50,Male
|
206
|
+
"Adler, Mark",Conservative,Ontario,50,Male
|
207
|
+
"Carrie, Colin",Conservative,Ontario,50,Male
|
208
|
+
"Julian, Peter",NDP,British Columbia,50,Male
|
209
|
+
"Pacetti, Massimo",Liberal,Quebec,50,Male
|
210
|
+
"Saganash, Romeo",NDP,Quebec,50,Male
|
211
|
+
"Angus, Charlie",NDP,Ontario,50,Male
|
212
|
+
"Davies, Don",NDP,British Columbia,49,Male
|
213
|
+
"Bernier, Maxime",Conservative,Quebec,49,Male
|
214
|
+
"Dewar, Paul",NDP,Ontario,49,Male
|
215
|
+
"Jean, Brian",Conservative,Alberta,49,Male
|
216
|
+
"Devolin, Barry",Conservative,Ontario,49,Male
|
217
|
+
"Lemieux, Pierre",Conservative,Ontario,49,Male
|
218
|
+
"Van Loan, Peter",Conservative,Ontario,49,Male
|
219
|
+
"Casey, Sean",Liberal,Prince Edward Island,49,Male
|
220
|
+
"Nantel, Pierre",NDP,Quebec,49,Male
|
221
|
+
"Coderre, Denis",Liberal,Quebec,49,Male
|
222
|
+
"Wallace, Mike",Conservative,Ontario,49,Male
|
223
|
+
"Braid, Peter",Conservative,Ontario,48,Male
|
224
|
+
"Gourde, Jacques",Conservative,Quebec,48,Male
|
225
|
+
"Reid, Scott",Conservative,Ontario,48,Male
|
226
|
+
"Hsu, Ted",Liberal,Ontario,48,Male
|
227
|
+
"Saxton, Andrew",Conservative,British Columbia,48,Male
|
228
|
+
"Weston, Rodney",Conservative,New Brunswick,48,Male
|
229
|
+
"Penashue, Peter",Conservative,Newfoundland and Labrador,48,Male
|
230
|
+
"Bellavance, Andr�",Bloc Quebecois,Quebec,48,Male
|
231
|
+
"Rathgeber, Brent",Conservative,Alberta,48,Male
|
232
|
+
"Kellway, Matthew",NDP,Ontario,48,Male
|
233
|
+
"Toone, Philip",NDP,Quebec,47,Male
|
234
|
+
"Allison, Dean",Conservative,Ontario,47,Male
|
235
|
+
"Trottier, Bernard",Conservative,Ontario,47,Male
|
236
|
+
"Blaney, Steven",Conservative,Quebec,47,Male
|
237
|
+
"Bezan, James",Conservative,Manitoba,47,Male
|
238
|
+
"MacKay, Peter Gordon",Conservative,Nova Scotia,47,Male
|
239
|
+
"Dykstra, Richard",Conservative,Ontario,46,Male
|
240
|
+
"Sandhu, Jasbir",NDP,British Columbia,46,Male
|
241
|
+
"Donnelly, Fin",NDP,British Columbia,46,Male
|
242
|
+
"Armstrong, Scott",Conservative,Nova Scotia,46,Male
|
243
|
+
"Byrne, Gerry",Liberal,Newfoundland and Labrador,46,Male
|
244
|
+
"Stewart, Kennedy",NDP,British Columbia,46,Male
|
245
|
+
"Cleary, Ryan",NDP,Newfoundland and Labrador,46,Male
|
246
|
+
"C�t�, Raymond",NDP,Quebec,45,Male
|
247
|
+
"Clarke, Rob",Conservative,Saskatchewan,45,Male
|
248
|
+
"Brison, Scott",Liberal,Nova Scotia,45,Male
|
249
|
+
"Butt, Brad",Conservative,Ontario,45,Male
|
250
|
+
"Rickford, Greg",Conservative,Ontario,45,Male
|
251
|
+
"LeBlanc, Dominic",Liberal,New Brunswick,45,Male
|
252
|
+
"Hoback, Randy",Conservative,Saskatchewan,45,Male
|
253
|
+
"Caron, Guy",NDP,Quebec,44,Male
|
254
|
+
"Brahmi, Tarik",NDP,Quebec,44,Male
|
255
|
+
"Kenney, Jason",Conservative,Alberta,44,Male
|
256
|
+
"Masse, Brian",NDP,Ontario,44,Male
|
257
|
+
"Alexander, Chris",Conservative,Ontario,44,Male
|
258
|
+
"Zimmer, Bob",Conservative,British Columbia,44,Male
|
259
|
+
"Calkins, Blaine",Conservative,Alberta,44,Male
|
260
|
+
"Baird, John",Conservative,Ontario,43,Male
|
261
|
+
"Lake, Mike",Conservative,Alberta,43,Male
|
262
|
+
"Simms, Scott",Liberal,Newfoundland and Labrador,43,Male
|
263
|
+
"Thibeault, Glenn",NDP,Ontario,43,Male
|
264
|
+
"Williamson, John",Conservative,New Brunswick,42,Male
|
265
|
+
"Calandra, Paul",Conservative,Ontario,42,Male
|
266
|
+
"Chicoine, Sylvain",NDP,Quebec,42,Male
|
267
|
+
"Del Mastro, Dean",Conservative,Ontario,42,Male
|
268
|
+
"Rajotte, James",Conservative,Alberta,42,Male
|
269
|
+
"Seeback, Kyle",Conservative,Ontario,42,Male
|
270
|
+
"Watson, Jeff",Conservative,Ontario,41,Male
|
271
|
+
"Lapointe, Fran�ois",NDP,Quebec,41,Male
|
272
|
+
"Nicholls, Jamie",NDP,Quebec,41,Male
|
273
|
+
"Chong, Michael D.",Conservative,Ontario,41,Male
|
274
|
+
"Trudeau, Justin",Liberal,Quebec,41,Male
|
275
|
+
"Larose, Jean-Fran�ois",NDP,Quebec,40,Male
|
276
|
+
"Anders, Rob",Conservative,Alberta,40,Male
|
277
|
+
"Fletcher, Steven John",Conservative,Manitoba,40,Male
|
278
|
+
"Cullen, Nathan",NDP,British Columbia,40,Male
|
279
|
+
"Ravignat, Mathieu",NDP,Quebec,39,Male
|
280
|
+
"Bruinooge, Rod",Conservative,Manitoba,39,Male
|
281
|
+
"Mai, Hoang",NDP,Quebec,39,Male
|
282
|
+
"Boulerice, Alexandre",NDP,Quebec,39,Male
|
283
|
+
"Fortin, Jean-Fran�ois",Bloc Quebecois,Quebec,39,Male
|
284
|
+
"Leef, Ryan",Conservative,Territories,38,Male
|
285
|
+
"Paradis, Christian",Conservative,Quebec,38,Male
|
286
|
+
"Choquette, Fran�ois",NDP,Quebec,38,Male
|
287
|
+
"Moore, Rob",Conservative,New Brunswick,38,Male
|
288
|
+
"Trost, Brad",Conservative,Saskatchewan,38,Male
|
289
|
+
"Gill, Parm",Conservative,Ontario,38,Male
|
290
|
+
"Hillyer, Jim",Conservative,Alberta,38,Male
|
291
|
+
"Richards, Blake",Conservative,Alberta,38,Male
|
292
|
+
"Uppal, Tim",Conservative,Alberta,38,Male
|
293
|
+
"Andrews, Scott",Liberal,Newfoundland and Labrador,37,Male
|
294
|
+
"Moore, James",Conservative,British Columbia,36,Male
|
295
|
+
"Lobb, Ben",Conservative,Ontario,36,Male
|
296
|
+
"Albas, Dan",Conservative,British Columbia,36,Male
|
297
|
+
"Storseth, Brian",Conservative,Alberta,34,Male
|
298
|
+
"Strahl, Mark",Conservative,British Columbia,34,Male
|
299
|
+
"Brown, Patrick W.",Conservative,Ontario,34,Male
|
300
|
+
"Warkentin, Chris",Conservative,Alberta,34,Male
|
301
|
+
"Scheer, Andrew",Conservative,Saskatchewan,33,Male
|
302
|
+
"Poilievre, Pierre",Conservative,Ontario,33,Male
|
303
|
+
"Genest-Jourdain, Jonathan",NDP,Quebec,33,Male
|
304
|
+
"Harris, Dan",NDP,Ontario,33,Male
|
305
|
+
"Tremblay, Jonathan",NDP,Quebec,28,Male
|
306
|
+
"Morin, Dany",NDP,Quebec,27,Male
|
307
|
+
"Dub�, Matthew",NDP,Quebec,24,Male
|
308
|
+
"Dusseault, Pierre-Luc",NDP,Quebec,21,Male
|
309
|
+
"O'Toole, Erin",Conservative,Ontario,,Male
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Pivot Demo</title>
|
5
|
+
<!-- external libs from cdnjs -->
|
6
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
7
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
|
8
|
+
|
9
|
+
<!-- PivotTable.js libs from ../dist -->
|
10
|
+
<link rel="stylesheet" type="text/css" href="../dist/pivot.css">
|
11
|
+
<script type="text/javascript" src="../dist/pivot.js"></script>
|
12
|
+
|
13
|
+
<style>
|
14
|
+
body {font-family: Verdana;}
|
15
|
+
</style>
|
16
|
+
|
17
|
+
<!-- for examples only! script to show code to user -->
|
18
|
+
<script type="text/javascript" src="show_code.js"></script>
|
19
|
+
</head>
|
20
|
+
<body>
|
21
|
+
<script type="text/javascript">
|
22
|
+
// This example loads the "Canadian Parliament 2012" dataset
|
23
|
+
// and adds derived attributes: "Age Bin" and "Gender Imbalance".
|
24
|
+
|
25
|
+
$(function(){
|
26
|
+
var derivers = $.pivotUtilities.derivers;
|
27
|
+
|
28
|
+
$.getJSON("mps.json", function(mps) {
|
29
|
+
$("#output").pivotUI(mps, {
|
30
|
+
derivedAttributes: {
|
31
|
+
"Age Bin": derivers.bin("Age", 10),
|
32
|
+
"Gender Imbalance": function(mp) {
|
33
|
+
return mp["Gender"] == "Male" ? 1 : -1;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
});
|
37
|
+
});
|
38
|
+
});
|
39
|
+
</script>
|
40
|
+
<p><a href="index.html">« back to examples</a></p>
|
41
|
+
|
42
|
+
<div id="output" style="margin: 30px;"></div>
|
43
|
+
|
44
|
+
</body>
|
45
|
+
</html>
|