-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathleoka.html
More file actions
139 lines (113 loc) · 5.4 KB
/
Copy pathleoka.html
File metadata and controls
139 lines (113 loc) · 5.4 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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-3N15LTX7MP"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-3N15LTX7MP');
</script>
<title>Law Enforcement Officers Killed and Assaulted (LEOKA)</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Jacob Kaplan">
<meta name="description" content="Explore data from the Federal Bureau of Investigation's Uniform Crime Reporting (UCR) Program Data, including the Summary Reporting System (SRS) and National Incident-Based Reporting System (NIBRS) data.">
<script src="data/data.js" ></script>
<script src="js/utils.js"></script>
<script src="js/datatool.js"></script>
<script src="js/graph.js"></script>
<script src="js/table.js"></script>
<script src="js/change_funs.js"></script>
<script src="js/dynamic_url.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/datatables@1.10.18/media/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.4/dist/chart.umd.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-watermark@2.0.2/chartjs-plugin-watermark.min.js"></script>
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<div class="topnav" id="myTopnav">
<nav role="navigation" id="site-nav" class="nav">
<div class="menu a">
<a href="/index.html">Data Tool</a>
<a href="/about.html">About</a>
</div>
</nav>
</div>
<div class="column sidebar">
<h2>Law Enforcement Officers Killed and Assaulted (LEOKA)</h2>
<h3>Data Source</h3>
<br>
<select class="js-example-basic-single" style="width: 85%" id="data_source" onchange="updateDataSource()"></select>
<br>
<h3>State:</h3>
<br>
<select class="js-example-basic-single" style="width: 85%" id="state_dropdown" onchange="stateChangeFun('leoka', state_values)"></select>
<br><br>
<h3>Agency:</h3>
<br>
<select class="js-example-basic-single" style="width: 85%" id="agency_dropdown" onchange="agencyChangeFun('leoka', state_values)"></select>
<br><br>
<h3>Category:</h3>
<br><br>
<select class="js-example-basic-single" style="width: 85%" id="crime_dropdown" onchange="leoka_categoryChangeFun()"></select>
<br><br>
<h3>Subcategory:</h3>
<br><br>
<select class="js-example-basic-single" style="width: 85%" id="subcategory_dropdown" onchange="agencyChangeFun('leoka', state_values)"></select>
<div id="leokaSex">
<h3>Officer Sex:</h3>
<br>
<input type="checkbox" id="checkbox_1" onchange="checkboxesUpdate('leoka', '#checkbox_3')"></input>
<label class="label-text fa" for="checkbox_1">Female</label>
<br>
<input type="checkbox" id="checkbox_2" onchange="checkboxesUpdate('leoka', '#checkbox_3')"></input>
<label class="label-text fa" for="checkbox_2">Male</label>
<br>
<input type="checkbox" id="checkbox_3" checked onchange="checkboxesUpdate('leoka', '#checkbox_3')"></input>
<label class="label-text fa" for="checkbox_3">Total</label>
<br>
<input type="checkbox" id="checkbox_4" onchange="checkboxesUpdate('leoka', '#checkbox_5')"></input>
<label class="label-text fa" for="checkbox_4">Unarmed</label>
<br>
<input type="checkbox" id="checkbox_5" onchange="checkboxesUpdate('leoka', '#checkbox_5')"></input>
<label class="label-text fa" for="checkbox_5">Total</label>
</div>
<br><br>
<hr>
<input type="checkbox" id="rate" name="rate" value="rate" onchange="rateBoxesChange('#leoka_rate_per_officer', 'leoka', state_values)"></input>
<label class="label-text fa" for="rate">Rate per 100,000 Population</label>
<br>
<input type="checkbox" id="leoka_rate_per_officer" name="leoka_rate_per_officer" value="leoka_rate_per_officer" onchange="rateBoxesChange('#rate', 'leoka', state_values)"></input>
<label class="label-text fa" for="leoka_rate_per_officer">Rate per Officer</label>
<br><br>
<hr>
<input type="checkbox" id="monthly" onchange="agencyChangeFun('leoka', state_values)"></input>
<label class="label-text fa" for="monthly">Monthly Data</label>
<hr>
<button type="button" onclick="exportToCsv(all_data, 'leoka', state_values)">Download All Agency Data</button>
<br><br><br><br><br><br><br><br>
<button type="button" onclick="exportToCsv(table_data, 'leoka', state_values)">Download Current Table Data</button>
<br>
<p>Please note that officers assaulted/killed data are only available for agencies that report all 12 months of the year.
</div>
<div class="column main">
<div>
<canvas id="graph" style="width:95%;height:600px;"></canvas>
</div>
<div>
<table id="table" class="display cell-border"></table>
</div>
</div>
<script>
$('.js-example-basic-single').select2({
minimumResultsForSearch:2
});
main("leoka", state_values, 4, leoka_categories, "employees");
</script>
</body>
</html>