-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
113 lines (95 loc) · 3.51 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
<!DOCTYPE html>
<html lang="en">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<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 type="text/css" rel="stylesheet" media="screen" href="./css/style.css">
<script src="https://d3js.org/d3.v7.min.js"></script>
<title>Counterparty in crashes</title>
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/latest/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js"
integrity="sha512-T/tUfKSV1bihCnd+MxKD0Hm1uBBroVYBOYSk1knyvQ9VyZJpc/ALb4P0r6ubwVPSGB2GvjeoMAJJImBG12TiaQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker3.standalone.min.css"
integrity="sha512-p4vIrJ1mDmOVghNMM4YsWxm0ELMJ/T0IkdEvrkNHIcgFsSzDi/fV7YxzTzb3mnMvFPawuIyIrHcpxClauEfpQg=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<style type="text/css">
#tooltip {
position: absolute;
width: auto;
height: auto;
padding: 5px 5px;
background-color: white;
color: black;
border-color: black;
border-style: solid;
border-width: 1px;
border-radius: 5px;
pointer-events: none;
text-align: left;
white-space: normal;
/* z-index makes the tooltip pushed to the front */
z-index: 1000;
}
#tooltip.hidden {
display: none;
}
#tooltip p {
margin-top: 0;
margin-bottom: 0;
/* padding-top: 2px;
padding-bottom: 2px; */
font-size: 15px;
line-height: 20px;
}
.form-spacing {
margin-top: 0px;
}
.table-padding-bottom {
margin-bottom: 60px;
}
td {
position: relative;
}
td:hover {
/* z-index makes the circles pushed to the front when hovering, but behind the tooltip */
z-index: 999;
}
</style>
</head>
<body>
<h1>Counterparties in motor vehicle crashes</h1>
<div>
Data source: all police-reported traffic crash data in the State of Michigan (2015-2023)
<br>
<br>
</div>
<div class="container">
<div id="tooltip" class="hidden">
<p><span id="tooltipText"></span></p>
</div>
<form class="form-spacing">
Injury severity:
<label><input type="checkbox" name="filterPreset" value="fatal" checked> Fatal</label>
<label><input type="checkbox" name="filterPreset" value="injuries"> Serious</label>
</form>
<div id="table"></div>
<br>
<br>
This dashboard is open source and hosted on a
<a href="https://github.com/fenggroup/crash-counterparty/">GitHub repository.</a>
<br>
<br>
This dashboard was originally inspired by <a href="https://www.roaddanger.org/statistics/counterparty">roaddanger</a>
<br>
<br>
<a href="https://fenggroup.org/">Feng Group</a> at the University of Michigan-Dearborn
<br>
<br>
</div>
<script src="./js/counterparty.js"></script>
</body>
</html>