-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
83 lines (77 loc) · 3.53 KB
/
Copy pathindex.html
File metadata and controls
83 lines (77 loc) · 3.53 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Interactive Ternary Plot</title>
<!-- Load Google Font -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans:wght@300;400;500;700&display=swap" rel="stylesheet">
<!-- Link to the external CSS file -->
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="mast">
<div id="sidebar">
<div id="navbar">
<div id="tabs">
<div id="tab1" class="active-tab" onclick="changeContent('content1')">Word Inspector</div>
<div id="tab2" onclick="changeContent('content2')">Legend</div>
<div id="tab3" onclick="changeContent('content3')" title="This tab is not clickable"></div>
</div>
</div>
<div id="side-content">
<div id="content1">
<h2>Word Inspector</h2>
<p>Inspect a word's ternary plot position by clicking on a dot in the plot or selecting one below.</p>
<input type="text" id="search" placeholder="Search for words..">
<div class="table-container">
<table id="wordTable">
<thead>
<tr>
<th>Word</th>
<th>Trump</th>
<th>Harris</th>
<th>RFK Jr.</th>
<th>Scale</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<div id="content2" style="display: none;">
<h2>Legend</h2>
<p>
The further to each corner, the more unique the word is to each candidate.
Points are scaled by frequency.
</p>
<div class="legend-container">
<table id="legendTable">
<thead>
<tr>
<th>Category</th>
<th>Candidate</th>
<th>Color</th>
</tr>
</thead>
<tbody id="LegendBody">
<!-- Dummy data -->
<tr><td>Republican Party</td><td>Donald Trump</td><td style="background-color: rgb(232, 27, 35);"></td></tr>
<tr><td>Democratic Party</td><td>Kamala Harris</td><td style="background-color: rgb(0, 174, 243);"></td></tr>
<tr><td>Indepndent</td><td>Robert Kennedy Jr.</td><td style="background-color: rgb(255, 255, 255);"></td></tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div id="main-content">
<svg id="ternaryPlot"></svg>
</div>
</div>
<script src="https://d3js.org/d3.v7.min.js"></script>
<script src="script.js"></script>
</body>
</html>