-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
265 lines (234 loc) · 11.6 KB
/
index.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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Analysis of bike accidents in Brno." />
<title>Bike Accidents in Brno</title>
<link href="assets/pics/favicon.ico" rel="icon" media="(prefers-color-scheme: light)" type="image/x-icon" />
<link href="assets/pics/favicon--dark_mode.ico" rel="icon" type="image/x-icon" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;900&display=swap" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/slider.css" />
<link rel="stylesheet" href="css/loader.css" />
<link rel="preconnect" href="https://d3js.org">
<script type="text/javascript" src="https://d3js.org/d3.v6.min.js"></script>
<!-- <script src="https://d3js.org/d3-selection-multi.v1.min.js"></script> -->
<!-- leaflet -->
<link rel="preconnect" href="https://unpkg.com">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.3/dist/leaflet.css"
integrity="sha256-kLaT2GOSpHechhsozzB+flnD+zUyjE2LlfWPgU04xyI=" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.9.3/dist/leaflet.js"
integrity="sha256-WBkoXOwTeyKclOHuWtc+i2uENFpDZ9YPdf5Hf+D7ewM=" crossorigin=""></script>
<!-- font awesome -->
<link rel="preconnect" href="https://cdnjs.cloudflare.com">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css"
integrity="sha512-MV7K8+y+gLIBoVD59lQIYicR65iaqukzvf/nwasF0nqhPay5w/9lJmVM2hMDcnK1OnMGCdVK+iQrJ7lzPJQd1w=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>
<div class="app">
<header class="app__header header">
<h1 class="header__heading">Bike Accidents in Brno</h1>
<div class="header__controls">
<button id="app_modal__btn" class="app__about header__button modal__button" name="Display information about this page" title="About Project">
About
</button>
<button id="app__dark_mode" class="header__button app__dark_mode" name="Switch dark mode" title="Dark Mode">
<i class="fa-solid fa-moon" id="dark_mode__img"></i>
<span class="dark_mode__text">Change to dark mode</span>
</button>
</div>
</header>
<article id="app_modal" class="app__info modal">
<div class="modal__content">
<span class="modal__close">×</span>
<h1 class="modal__heading">Bike Accidents in Brno</h1>
<p class="modal__text">
This is a vizualization of Bike Accidents in Brno,
extracted from public data by
<a href="https://data.brno.cz/">data.brno.cz</a>
</p>
<p class="modal__text">
This was developed as a final project from
<em>FI:PV251</em>
in autumn 2022. For more info about the project, or to
access the source code and some documentation, refer to
<a href="https://github.com/balgot/bike-accidents-brno.git">this GitHub repo.</a>
</p>
<div class="modal__instructions instructions">
<em class="instructions__note">Note</em>
<p class="instructions__text">
To view data corresponding to the particular bike
road, select it on the map, and optionally, filter
out the desired content.
</p>
</div>
<p class="modal__text">
If you encounter any errors related to the map, please
report them on
<a href="https://www.openstreetmap.org/fixthemap">
openstreetmap bug tracker</a>.
</p>
<p class="modal__author modal__text">
Author: Michal Barnišin
</p>
</div>
</article>
<section class="preloader">
<p class="loading__what">(<span id="loading__what">what</span>)</p>
<h1 class="preloader__heading loading">Loading</h1>
<!-- https://codepen.io/lucawater/pen/VwQVyj -->
<div class="bike">
<div class="part sadle">
<div class="sadlepen"></div>
<div class="sit-here"></div>
</div>
<div class="part frame">
<div class="bar left-top"></div>
<div class="bar left-bottom"></div>
<div class="bar left"></div>
<div class="bar top"></div>
<div class="bar bottom"></div>
<div class="bar right"></div>
</div>
<div class="part handlebar">
<div class="stem"></div>
<div class="connector"></div>
<div class="prehandle"></div>
<div class="handle"></div>
</div>
<div class="part pedals">
<div class="inside"></div>
<div class="outside"></div>
<div class="pedalstem front">
<div class="pedalbase front"></div>
</div>
<div class="pedalstem back">
<div class="pedalbase back"></div>
</div>
</div>
<div class="part wheel left">
<div class="spoke"></div>
<div class="spoke"></div>
<div class="spoke"></div>
<div class="spoke"></div>
<div class="spoke"></div>
<div class="spoke"></div>
<div class="spoke"></div>
<div class="spoke"></div>
</div>
<div class="part wheel right">
<div class="spoke"></div>
<div class="spoke"></div>
<div class="spoke"></div>
<div class="spoke"></div>
<div class="spoke"></div>
<div class="spoke"></div>
<div class="spoke"></div>
<div class="spoke"></div>
</div>
<div class="part axis left"></div>
<div class="part axis right"></div>
</div>
</section>
<main class="app__main resizer">
<section class="app__map map_area resizer__left">
<div class="map" id="map"></div>
<div class="slider">
<div class="range-price">
<label for="min_year--num">From</label>
<input type="number" id="min_year--num" name="Minimal year to display" value="0" />
</div>
<div class="range">
<div class="range-slider">
<span class="range-selected"></span>
</div>
<div class="range-input">
<input type="range" class="min" min="0" max="3000" value="0" step="1" />
<input type="range" class="max" min="0" max="3000" value="3000" step="1" />
</div>
</div>
<div class="range-price">
<label for="max_year--num">To</label>
<input type="number" id="max_year--num" name="Maximal year to display" value="3000" />
</div>
</div>
<div class="unselect unselect--invisible">
<button class="unselect__btn btn" title="Unselect current bike road"><i class="fa-solid fa-xmark"></i><span class="btn__text">Unselect</span></button>
</div>
</section>
<div class="resizer__mid" id="dragMe">
<div class="resizer__visual"></div>
</div>
<section class="app__text resizer__right text">
<div class="text__heading">
<h1 class="about">
Brno <span class="about__year">(<span class="about__year--min">2012</span> - <span class="about__year--max">2012</span>)</span>
</h1>
<button class="filters__btn">
<i class="fa-solid fa-filter"></i>
<span class="filters__btn-text">Filters</span>
</button>
</div>
<div class="filters filters--hidden">
<ul class="filters__ul">
<li class="filters__li">
<label for="filter__line">Distribution</label>
<input type="checkbox" name="linechart" id="filter__line" checked />
</li>
<li class="filters__li">
<label for="filter__month">Month</label>
<input type="checkbox" name="month" id="filter__month" checked />
</li>
<li class="filters__li">
<label for="filter__age">Age</label>
<input type="checkbox" name="age" id="filter__age" checked />
</li>
<li class="filters__li">
<label for="filter__sex">Sex</label>
<input type="checkbox" name="sex" id="filter__sex" checked />
</li>
</ul>
</div>
<p id="about_road" class="text__about"></p>
<div class="text__about linechart">
<p id="lineChart--before"></p>
<div id="linechart" class="graph"></div>
<p id="lineChart--after"></p>
</div>
<div class="text__about month">
<p id="month--before"></p>
<div id="month" class="graph"></div>
<p id="month--after"></p>
</div>
<div class="text__about age">
<p id="age--before"></p>
<div id="age" class="graph"></div>
<p id="age--after"></p>
</div>
<div class="text__about sex">
<p id="sex--before"></p>
<div id="sex" class="graph"></div>
<p id="sex--after"></p>
</div>
</section>
</main>
</div>
<script src="scripts/data/accidents.js"></script>
<script src="scripts/data/roads.js"></script>
<script src="scripts/graphs/barplot.js"></script>
<script src="scripts/graphs/donut.js"></script>
<script src="scripts/graphs/lineplot.js"></script>
<script src="scripts/utils/geocluster.js"></script>
<script src="scripts/utils/filters.js"></script>
<script src="scripts/utils/modal.js"></script>
<script src="scripts/utils/range_slider.js"></script>
<script src="scripts/utils/resizer.js"></script>
<script src="scripts/utils/translations.js"></script>
<script src="scripts/utils/darkMode.js"></script>
<script src="scripts/common.js"></script>
<script src="scripts/main.js"></script>
</body>
</html>