-
Notifications
You must be signed in to change notification settings - Fork 4
/
revolvingdoor.html
1329 lines (1214 loc) · 38.5 KB
/
revolvingdoor.html
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>EU Integrity Watch</title>
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" href="css/dc.css"/>
<!--link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"-->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/material.css" rel="stylesheet">
<link href="css/theme.bootstrap.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<!--script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/crossfilter/1.3.11/crossfilter.min.js"></script>
<script type="text/javascript" src="js/dc.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.7.0/underscore-min.js"></script>
<script src="js/d3-tip.min.js"></script-->
<script type="text/javascript" src="js/bower.js"></script>
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@TI_EU" />
<meta name="twitter:creator" content="@eucampaign" />
<meta property="og:url" content="http://www.integritywatch.eu" />
<meta property="og:title" content="EU Integrity Watch: monitor potential conflicts of interests" />
<meta property="og:description" content="Interactive database that provides a unique overview of the activities and outside income for the members of the European Parliament" />
<meta property="og:image" content="http://www.integritywatch.eu/img/thumbnail.jpg" />
<meta property="fb:app_id" content="1611680135716224" />
<style>
.incomearea .big_number {
display: inline-block !important;
}
.legend div {
width: 50%;
margin-left: 0;
}
.legend {
margin-left: 0;
}
#filter_wrap {
min-height: 90px;
}
#filter_wrap .medium_number {
color: #fff;
display: block;
font-family: "Helvetica W02 Bd Cn","Neue Helvetica 57 Condensed","HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-size: 1.3em;
font-weight: normal;
margin-bottom: 10px;
margin-top: 0px;
}
.incomearea {
padding-top: 10px;
}
#filter_numbers p {
margin-top: -5px;
}
.popup-value-td {
min-width: 100px;
}
.actcategory svg {
overflow: visible;
}
.legend {
padding-left: 30px;
}
.legend div::before {
border-radius: 0;
height: 13px;
width: 13px;
margin-top: 5px;
}
.legend div {
font-size: 10px;
margin-bottom: 0;
height: 18px;
}
.feedback-btn {
//position: absolute;
//bottom: 20px;
//right: 20px;
position: relative;
top: 30px;
left: 30px;
}
.feedback-btn a {
display: inline-block;
background: #de3e3e;
border-radius: 3px;
color: #fff !important;
padding: 7px 30px;
text-align: center;
width: auto;
text-decoration: none;
}
.feedback-btn a:hover {
background: #ce2e2e;
}
.navbar-collapse ul.navbar-right li a {
padding: 0 10px !important;
}
.navbar-collapse ul.navbar-right li a {
line-height: 80px !important;
}
.dc-table-label {
padding: 5px 10px;
}
.political-legend {
padding-left: 25%;
}
#mepphoto {
//max-width: 100%;
max-width: 160px;
}
#filter_wrap, .nav li#mi_tool_btn.active a {
background: #045b5c !important;
}
#about_wrap.mi_header {
background: #045b5c url("./img/bg_chair.png") repeat-y scroll 0% top / 90% auto !important;
}
#about_wrap.mi_header #about_container {
background: rgba(0, 0, 0, 0) url("img/icon_chair.png") no-repeat scroll left center / 25% auto;
}
.ecep-logo-btn img {
width: 180px;
cursor: pointer;
margin: 0 30px;
}
.institutions-container {
position: relative;
}
.institutions-container .filterbyinstitutions {
position: absolute;
top: 130px;
left: 0;
font-size: 1.5em;
font-family: "Helvetica W02 Bd Cn"
}
.cat_0::before {
background: #045b5c;
}
.cat_1::before {
background: #348b8c;
}
.cat_2::before {
background: #64bbbc;
}
.cat_3::before {
background: #eee;
}
.cat_4::before {
background: #ccc;
}
.cat_5::before {
background: #aaa;
}
.actcat_legend {
padding-left: 25%;
}
.registerfilter-box {
position: absolute;
top: 65px;
}
.registerfilter-box button {
border-radius: 3px;
color: #fff !important;
display: inline-block;
padding: 3px 15px;
text-align: center;
text-decoration: none;
width: auto;
border: none;
background: #ccc;
}
.registerfilter-box button:first-child {
margin-left: 10px;
}
.registerfilter-box button:hover, .registerfilter-box button.active {
background: #045b5c;
}
.lobbyreg_btn {
font-family: "Helvetica W02 Bd Cn","HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
font-weight: normal;
font-size: 1.3em;
color: #116061;
text-align:center;
position: relative;
top: -25px;
left: 20px;
}
.lobbyreg_img {
width: 140px;
opacity: 0.6;
}
#registry_yes_btn {
text-align: center;
}
#registry_yes_btn.active .lobbyreg_img {
opacity: 1;
}
.subcat svg, .group svg {
overflow: visible !important;
}
</style>
</head>
<body>
<div id="loader-container">
<div id="loader"></div>
</div>
<script>
$( document ).ready(function() {
$('#collapse_about a').click(function(ev) {
ev.preventDefault();
$('#collapse_about a').toggleClass('opened');
$('#collapse_about a').toggleClass('closed');
$('#about_wrap').slideToggle('slow', function () {
$('#about_wrap_top').slideToggle('fast')
})
})
$('.info').click(function(ev) {
ev.preventDefault();
if($(this).hasClass('opened')){
$(this).removeClass('opened');
$(this).parents('.info_chart').find('p.desc').slideUp('fast')
}else{
closeAllInfos();
$(this).addClass('opened');
$(this).parents('.info_chart').find('p.desc').slideDown('fast')
}
});
function closeAllInfos() {
$('.info').removeClass('opened');
$('p.desc').slideUp('fast');
}
function addcommas(x){
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
});
$.tablesorter.addParser({
// use a unique id
id: 'amount',
is: function(s, table, cell) {
return false;
},
format: function(s, table, cell, cellIndex) {
var v = s.split(' ')[0];
if (v === "") return -1;
return v;
},
// flag for filter widget (true = ALWAYS search parsed values; false = search cell text)
parsed: false,
// set the type to either numeric or text (text uses a natural sort function
// so it will work for everything, but numeric is faster for numbers
type: 'numeric'
});
var detailtpl = sidetpl = null ;
var wall = null;
var eu_groups = {
"GUE/NGL":"#800c00",
"S&D":"#c21200",
"Greens/EFA":"#05a61e",
"ALDE":"#ffc200",
"EFDD":"#5eced6",
"PPE":"#0a3e63",
"EPP":"#0a3e63",
"ECR":"#3086c2",
"NA/NI":"#cccccc",
"ENF":"#A1480D",
"Array":"pink"
};
var catscolor = {
"Public service":"#eee",
"NGO":"#64bbbc",
"Other":"#aaa",
"Private sector":"#045b5c",
"Academia":"#ccc",
"Unknown":"#348b8c"
}
//GRAPHS AND TABLE
function grid(selector,data) {
var ndx = crossfilter(data),
all = ndx.groupAll();
var color = d3.scale.linear()
.clamp(true)
.domain([0,1, 70])
.range(["white","#ffc7b6", "#f85631"])
.interpolate(d3.interpolateHcl);
//PARTY GROUP DIMENSION
var pie_group = dc.pieChart(selector + " .group").innerRadius(50).radius(100);
var group = ndx.dimension(function(d) {
if (typeof d.Political_group == "undefined") return "";
return d.Political_group;
});
var groupGroup = group.group().reduceSum(function(d) {
if(d.total_activities == 0){
return 1;
}
return d.total_activities;
});
var groupGroupJTR = group.group().reduceSum(function(d) {
return d.jtract_count;
});
//CATEGORY DIMENSION
var pie_actcategory = dc.pieChart(selector + " .actcategory").innerRadius(50).radius(100);
var actcategory = ndx.dimension(function(d) {
if (typeof d.Category_activity == "undefined") return "";
return d.Category_activity;
});
var actcategoryGroup = actcategory.group().reduceSum(function(d) {
if(d.total_activities == 0){
return 1;
}
return d.total_activities;
});
var actcategoryGroupJTR = actcategory.group().reduceSum(function(d) {
return d.jtract_count;
});
//SUBCATEGORY DIMENSION
var bar_subcat = dc.barChart(selector + " .subcat");
var asubcategory = ndx.dimension(function(d) {
return d.category_bar;
});
var asubcategoryGroupJTR = asubcategory.group().reduceSum(function(d) {
return d.jtract_count;
});
var asubcategoryGroup = asubcategory.group().reduceSum(function(d) {
if(d.total_activities == 0){
return 1;
}
return d.total_activities;
});
//COUNTRY DIMENSION
var bar_country = dc.barChart(selector + " .country");
var country = ndx.dimension(function(d) {
if (typeof d.Country == "undefined") return "";
return d.Country;
});
var countryGroup = country.group().reduceSum(function(d) {
if(d.total_activities == 0){
return 1;
}
return d.total_activities;
});
var countryGroupJTR = country.group().reduceSum(function(d) {
return d.jtract_count;
});
//COUNT TOTALS
var countOfficials = function() {
var thesepeople = [];
var officialscount = 0;
var thisdataset = actcategory.top(Infinity);
//Count people
_.each (thisdataset, function (m) {
if(m.Category_activity != 'Unknown'){
if(jtrfilter == true){
officialscount += parseInt(m.jtract_count);
} else {
officialscount += parseInt(m.total_activities);
}
}
});
$('.filter-pcount').html(officialscount);
}
//CATEGORY PIE
pie_actcategory
.dimension(actcategory)
.externalLabels(35)
.height(250)
.group(actcategoryGroup)
.label(function(d){return d.key})
.minAngleForLabel(0)
.colorCalculator(function(d, i) {
return catscolor[d.key];
})
.on("filtered", function (chart) {
countOfficials();
})
.renderlet(function (chart) {
});
pie_actcategory.cap(7);
function rangeorder(d){
switch(d.key) {
case 'Private sector':
return 0;
break;
case 'Unknown':
return 1;
break;
case 'NGO':
return 2;
break;
case 'Other':
return 3;
break;
case 'Academia':
return 4;
break;
case 'Public service':
return 5;
break;
default:
return 6;
}
}
pie_actcategory.ordering(function(d) { return rangeorder(d); });
//PARTY PIE
pie_group
.dimension(group)
.externalLabels(35)
.height(250)
.minAngleForLabel(0)
.colorCalculator(function(d, i) {
return eu_groups[d.key];
})
.group(groupGroup)
.on("filtered", function (chart) {
countOfficials();
})
.renderlet(function (chart) {
});
function adjustBarChartLabels(chart) {
chart.svg().selectAll('.axis.x text')
.on("click",function(d) {
chart.filter(d);
map.filter(d);
dc.redrawAll();}
)
.style("text-anchor", "end" )
.attr("transform", function(d) { return "rotate(-45, -4, 9) "; });
}
//COUNTRY BARCHART
bar_country
.height(320)
.outerPadding(0)
.gap(1)
.margins({top: 0, right: 30, bottom: 95, left: 30})
.colorCalculator(function(d, i) {
return "#045b5c";
})
.valueAccessor (
function(d) {
return d.value;
})
.on("postRender", function( chart ){
adjustBarChartLabels(chart);
})
.x(d3.scale.ordinal())
.xUnits(dc.units.ordinal)
.brushOn(false)
.elasticY(true)
.yAxisLabel("#Activities")
.on("filtered", function (chart) {
countOfficials();
})
.dimension(country)
.group(countryGroup);
function rotateBarChartLabels() {
d3.selectAll(selector+ ' .country .axis.x text')
.style("text-anchor", "end" )
.attr("transform", function(d) { return "rotate(-90, -4, 9) "; });
}
//SUBCATEGORY BARCHART
bar_subcat
.height(320)
.outerPadding(0)
.gap(1)
.margins({top: 0, right: 30, bottom: 95, left: 30})
.colorCalculator(function(d, i) {
return "#045b5c";
})
.on("postRender", function( chart ){
adjustBarChartLabels(chart);
})
.on("filtered", function (chart) {
countOfficials();
})
.x(d3.scale.ordinal())
.xUnits(dc.units.ordinal)
.brushOn(false)
.elasticY(true)
.yAxisLabel("#Activities")
.dimension(asubcategory)
.group(asubcategoryGroup);
function rotateBarChartLabels2() {
d3.selectAll(selector+ ' .subcat .axis.x text')
.style("text-anchor", "end" )
.attr("transform", function(d) { return "rotate(-90, -4, 9) "; });
}
dc.dataCount(".dc-data-count")
.dimension(ndx)
.group(all);
dc.dataCount(".dc-data-count2")
.dimension(ndx)
.group(all);
var i=0;
//NAME STRING
var name = ndx.dimension(function(d) {
if(d.on_JTR.trim() == "Yes" || d.on_JTR.trim() == "yes"){
return d.Name.toLowerCase() + " " + d.New_position.toLowerCase() + " " + d.Country + " " + d.Institution.replace(" ", "") + " on_JTR " + " " + d.fullsearch.toLowerCase();
} else {
return d.Name.toLowerCase() + " " + d.New_position.toLowerCase() + " " + d.Country + " " + d.Institution.replace(" ", "") + " " + d.fullsearch.toLowerCase();
}
});
var name2 = ndx.dimension(function(d) {
return d.Name.toLowerCase() + " " + d.New_position.toLowerCase() + " " + d.Country;
});
var namegroup = name2.group().reduceSum(function(d) {
return 1;
});
var pseudoDimension = {
top: function (x) {
return namegroup.top(x)
.map(function (grp) {return grp.key});
}
};
groupedDimension = name2.group().reduce(
function (p, v) {
return p;
},
function (p, v) {
return p;
},
function () {
return {number: 0, total: 0, avg: 0}
});
function reversible_group(group) {
return {
top: function(N) {
return group.top(N);
},
bottom: function(N) {
return group.top(Infinity).slice(-N).reverse();
}
};
}
//WALL TABLE
var i = 0;
wall=dc.dataTable(".dc-data-grid")
.dimension(name)
.group(function(d){return "";})
.on("filtered", function (chart) {
countOfficials();
})
.columns([
function(d) { return "<span class='mep' data-epid='"+d.ID+"' data-pname='"+d.Name+"'>"+d.Name +"</b></span>"; },
function(d) {
if(d.Country == "United Kingdom"){
return "UK";
}
return d.Country;
},
function(d) {
return d.Political_group;
},
function(d) { return "<div class='left-align'>"+d.Previous_position +"</div>"; },
function(d) { return "<div class='right-align'>"+d.New_position+"</div>"; },
function(d) { return "<div class='right-align'>"+d.Category_activity+"</div>"; },
function(d) { return "<div class='right-align'>"+d.total_activities +"</div>"; }
])
.size(1000)
.sortBy(function (d) {return parseInt(d.total_activities) })
.renderlet(function (chart) {
i = 0;
$(".dc-table-group").remove();
$("td:first-child").each (function(i) {
//$(this).closest ("td").css("backgroundColor", $(this).css('backgroundColor'));
});
$("td span.score").each (function(i) {
//$(this).closest ("td").css("backgroundColor", $(this).css('backgroundColor'));
});
$("table.dc-data-grid").trigger("update");
});
$.fn.dataTableExt.sErrMode = 'console';
//GRID CLICK
$(".dc-data-grid").on("click",".dc-table-row", function () {
var pname = $(this).find(".mep").data("pname");
var pdata = _.find(tool_people,function (d) { return d.Name == pname });
$("#mepdialog #mepphoto").attr("src","");
if(pdata.ID && pdata.ID.length > 0){
$("#mepdialog #mepphoto").attr("src","http://www.europarl.europa.eu/mepphoto/"+pdata.ID+".jpg");
}
if(pdata.Institution == "European Commission"){
var thisphoto = _.find(tool_photos,function (d) { return d.Name == pname });
if(thisphoto){
$("#mepdialog #mepphoto").attr("src",thisphoto.Link_image);
}
}
$("#mepdialog .modal-title").html (pdata.Name);
$("#mepdialog .details").html(detailtpl(pdata));
$("#mepdialog .detailstable").html(sidetpl(pdata));
$("#mepdialog").modal();
});
dc.renderAll();
hashFilter();
$("table.dc-data-grid").tablesorter(
{theme:"bootstrap",headers: { 7: { sorter: 'amount' } }}
).bind("sortEnd",function(e, table) {
ga && ga('send', 'event', 'sort','table');
var i=0;
});
//JTR FILTER CLICK
$("#registry_yes_btn").click(function() {
if($(this).hasClass('active')){
$(".resetall").click();
return;
}
jtrfilter = true;
pie_actcategory.group(actcategoryGroupJTR);
pie_group.group(groupGroupJTR);
bar_country.group(countryGroupJTR);
bar_subcat.group(asubcategoryGroupJTR);
if(parliamentfilter == true){
wall.dimension().filter(function (d) {
return (d.indexOf("on_JTR") !== -1 && (d.indexOf("EuropeanParliament") !== -1 || d.indexOf("Europeanparliament") !== -1));
});
} else if(commissionfilter == true){
wall.dimension().filter(function (d) {
return (d.indexOf("EuropeanCommission") !== -1 && d.indexOf("on_JTR") !== -1);
});
} else {
wall.dimension().filter(function (d) {
return d.indexOf("on_JTR") !== -1 ;
});
}
$("#registry_yes_btn").addClass("active");
$("#registry_no_btn").removeClass("active");
countOfficials();
dc.redrawAll();
});
$(".resetall").click(function() {
$("#search-input").val("");
jtrfilter = false;
pie_actcategory.group(actcategoryGroup);
pie_group.group(groupGroup);
bar_country.group(countryGroup);
bar_subcat.group(asubcategoryGroup);
parliamentfilter = false;
commissionfilter = false;
wall.filter(null);
dc.filterAll();
dc.filterAll(null);
dc.renderAll();
$("#commission_btn").attr("src", "img/EC1.png");
$("#parliament_btn").attr("src", "img/EP1.png");
$("#registry_yes_btn").removeClass("active");
$("#registry_no_btn").removeClass("active");
});
}
//END GRAPHS AND TABLE
function hashFilter () {
var hash = window.location.hash;
if(hash.indexOf('#mep') === 0) {
MEPpopup(hash.substring(4));
ga && ga('send', 'event', 'urlMEP',hash.substring(4));
}
}
</script>
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="navbar-brand" id="ti_logo_container">
<a id="ti_logo" href="http://transparency.eu">Transparency International</a>
<a id="page_title" href="/" target="_blank"><strong>EU</strong> Integrity<br />Watch</a>
</div>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li id="cm_tool_btn"><a href="ec.html" style="width: 120px;"><strong>Commission</strong> <br />meetings</a></li>
<li id="bl_tool_btn"><a href="lobbyist.html" style="width: 120px;"><strong>EU</strong><br />Lobbyists</a></li>
<li id="mi_tool_btn"><a href="ep.html" style="width: 120px;"><strong>MEP</strong> <br />incomes</a></li>
<li class="active" id="mi_tool_btn"><a href="revolvingdoor.html" style="width: 120px;">Revolving<br />Doors</a></li>
<li class="dropdown">
<a aria-expanded="false" aria-haspopup="true" role="button" data-toggle="dropdown" class="dropdown-toggle" href="#" style="width: 160px;">National versions<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="http://www.integritywatch.fr">France</a></li>
<li><a href="http://integritywatch.cl/">Chile</a></li>
<li><a href="https://openaccess.transparency.org.uk/">United Kingdom</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div>
</div><!-- container -->
</nav>
<div class="container_wrap mi_header" id="about_wrap_top"> </div>
<div class="container_wrap mi_header" id="about_wrap" style="position: relative;">
<div class="container">
<div id="about_container" class="row">
<div class="col-md-3 col-lg-3" id="about_content_icon">
</div>
<div class="col-md-6 col-lg-6" id="about_content">
<p>
This is a user-friendly interactive database that provides an overview of post-mandate activities of former Commissioners and Members of the European Parliament. By simply clicking on the graphs or the list below users can rank, sort and filter former Commissioners and MEPs. The database thus allows users to monitor potential revolving door cases and conflicts of interest.
<br/>
<a href="about.html" class="more">Read more</a>
</p>
</div>
<div class="col-md-3" id="about_social">
<br/>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="TI_EU" data-text="Want to know #MEPs income & activities outside @Europarl_EN? Find out">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<br/>
<br/>
<div class="fb-like" data-show-faces="false" data-href="http://www.integritywatch.eu/" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
</div>
</div>
</div>
</div>
<div class="container_wrap" id="toggle_about_wrap">
<div class="container">
<div class="row">
<div class="col-xs-2 col-md-1 col-centered mi_collapse" id="collapse_about">
<a class="opened" href="#">collapse</a>
</div>
</div>
</div>
</div>
<div class="container_wrap filter_mi" id="filter_wrap">
<div class="container">
<div class="row">
<div class="col-xs-9 col-sm-9 col-md-4" id="filter_field_container">
<p>Search or Filter:</p>
<div class="input-group">
<input type="text" id="search-input" class="form-control input-lg" placeholder="Name, new position, country...">
</div>
</div>
<div class="col-sm-7 col-md-7" id="filter_numbers">
<div class="row">
<div class="col-md-2" id="currently_selected_text"><p>You have currently selected</p></div>
<div class="col-md-2 filter_number">
<div id="mep_number" class="dc-data-count">
<span class="big_number filter-count"></span>out of <strong class="total-count"></strong> Officials
</div>
</div>
<div class="col-md-2 filter_number">
<div id="mep_number2" class="dc-data-count">
<span class="big_number filter-pcount"></span>out of <strong class="total-pcount"></strong> Activities
</div>
</div>
<div class="col-md-4 filter_number">
<div class="feedback-btn">
<a href="https://goo.gl/forms/OXYhE5lpOnve1Btw2" target="_blank">Spotted a mistake?</a>
</div>
</div>
</div>
</div>
<div class="col-xs-3 col-sm-3 col-md-1" id="resetall_container">
<button class="btn resetall">RESET<br />FILTERS</button>
</div>
</div>
</div>
</div>
<div id="ep2014list">
<div class="container_wrap" id="main_charts_wrap">
<div class="container">
<h2>Filter by</h2>
<div class="row" style="padding: 0 15px;">
<div class="col-sm-8">
<div class="row chart_box institutions-container" style="margin-bottom: 30px;padding-right: 30px;">
<h3 style="margin-bottom:20px;">EU INSTITUTIONS <!--span class="info">info</span--></h3>
<div class="filterbyinstitutions">FILTER BY</div>
<div class="col-sm-3"></div>
<div class="col-sm-5" style="text-align:right;">
<div class="ecep-logo-btn"><img id="commission_btn" src="img/EC1.png" /></div>
</div>
<div class="col-sm-4">
<div class="ecep-logo-btn"><img id="parliament_btn" src="img/EP1.png" /></div>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="row chart_box institutions-container" style="margin-bottom: 30px;">
<h3 style="margin-bottom:20px;">NEW EMPLOYER ON</h3>
<div class="ecep-logo-btn" id="registry_yes_btn"><img class="lobbyreg_img" src="img/icon_hands.png" /><br /><div class="lobbyreg_btn">EU Lobby Register</dib></div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 chart_box" id="group_container" style="margin-bottom: 0px;">
<h3>Political Groups <!--span class="info">info</span--></h3>
<div class="group" style="margin-top: 30px;">
</div>
<br class="clear" />
</div>
<div class="col-md-6 chart_box">
<h3>Country <!--span class="info">info</span--></h3>
<div class="country chart-full"></div>
<br class="clear" />
</div>
</div>
<div class="row" style="margin-bottom: -20px;margin-top: -20px;">
<div class="col-md-6 chart_box">
<h3>Category of activities</h3>
<div class="actcategory activities range" style="margin-top: 20px; margin-bottom: 30px;">
</div>
<br class="clear" />
</div>
<div class="col-sm-6 chart_box">
<h3>Subcategory of activities <!--span class="info">info</span--></h3>
<div class="subcat chart-full"></div>
<br class="clear" />
</div>
</div>
</div>
</div>
<div class="container_wrap" id="list_container">
<div class="container">
<div class="row">
<div class="content" id="list_content">
<h2 class="table_title">POST-MANDATE ACTIVITIES</h2><div id="last_update">Last updated: <span id="updatedate"></span></div>
<div id="info_table_container" class="hidden">
<div class="info_chart info_table" id="attendance_info">
<span class="info">info</span>
<p class="desc">Post-mandate activities</p>
</div>
<div class="info_chart info_table" id="EAI_info">
<span class="info">info</span>
<p class="desc">The External Activity Indicator was developed by Transparency International EU to provide a quick overview of all outside activities of members of the European Parliament. In short, the higher the indicator the higher the outside income and number of outside activities of a member. A higher EAI is reflected in a darker shading of orange. <br /><a href="about.html">More details</a></p>
</div>
<div class="info_chart info_table" id="OI_info">
<span class="info">info</span>
<p class="desc">Total monthly income declared by the member in the Declaration of Financial Interests</p>
</div>
</div>
</div>
<div class="col-md-12 table-responsive">
<table class="table table-hover dc-data-grid tablesorter-bootstrap">
<thead>
<tr class=header>
<!-- <th class="header headerSortDown">Nr</th> -->
<th class="header" style="width:15%;">Name</th>
<th class="header" style="width:10%;">Country</th>
<th class="header" style="width:10%;">Group</th>
<th class="header" style="width:20%;">Previous Position</th>
<th class="header" style="width:25%;">New Position</th>
<th class="header" style="width:15%;">Category of Activity</th>
<th class="header" style="width:5%;">Activities Count</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<script>
//GLOBAL VARIABLES
var tool_people = [];
var tool_activities = [];
var tool_ids = [];
var tool_fullact = [];
var tool_fullact_pre = [];
var tool_photos = [];
var jtrfilter = false;
var parliamentfilter = false;
var commissionfilter = false;
var allLoaded = false;
//HTML TEMPLATES
$(function() {
detailtpl = _.template($("#detailstpl2").html());
sidetpl = _.template($("#sidetpl").html());
});
//RENDER
var renderLoaded = _.after(3, function () {
var dateFormat = d3.time.format("%Y-%m-%d");
var now = Date.now();
var a;
//Loop and fix
try {
grid("#ep2014list",tool_people);
} catch (e) {
console.log (e);
}
});
//END RENDER
//CAPITALIZE
String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.slice(1);
}
//HANDLE INITIAL DATA
var fixdataset = function(){
var peoplenum = 0;
var countedpeople = [];
var cats = [];
_.each (tool_people, function (m) {
//Activities count for graphs.
m.currentActivitiesCount = m.total_activities;