-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharson.html
129 lines (100 loc) · 4.58 KB
/
arson.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
<!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>Arson</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="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></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>
<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>
<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>Arson</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('arson', state_values)"></select>
<br>
<br><br>
<h3>Agency:</h3>
<br>
<div class="test"><select class="js-example-basic-single" style="width: 85%" id="agency_dropdown" onchange="agencyChangeFun('arson', state_values)"></select></div>
<br><br>
<h3>Crime:</h3>
<br>
<select class="js-example-basic-single" style="width: 85%" id="crime_dropdown" onchange="agencyChangeFun('arson', state_values)"></select>
<br><br>
<div id="agency_level_boxes">
<h3>Type of Crime:</h3>
<br>
<input type="checkbox" id="checkbox_1" checked onchange="checkboxesUpdate('arson', '#checkbox_1')">
<label class="label-text fa" for="checkbox_1">Actual Offenses</label>
<br>
<input type="checkbox" id="checkbox_2" onchange="checkboxesUpdate('arson', '#checkbox_1')">
<label class="label-text fa" for="checkbox_2">Offenses Cleared - Total</label>
<br>
<input type="checkbox" id="checkbox_3" onchange="checkboxesUpdate('arson', '#checkbox_1')">
<label class="label-text fa" for="checkbox_3">Offenses Cleared - All Under Age 18</label></input>
<br>
<input type="checkbox" id="checkbox_4" onchange="checkboxesUpdate('arson', '#checkbox_1')">
<label class="label-text fa" for="checkbox_4">Unfounded Offenses</label>
<hr>
<input type="checkbox" id="monthly" onchange="agencyChangeFun('arson', state_values)">
<label class="label-text fa" for="monthly">Monthly Data</label>
<hr>
</div>
<button type="button" onclick="exportToCsv(all_data, 'arson', state_values)">Download All Agency Data</button>
<br><br><br><br><br><br><br><br><br>
<button type="button" onclick="exportToCsv(table_data, 'arson', state_values)">Download Current Table Data</button>
<br>
<p>Please note that data are only available for agencies that report all 12 months of the year.</p>
</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("arson", state_values, 4, arson_values, "grand_total");
</script>
</body>
</html>