-
Notifications
You must be signed in to change notification settings - Fork 0
/
senate_loyalty.html
183 lines (162 loc) · 8.71 KB
/
senate_loyalty.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
<!DOCTYPE html>
<html lang="en">
<head>
<!--- LOADING: metadata, IE config, Bootstrap, CSS -->
<title>TGIF-Senate Party Loyalty</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="style/style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script src="https://kit.fontawesome.com/3526fd308e.js"></script>
</head>
<body>
<div class="container" id="app">
<!--- HEADER PART WITH LOGO AND E-MAIL ICON -->
<div class="row">
<div id="logo" class="col-md-6 col-sm-6">
<img alt="TGIF logo image" class="img-fluid" src="img/tgif_logo5.png">
</div>
<div id="email" class="col-md-6 col-sm-6">
<p class="float-right py-3"><a id="mailtext" href="mailto: [email protected]" class="maillink ">[email protected]</a></p>
<img alt="Email icon" class="img-fluid float-right" src="img/mail-icon.png">
</div>
</div>
<!--- NAVIGATION BAR WITH DROPDOWN MENUS -->
<div id="navigationBar" class="row">
<nav class="navbar sticky-top navbar-expand-lg">
<ul class="nav nav-pills navbar-right">
<li class="nav-item active">
<a href="home.html" class="nav-link">Home</a>
</li>
<li class="nav-item dropdown">
<a href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link dropsown-toggle">Congress 113</a>
<div aria-labelledby="navbarDropdownMenuLink" class="dropdown-menu">
<a href="house-data.html" class="dropdown-item">House</a>
<a href="senate-data.html" class="dropdown-item">Senate</a>
</div>
</li>
<li class="nav-item dropdown">
<a href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link dropsown-toggle">Attendance</a>
<div aria-labelledby="navbarDropdownMenuLink" class="dropdown-menu">
<a href="house_attendance.html" class="dropdown-item">House</a>
<a href="senate_attendance.html" class="dropdown-item">Senate</a>
</div>
</li>
<li class="nav-item dropdown">
<a href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link dropsown-toggle">Party Loyalty</a>
<div aria-labelledby="navbarDropdownMenuLink" class="dropdown-menu">
<a href="house_loyalty.html" class="dropdown-item">House</a>
<a href="senate_loyalty.html" class="dropdown-item">Senate</a>
</div>
</li>
</ul>
</nav>
</div>
<!--Table container-->
<div class="row">
<div class="col">
<h2>Party Loyalty</h2>
<p>Those who consider themselves to be strong partisans, strong Democrats and strong Republicans respectively, tend to be the most faithful in voting for their party's nominee for office and legislation that backs their party's agenda. </p>
</div>
<div class="col">
<h3>Senate at a glance</h3>
<table class="table table-stripped" v-if="hideTable">
<tbody>
<tr class="tableheader">
<th class="textRight">Party</th>
<th>No. of Reps</th>
<th>% Voted with Party</th>
</tr>
<tr>
<td class="textRight">Democrats</td>
<td>{{noDemocrats.length}}</td>
<td>{{totalPercent(noDemocrats).toFixed(2)}}</td>
</tr>
<tr>
<td class="textRight">Republicans</td>
<td>{{noRepublicans.length}}</td>
<td>{{totalPercent(noRepublicans).toFixed(2)}}</td>
</tr>
<tr>
<td class="textRight">Independents</td>
<td>{{noIndependent.length}}</td>
<td>{{totalPercent(noIndependent).toFixed(2)}}</td>
</tr>
<tr>
<td class="textRight">Total</td>
<td>{{noParties.length}}</td>
<td>{{totalPercent(noParties).toFixed(2)}}</td>
</tr>
</tbody>
</table>
<div class="loadergif" v-if="hidegif">
<img src="/img/loading.gif">
</div>
</div>
</div>
<div class="row">
<div class="col">
<h3>Least Loyal (Bottom 10% of Party)</h3>
<h3></h3>
<table class="table table-stripped" v-if="hideTable">
<tbody>
<tr class="tableheader">
<th class="textRight">Name</th>
<th>No. Party Votes</th>
<th>% Party Votes</th>
</tr>
<tr v-for="(value, key) in bottomLoyalty">
<td class="textRight">{{value.first_name}} {{value.middle_name}} {{value.last_name}}</td>
<td>{{value.total_votes}}</td>
<td>{{value.votes_with_party_pct.toFixed(2)}}</td>
</tr>
</tbody>
</table>
<div class="loadergif" v-if="hidegif">
<img src="/img/loading.gif">
</div>
</div>
<div class="col">
<h3>Most Loyal (Top 10% of Party)</h3>
<h3></h3>
<table class="table table-stripped" v-if="hideTable">
<tbody>
<tr class="tableheader">
<th class="textRight">Name</th>
<th>No. Party Votes</th>
<th>% Party Votes</th>
</tr>
<tr v-for="(value, key) in topLoyalty">
<td class="textRight">{{value.first_name}} {{value.middle_name}} {{value.last_name}}</td>
<td>{{value.total_votes}}</td>
<td>{{value.votes_with_party_pct.toFixed(2)}}</td>
</tr>
</tbody>
</table>
<div class="loadergif" v-if="hidegif">
<img src="/img/loading.gif">
</div>
</div>
</div>
<!--- FOOTER -->
<div id="footerrow" class="row">
<div id="footer" class="col">
<footer class="page-footer font-small">
<div class="footer-copyright text-center py-3">
© 2016 TGIF | All Rights Reserved
</div>
</footer>
</div>
</div>
</div>
<button id="topBtn"><i class="fas fa-arrow-up"></i></button>
<!--- LOADING: JSON, JS scripts, jQuery, Bootstrap -->
<!---<script src="js/pro-congress-113-senate.js"></script>--->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="js/script.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body></html>