-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhouseployalty.html
206 lines (188 loc) · 10.3 KB
/
houseployalty.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
<!DOCTYPE html>
<html lang="en" id="house">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="./styles/main.css">
<link rel="shortcut icon" href="./img/favicon.ico.png" type="image/x-icon">
<title>Congressmen</title>
</head>
<body class="partyloyalty">
<div id="app">
<header>
<div>
<div class="row">
<div class="col col-sm-12 col-md-6 ps-4 pt-2">
<img id="logo" src="./img/logo-dig.jpg" alt="Logo de Data inside Group">
</div>
<div class="col col-sm-12 col-md-6 d-flex justify-content-center align-items-center">
<h2>
<a class="text-muted" href="mailto:[email protected]">✉[email protected]</a>
</h2>
</div>
</div>
</div>
</header>
<nav>
<ul class="nav nav-tabs bg-secondary" style="--bs-bg-opacity: .5;">
<li class="nav-item">
<a class="nav-link" aria-current="page" href="./index.html">Home</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button"
aria-expanded="false">Congress 113</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="./house.html">House</a></li>
<li><a class="dropdown-item" href="./senate.html">Senate</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button"
aria-expanded="false">Attendance</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="./houseatt.html">House</a></li>
<li><a class="dropdown-item" href="./senateatt.html">Senate</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle active" data-bs-toggle="dropdown" href="#" role="button"
aria-expanded="false">Party Loyalty</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">House</a></li>
<li><a class="dropdown-item" href="./senateployalty.html">Senate</a></li>
</ul>
</li>
</ul>
</nav>
<main>
<div class="p-4">
<div class="row mb-5">
<div class="col-sm-12 col-md-6 p-4 d-flex flex-column gap-2 text-justify">
<h2 class="display-2">Party Loyalty</h2>
<p class="h5">
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-sm-12 col-md-6 p-4">
<table id="listaCantidadesYPorcentajes" class="table table-hover">
<caption class="h3 pe-3">
Senate at a glance
</caption>
<thead class="table table-hover table-bordered border border-dark bg-secondary" style="--bs-bg-opacity: .5;">
<tr class="text-center text-capitalize">
<th scope="col" class="table-bordered border border-dark">Party</th>
<th scope="col" class="table-bordered border border-dark">No. Of Reps.</th>
<th scope="col" class="table-bordered border border-dark">% votes w/Party</th>
</tr>
</thead>
<tbody>
<tr>
<td>Republicans</td>
<td>{{largoPartidos("R")}}</td>
<td>{{contadorVotos("R").toFixed(2)}} %</td>
</tr>
<tr>
<td>Democrates</td>
<td>{{largoPartidos("D")}}</td>
<td>{{contadorVotos("D").toFixed(2)}} %</td>
</tr>
<tr>
<td>Independents</td>
<td>{{largoPartidos("ID")}}</td>
<td>{{contadorVotos("ID").toFixed(2)}} %</td>
</tr>
<tr>
<td>Total</td>
<td>{{totalPartidos()}}</td>
<td>{{contadorVotosTotal().toFixed(2)}} %</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="dropdown-divider">
</div>
<div class="row mt-5">
<div class="col-sm-12 col-md-6">
<table class="table table-hover">
<caption class="h3 pe-3">
least engaged (Bottom 10% of Party)
</caption>
<thead class="table table-hover table-bordered border border-dark bg-secondary" style="--bs-bg-opacity: .5;">
<tr class="text-center text-capitalize">
<th scope="col" class="table-bordered border border-dark">name</th>
<th scope="col" class="table-bordered border border-dark">No. Party votes</th>
<th scope="col" class="table-bordered border border-dark">% Party</th>
</tr>
</thead>
<tbody id="tablaLeastPartyVotes-house" class="text-center text-dark">
<tr v-for="miembro in modularizarSortMenorMayorLoyalty">
<td>
<a v-bind:href="miembro.url">{{miembro.first_name}} {{miembro.middle_name}} {{miembro.last_name}}</a>
</td>
<td>
{{(miembro.total_votes / 100 * miembro.votes_with_party_pct).toFixed()}}
</td>
<td>
{{miembro.votes_with_party_pct.toFixed(2)}} %
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-12 col-md-6">
<table class="table table-hover">
<caption class="h3 pe-3">
most engaged (Top 10% of Party)
</caption>
<thead class="table table-hover table-bordered border border-dark bg-secondary" style="--bs-bg-opacity: .5;">
<tr class="text-center text-capitalize ">
<th scope="col" class="table-bordered border border-dark">name</th>
<th scope="col" class="table-bordered border border-dark">No. Party votes</th>
<th scope="col" class="table-bordered border border-dark">% Party</th>
</tr>
</thead>
<tbody id="tablaMostPartyVotes-house" class="text-center text-dark">
<tr v-for="miembro in modularizarSortMayorMenorLoyalty">
<td>
<a v-bind:href="miembro.url">{{miembro.first_name}} {{miembro.middle_name}} {{miembro.last_name}}</a>
</td>
<td>
{{(miembro.total_votes / 100 * miembro.votes_with_party_pct).toFixed()}}
</td>
<td>
{{miembro.votes_with_party_pct.toFixed(2)}} %
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</main>
<footer class="mb-2 d-flex justify-content-center align-items-center border bg-secondary"
style="--bs-bg-opacity: .5;">
<div class="">
<div class="row">
<div class="col col-12 text-capitalize h5">
© 2022 data insight group | all rights reserved
</div>
</div>
</div>
</footer>
</div>
<script src="https://unpkg.com/vue@3"></script>
<!-- <script src="./scripts/main.js"></script> -->
<script src="./scripts/mainvue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous">
</script>
</body>
</html>