-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
223 lines (175 loc) · 10.9 KB
/
Copy pathindex.html
File metadata and controls
223 lines (175 loc) · 10.9 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Erasmus Exchange Proyect</title>
<link rel="stylesheet" href="assets/css/auto-complete.css">
<link rel="stylesheet" href="assets/css/style.css">
<link rel="stylesheet" href="assets/css/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body style="width:100%; height:100%">
<!-- European flag and intro -->
<div id="intro" class="w3-display-container w3-indigo" style="height:100%;width:100%">
<img class="w3-display-middle" style="width:70%; max-width:90vh; opacity:0.6" src="./images/stars.svg">
<img class="w3-display-middle" style="width:60%; max-width:80vh" src="./images/logo.svg">
<h4 class="w3-display-bottommiddle w3-text-white">Click anywhere to start the visualization</h4>
</div>
<!-- Visualization -->
<div id="visualization" class="w3-display-container" style="height:100%;width:100%;display:none" >
<!-- SIDEBAR -->
<nav class="w3-sidebar w3-collapse w3-top w3-card" style="z-index:3;width:300px" id="filters_bar">
<!-- Erasmus Logo -->
<div class="w3-container w3-bar-block w3-display-container w3-padding-16">
<i onclick="w3_close()" class="fa fa-remove w3-hide-large w3-button w3-display-topright"></i>
<h3 class="w3-wide w3-center"><b>ERASMUS</b></h3>
</div>
<!-- Search bar -->
<div class="w3-bar w3-padding-32" id="search-bar">
<input class="w3-input w3-border w3-bar-item" type="text" placeholder="Search for a country..." style="width:80%">
<button class="w3-button w3-bar-item" style="width:20%"><i class="fa fa-search"></i></button>
</div>
<!-- Filters -->
<div class="w3-padding-16 w3-large w3-text-grey">
<a onclick="opengender()" href="javascript:void(0)" class="w3-button w3-block w3-white w3-center">
Gender <i class="fa fa-caret-down"></i>
</a>
<div id="opengender" class="w3-bar-block w3-hide gender_bt unselectable">
<label class="check_label"><input class="check" type="checkbox" id="male_bt" value=M>Male</label></br>
<label class="check_label"><input class="check" type="checkbox" id="female_bt" value=F>Female</label></br>
</div>
<a onclick="opencycle()" href="javascript:void(0)" class="w3-button w3-block w3-white w3-center">
Cycle <i class="fa fa-caret-down"></i>
</a>
<div id="opencycle" class="w3-bar-block w3-hide cycle_bt unselectable">
<label class="check_label"><input class="check" type="checkbox" id="first_bt" value=1>First</label></br>
<label class="check_label"><input class="check" type="checkbox" id="second_bt" value=2>Second</label></br>
<label class="check_label"><input class="check" type="checkbox" id="third_bt" value=3>Third</label></br>
</div>
<a onclick="opensession()" href="javascript:void(0)" class="w3-button w3-block w3-white w3-center">
Session <i class="fa fa-caret-down"></i>
</a>
<div id="opensession" class="w3-bar-block w3-hide session_bt unselectable">
<label class="check_label"><input class="check" type="checkbox" id="year_bt" value=1>Year</label></br>
<label class="check_label"><input class="check" type="checkbox" id="autumn_bt" value=2>Autumn</label></br>
<label class="check_label"><input class="check" type="checkbox" id="spring_bt" value=3>Spring</label></br>
</div>
<a onclick="opendomain()" href="javascript:void(0)" class="w3-button w3-block w3-white w3-center">
Domain <i class="fa fa-caret-down"></i>
</a>
<div id="opendomain" class="w3-bar-block w3-hide domain_bt unselectable">
<label class="check_label"><input class="check" type="checkbox" id="education_bt" value=1>Education</label><br>
<label class="check_label"><input class="check" type="checkbox" id="humanities_bt" value=2>Humanities</label><br>
<label class="check_label"><input class="check" type="checkbox" id="social_bt" value=3>Social sciences</label><br>
<label class="check_label"><input class="check" type="checkbox" id="science_bt" value=4>Science</label><br>
<label class="check_label"><input class="check" type="checkbox" id="engineering_bt" value=5>Engineering</label><br>
<label class="check_label"><input class="check" type="checkbox" id="agriculture_bt" value=6>Agriculture</label><br>
<label class="check_label"><input class="check" type="checkbox" id="health_bt" value=7>Health</label><br>
<label class="check_label"><input class="check" type="checkbox" id="services_bt" value=8>Services</label><br><br>
</div>
<div class="w3-padding-32 w3-center unselectable">
<h3><span id="total_students"></span> students</h3>
</div>
<div class="w3-center unselectable">
<button class="w3-bar-item w3-button w3-medium chart_bt chart_bt_active" id="abs_bt" onclick="toggle_data()">Absolute</button>
<button class="w3-bar-item w3-button w3-medium chart_bt" id="norm_bt" onclick="toggle_data()">Normalized</button>
</div>
<div class="w3-padding-16 w3-center unselectable">
<button class="w3-button w3-medium reset_bt" id="reset_filters">Reset filters</button>
</div>
</div>
</nav>
<!-- PAGE CONTENT! -->
<div class="w3-main" style="margin-left:310px">
<!-- Top header -->
<header id="viz_buttons" class="w3-container w3-padding-large w3-center w3-bar w3-xlarge w3-card">
<button class="w3-bar-item w3-button chart_bt chart_bt_active w3-center" style="width:38%" id="bubble_bt" onclick="toggle_viz()">General</button>
<button class="w3-bar-item w3-button chart_bt w3-center" style="width:38%" id="sankey_bt" onclick="toggle_viz()">Flux</button>
<a href="javascript:void(0)" class="w3-hide-large w3-button w3-right" onclick="w3_open()"><i class="fa fa-bars"></i></a>
</header>
<!-- VIZ -->
<div class="w3-display-container w3-padding-large w3-center w3-card" style="margin-top:10px" id="viz_here">
<a href="#" class="w3-container w3-display-topleft fa fa-close w3-xxlarge arrow_icon" style="margin-top:25px;margin-left:40px;color:#6d7887;text-decoration:none;display:none" id="reset_countries"></a>
<button class="w3-container w3-display-topmiddle w3-btn w3-padding w3-medium w3-teal" style="margin-top:30px;display:none" id="filter_countries">Filter</button>
</div>
</div>
<!-- Overlay effect when opening sidebar on small screens -->
<div class="w3-overlay w3-hide-large" onclick="w3_close()" style="cursor:pointer" title="close side menu" id="overlay_bar"></div>
</div>
<!-- Scripts for manipulating the HTML -->
<script>
// Change button color
function toggle_data() {
$("#abs_bt").toggleClass("chart_bt_active");
$("#norm_bt").toggleClass("chart_bt_active")
}
function toggle_viz() {
$("#bubble_bt").toggleClass("chart_bt_active");
$("#sankey_bt").toggleClass("chart_bt_active")
}
// Gender
function opengender() {
var d = document.getElementById("opengender");
if (d.className.indexOf("w3-show") == -1) {
d.className += " w3-show";
} else {
d.className = d.className.replace(" w3-show", "");
}
}
// Cycle
function opencycle() {
var d = document.getElementById("opencycle");
if (d.className.indexOf("w3-show") == -1) {
d.className += " w3-show";
} else {
d.className = d.className.replace(" w3-show", "");
}
}
// Session
function opensession() {
var d = document.getElementById("opensession");
if (d.className.indexOf("w3-show") == -1) {
d.className += " w3-show";
} else {
d.className = d.className.replace(" w3-show", "");
}
}
// Domain
function opendomain() {
var d = document.getElementById("opendomain");
if (d.className.indexOf("w3-show") == -1) {
d.className += " w3-show";
} else {
d.className = d.className.replace(" w3-show", "");
}
}
// Open and close sidebar
function w3_open() {
document.getElementById("filters_bar").style.display = "block";
document.getElementById("overlay_bar").style.display = "block";
}
function w3_close() {
document.getElementById("filters_bar").style.display = "none";
document.getElementById("overlay_bar").style.display = "none";
}
</script>
<!-- Libs -->
<script type="text/javascript" src="assets/libs/d3.v5.min.js"></script>
<script type="text/javascript" src="assets/libs/d3-tip.js"></script>
<script type="text/javascript" src="assets/libs/sankey.js"></script>
<script type="text/javascript" src="assets/libs/d3-scale-chromatic.min.js"></script>
<script type="text/javascript" src="assets/libs/search-bar.js"></script>
<script type="text/javascript" src="assets/libs/auto-complete.min.js"></script>
<script type="text/javascript" src="assets/libs/jquery.min.js"></script>
<script type="text/javascript" src="assets/libs/crossfilter.js"></script>
<script type="text/javascript" src="assets/libs/lodash.core.min.js"></script>
<!-- Components -->
<script type="text/javascript" src="assets/scripts/main.js"></script>
<script type="text/javascript" src="assets/scripts/preproc.js"></script>
<script type="text/javascript" src="assets/scripts/bubble_chart.js"></script>
<script type="text/javascript" src="assets/scripts/sankey_chart.js"></script>
</body>
</html>