-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
68 lines (63 loc) · 3.32 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>NYC Shooting Incidents</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<link rel="stylesheet" href="https://api.mapbox.com/mapbox-gl-js/v2.14.1/mapbox-gl.css">
<link rel="stylesheet"
href="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-compare/v0.4.0/mapbox-gl-compare.css"
type="text/css">
<link rel="stylesheet"
href="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-compare/v0.4.0/mapbox-gl-compare.css"
type="text/css">
<link rel="stylesheet" href="css/styles.css" type="text/css">
</head>
<body>
<div id="main-container">
<nav>
<div class="title">NYC Shooting Incidents (2006-2021)</div>
<div class="nav-links">
<a class="nav-link" href="https://github.com/chlozhen/webmap-nyc-shootings"
target="_blank">Github</a>
</div>
</nav>
<div id="content-container">
<div id="sidebar">
<p>This map shows shooting incidents in New York City for two years side by side.</p>
<p>Move the navigator left and right to compare two years of shooting incidents in NYC. The default is 2006 (left) vs 2021 (right).</p>
<p>Zoom and click on individual points for more info on the incident. Dark red dots represent fatal incidents.</p>
<p>Use the drop down menus below to change the years shown on the map, and the corresponding statistics in the tables below.</p>
<div class="dropdown">
<select id="dropdown_left" class="dropdown-content" onchange="onYearSelected('left')">
<option value="">Left Map</option>
</select>
</div>
<div class="dropdown">
<select id="dropdown_right" class="dropdown-content" onchange="onYearSelected('right')">
<option value="">Right Map</option>
</select>
</div>
<div class="stats">
<a class="stats_title">Statistics for the current years</a>
<a class="stats_sub_title">Left Map</a>
<table id="stats_left" class="key-value-table"></table>
<a class="stats_sub_title">Right Map</a>
<table id="stats_right" class="key-value-table"></table>
</div>
</div>
<div id="comparison-container">
<div id="before" class="map"></div>
<div id="after" class="map"></div>
</div>
</div>
</div>
<script src="https://api.mapbox.com/mapbox-gl-js/v2.14.1/mapbox-gl.js"></script>
<script src="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-compare/v0.4.0/mapbox-gl-compare.js"></script>
<script
src="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.0/mapbox-gl-geocoder.min.js"></script>
<!-- <script src="//cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js"></script> -->
<script src="https://code.jquery.com/jquery-3.6.4.min.js" integrity="sha256-oP6HI9z1XaZNBrJURtCoUT5SUnxFr8s3BzRl+cbzUq8=" crossorigin="anonymous"></script>
<script src="js/scripts.js"></script>
</body>
</html>