Skip to content

Commit a0d55ac

Browse files
committed
Update vote power
1 parent 2e66de4 commit a0d55ac

29 files changed

+457
-116
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"standard.enable": false
3+
}

2016js.csv

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Districts;RegisteredVoter/District;Voter Percentage;Index
2+
Akkar;276938;0.076273495;0.716992189
3+
Minieh-Dinnieh;110104;0.030324538;0.772888942
4+
Tripoli;232940;0.064155688;0.974192657
5+
Zghorta;77352;0.021304073;1.100141742
6+
Bcharre;49084;0.013518579;1.15581675
7+
Koura;60169;0.016571579;1.414319069
8+
Batroun;60039;0.016535775;0.944920958
9+
Jbeil;81494;0.022444851;1.044226128
10+
Keserwan;93540;0.025762527;1.516252656
11+
Metn;178265;0.049097251;1.27298369
12+
Baabda;164222;0.045229567;1.036379584
13+
Aley;125799;0.034647211;1.127435619
14+
Chouf;199565;0.054963638;1.137115414
15+
Beirut-One;92604;0.025504736;1.531578263
16+
Beirut-Two;108574;0.02990315;1.045040422
17+
Beirut-Three;279905;0.077090658;1.01341722
18+
Baalbeck-Hermel;257693;0.07097309;1.100769314
19+
Zahleh;172555;0.047524619;1.150719381
20+
WestBekaa-Rachaya;140853;0.038793342;1.208325901
21+
Saida;61606;0.016967353;0.920886105
22+
Zahrany;111080;0.030593345;0.766097984
23+
Jezzine;59162;0.016294234;1.43839228
24+
Marjaayoun-Hasbaya;159757;0.043999829;0.887787536
25+
Nabatieh;144587;0.03982175;0.588560272
26+
Tyre-Sour;186618;0.051397811;0.608002544
27+
BintJbeil;146350;0.040307311;0.581470202

2017js.csv

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
RegisteredVoter/District;Voter Percentage;Index
2+
276938;0,076273495;0,716992189
3+
110104;0,030324538;0,772888942
4+
232940;0,064155688;0,974192657
5+
77352;0,021304073;1,100141742
6+
49084;0,013518579;1,15581675
7+
60169;0,016571579;1,414319069
8+
60039;0,016535775;0,944920958
9+
81494;0,022444851;1,044226128
10+
93540;0,025762527;1,516252656
11+
178265;0,049097251;1,27298369
12+
164222;0,045229567;1,036379584
13+
125799;0,034647211;1,127435619
14+
199565;0,054963638;1,137115414
15+
92604;0,025504736;1,531578263
16+
108574;0,02990315;1,045040422
17+
279905;0,077090658;1,01341722
18+
257693;0,07097309;1,100769314
19+
172555;0,047524619;1,150719381
20+
140853;0,038793342;1,208325901
21+
61606;0,016967353;0,920886105
22+
111080;0,030593345;0,766097984
23+
59162;0,016294234;1,43839228
24+
159757;0,043999829;0,887787536
25+
144587;0,03982175;0,588560272
26+
186618;0,051397811;0,608002544
27+
146350;0,040307311;0,581470202

app/data/vote_power/vote_power.js

Lines changed: 1 addition & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/scripts/vote_power.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ options.setTooltip = function( that ){
6363
var gridLayer = L.mapbox.gridLayer('kamicut.vote_power');
6464
that.map.addLayer(gridLayer);
6565
var template = $( '#tooltip-template' ).html();
66-
66+
6767
gridLayer.on('mousemove',function(o) {
6868
if (o.data!== undefined){
6969
var color;
@@ -99,16 +99,14 @@ content.layers[0] = currentLayer;
9999
function changeYear(new_year) {
100100
year = new_year;
101101
voterPower.map.removeLayer(currentLayer);
102-
if (year == '2015')
102+
if (parseInt(year) > 2014 ) // same distribution for 2015 2016 and 2017 so keep one map
103103
currentLayer = L.mapbox.tileLayer('tunisia.vp');
104-
105104
else
106-
107105
currentLayer = L.mapbox.tileLayer('kamicut.vote_power_' + year);
108106
voterPower.map.addLayer(currentLayer);
109107
return currentLayer;
110108
}
111109
$('document').ready(function(){
112110
voterPower.init();
113111
$("#"+year+".select").click();
114-
});
112+
});

app/vote_power.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<title></title>
1010
<meta name="description" content="">
1111
<meta name="viewport" content="width=device-width">
12-
12+
1313
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.0/css/font-awesome.css" rel="stylesheet">
1414
<link rel="stylesheet" href="styles/main.css">
1515
<link rel="stylesheet" href="styles/vote_power.css">
@@ -19,13 +19,13 @@
1919

2020
</head>
2121
<body>
22-
22+
2323
<ul id='toolbar'>
2424
<li class='langbtn' id="home-btn">HOME</li>
2525
<li class="langbtn" id="about-btn">ABOUT</li>
2626
<a href="https://github.com/ladeleb/platform/releases/latest" target="_blank"><li class='langbtn' id='download-data'>DOWNLOAD DATA</li></a>
2727
<!-- <li class='langbtn'>ABOUT THIS DATA</li> -->
28-
28+
2929
<li class='langbtn' id='share-data'>SHARE
3030
<ul id='toolbar-share'>
3131
<a class='tweet' href="http://ladeleb.github.io/platform/vote_power.html" title="Voter representation in #Lebanese Parliament - Visualization by @ladeleb">
@@ -46,7 +46,7 @@
4646
<div id='tooltip-overlay'></div>
4747
</div>
4848

49-
49+
5050
<!--[if lt IE 7]>
5151
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
5252
<![endif]-->
@@ -73,6 +73,8 @@ <h4><%= select_year %> </h4>
7373
<li class="select" id="2013">2013</li>
7474
<li class="select" id="2014">2014</li>
7575
<li class="select" id="2015">2015</li>
76+
<li class="select" id="2016">2016</li>
77+
<li class="select" id="2017">2017</li>
7678
</ul>
7779
</div>
7880

@@ -82,7 +84,7 @@ <h4><%= select_year %> </h4>
8284
<div><b>Under</b> represented</div>
8385

8486
</div>
85-
87+
8688
</script>
8789

8890

@@ -94,22 +96,22 @@ <h4><%= select_year %> </h4>
9496
<div class='perc' style='color: <%=color%>'> <%= (Number(seats_perc)*100).toFixed(2)%>% </div>
9597
<div class='total'> <%=seats_total%>/128 </div>
9698
</div>
97-
<div id='voters' style="width: 150px;">
99+
<div id='voters' style="width: 150px;">
98100
<div class='llabel' > VOTERS - مسجلين</div>
99101
<div class='perc' style='color: <%=color%>'> <%= (Number(voters_perc)*100).toFixed(2)%>% </div>
100102
<div class='total'> <%=voters_total%>/<%=voters%> </div>
101103
</div>
102104
</div>
103105
</script>
104106

105-
107+
106108
<link rel="stylesheet" href="bower_components/Leaflet.markercluster/dist/MarkerCluster.css" />
107109
<link rel="stylesheet" href="bower_components/Leaflet.markercluster/dist/MarkerCluster.Default.css" />
108110
<!--[if lte IE 8]>
109111
<![endif]-->
110112
<script src="bower_components/Leaflet.markercluster/dist/leaflet.markercluster.js"></script>
111113
<script src="bower_components/jquery/jquery.js"></script>
112-
<script src='bower_components/underscore/underscore-min.js'></script>
114+
<script src='bower_components/underscore/underscore-min.js'></script>
113115
<script src="scripts/text_content.js"></script>
114116
<script src="scripts/map.js"></script>
115117
<script src="data/vote_power/vote_power.js"></script>

data/vote_power/2016_vote_power.csv

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Districts;RegisteredVoter/District;gov_id;Sunni;Shiite;Druze;Alawite;Maronite;Greek Orthodox;Greek Catholic;Armenian Orthodox;Armenian Catholic;Evangelical;Minorities;Total;Voter Percentage;Seat Percentage;Index
2+
Akkar;269910;17;3;;;1;1;2;;;;;;7;0,075505573;0,0546875;0,724284281
3+
Minieh-Dinnieh;115663;21;3;;;;;;;;;;;3;0,032355975;0,0234375;0,724363898
4+
Tripoli;220188;22;5;;;1;1;1;;;;;;8;0,061596166;0,0625;1,01467354
5+
Zghorta;76485;23;;;;;3;;;;;;;3;0,021396183;0,0234375;1,095405656
6+
Bcharre;48800;19;;;;;2;;;;;;;2;0,013651484;0,015625;1,144564229
7+
Koura;59597;20;;;;;;3;;;;;;3;0,016671875;0,0234375;1,405810721
8+
Batroun;59362;18;;;;;2;;;;;;;2;0,016606135;0,015625;0,940917327
9+
Jbeil;80634;14;;1;;;2;;;;;;;3;0,022556839;0,0234375;1,039041863
10+
Keserwan;92865;15;;;;;5;;;;;;;5;0,025978382;0,0390625;1,503654078
11+
Metn;177147;16;;;;;4;2;1;1;;;;8;0,049555725;0,0625;1,261206442
12+
Baabda;162585;12;;2;1;;3;;;;;;;6;0,0454821;0,046875;1,030625231
13+
Aley;124644;11;;;2;;2;1;;;;;;5;0,034868351;0,0390625;1,12028526
14+
Chouf;196892;13;2;;2;;3;;1;;;;;8;0,055079261;0,0625;1,134728366
15+
Beirut-One;92423;51;;;;;1;1;1;1;1;;;5;0,025854735;0,0390625;1,510845092
16+
Beirut-Two;107569;52;1;1;;;;;;2;;;;4;0,030091731;0,03125;1,038491282
17+
Beirut-Three;276029;53;5;1;1;;;1;;;;1;1;10;0,077217324;0,078125;1,011754822
18+
Baalbeck-Hermel;252919;6;2;6;;;1;;1;;;;;10;0,070752451;0,078125;1,104202025
19+
Zahleh;170352;10;1;1;;;1;1;2;1;;;;7;0,047654868;0,0546875;1,14757426
20+
WestBekaa-Rachaya;138365;7;2;1;1;;1;1;;;;;;6;0,038706712;0,046875;1,211030269
21+
Saida;60610;251;2;;;;;;;;;;;2;0,016955255;0,015625;0,921543217
22+
Zahrany;108995;252;;2;;;;;1;;;;;3;0,030490645;0,0234375;0,768678394
23+
Jezzine;58349;24;;;;;2;;1;;;;;3;0,016322755;0,0234375;1,435878962
24+
Marjaayoun-Hasbaya;156789;2;1;2;1;;;1;;;;;;5;0,043860707;0,0390625;0,890603524
25+
Nabatieh;141736;4;;3;;;;;;;;;;3;0,039649728;0,0234375;0,591113772
26+
Tyre-Sour;182702;26;;4;;;;;;;;;;4;0,051109701;0,03125;0,611429917
27+
BintJbeil;143093;1;;3;;;;;;;;;;3;0,04002934;0,0234375;0,585508037

data/vote_power/2016_vote_power.csvt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"String","Real","Real","Real","Real","Real","Real","Real","Real","Real","Real","Real","Real","Real","Real","Real","Real","Real"

data/vote_power/2017_vote_power.csv

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Districts;RegisteredVoter/District;gov_id;Sunni;Shiite;Druze;Alawite;Maronite;Greek Orthodox;Greek Catholic;Armenian Orthodox;Armenian Catholic;Evangelical;Minorities;Total;Voter Percentage;Seat Percentage;Index
2+
Akkar;276938;17;3;;;1;1;2;;;;;;7;0,076273495;0,0546875;0,716992189
3+
Minieh-Dinnieh;110104;21;3;;;;;;;;;;;3;0,030324538;0,0234375;0,772888942
4+
Tripoli;232940;22;5;;;1;1;1;;;;;;8;0,064155688;0,0625;0,974192657
5+
Zghorta;77352;23;;;;;3;;;;;;;3;0,021304073;0,0234375;1,100141742
6+
Bcharre;49084;19;;;;;2;;;;;;;2;0,013518579;0,015625;1,15581675
7+
Koura;60169;20;;;;;;3;;;;;;3;0,016571579;0,0234375;1,414319069
8+
Batroun;60039;18;;;;;2;;;;;;;2;0,016535775;0,015625;0,944920958
9+
Jbeil;81494;14;;1;;;2;;;;;;;3;0,022444851;0,0234375;1,044226128
10+
Keserwan;93540;15;;;;;5;;;;;;;5;0,025762527;0,0390625;1,516252656
11+
Metn;178265;16;;;;;4;2;1;1;;;;8;0,049097251;0,0625;1,27298369
12+
Baabda;164222;12;;2;1;;3;;;;;;;6;0,045229567;0,046875;1,036379584
13+
Aley;125799;11;;;2;;2;1;;;;;;5;0,034647211;0,0390625;1,127435619
14+
Chouf;199565;13;2;;2;;3;;1;;;;;8;0,054963638;0,0625;1,137115414
15+
Beirut-One;92604;51;;;;;1;1;1;1;1;;;5;0,025504736;0,0390625;1,531578263
16+
Beirut-Two;108574;52;1;1;;;;;;2;;;;4;0,02990315;0,03125;1,045040422
17+
Beirut-Three;279905;53;5;1;1;;;1;;;;1;1;10;0,077090658;0,078125;1,01341722
18+
Baalbeck-Hermel;257693;6;2;6;;;1;;1;;;;;10;0,07097309;0,078125;1,100769314
19+
Zahleh;172555;10;1;1;;;1;1;2;1;;;;7;0,047524619;0,0546875;1,150719381
20+
WestBekaa-Rachaya;140853;7;2;1;1;;1;1;;;;;;6;0,038793342;0,046875;1,208325901
21+
Saida;61606;251;2;;;;;;;;;;;2;0,016967353;0,015625;0,920886105
22+
Zahrany;111080;252;;2;;;;;1;;;;;3;0,030593345;0,0234375;0,766097984
23+
Jezzine;59162;24;;;;;2;;1;;;;;3;0,016294234;0,0234375;1,43839228
24+
Marjaayoun-Hasbaya;159757;2;1;2;1;;;1;;;;;;5;0,043999829;0,0390625;0,887787536
25+
Nabatieh;144587;4;;3;;;;;;;;;;3;0,03982175;0,0234375;0,588560272
26+
Tyre-Sour;186618;26;;4;;;;;;;;;;4;0,051397811;0,03125;0,608002544
27+
BintJbeil;146350;1;;3;;;;;;;;;;3;0,040307311;0,0234375;0,581470202

data/vote_power/2017_vote_power.csvt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"String","Real","Real","Real","Real","Real","Real","Real","Real","Real","Real","Real","Real","Real","Real","Real","Real","Real"

0 commit comments

Comments
 (0)