-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdateCrime.html
107 lines (88 loc) · 4.15 KB
/
dateCrime.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
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>NYC Crime Map 2024</title>
<header>
<h1>NYC All Crime Map 2024</h1>
<h4><div class="contributors">
By: <div class="contributor">
<img src="headshots/angely.png" alt="Angely R" class="contributor-img">
<a href="https://github.com/angramirez126" target="_blank">Angely R</a>
</div>
<div class="contributor">
<img src="headshots/everest.png" alt="Everest L" class="contributor-img">
<a href="https://github.com/everestgourmand" target="_blank">Everest L</a>
</div>
<div class="contributor">
<img src="headshots/jason.png" alt="Jason M" class="contributor-img">
<a href="https://github.com/JasonTMarino" target="_blank">Jason M</a>
</div>
<div class="contributor">
<img src="headshots/stan.png" alt="Stan U" class="contributor-img">
<a href="https://github.com/learned2" target="_blank">Stan U</a>
</div>
<div class="contributor">
<img src="headshots/justin.jpg" alt="Justin Z" class="contributor-img">
<a href="https://github.com/juszisholtz" target="_blank">Justin Z</a>
</div>
</div></h4>
</header>
<!-- Leaflet CSS -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin=""/>
<!-- Leaflet JavaScript -->
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>
<!-- D3 library -->
<script src="https://d3js.org/d3.v7.min.js"></script>
<!-- Marker cluster JS -->
<script type="text/javascript" src="https://unpkg.com/leaflet.markercluster@1.0.3/dist/leaflet.markercluster.js"></script>
<!-- Marker cluster CSS -->
<link rel="stylesheet" type="text/css" href="https://unpkg.com/leaflet.markercluster@1.0.3/dist/MarkerCluster.css">
<link rel="stylesheet" type="text/css" href="https://unpkg.com/leaflet.markercluster@1.0.3/dist/MarkerCluster.Default.css">
<!-- Custom CSS -->
<link rel="stylesheet" type="text/css" href="style.css">
<div id="navigate-container">
<button id="goToIndexBtn">Index Map</button>
<button id="goToDateCrimeBtn">All Crimes Map</button>
<button id="goToChartsBtn">📊Charts</button>
<button id="goToCrimeStoriesBtn">🔍Crime Stories</button>
</div>
<script>
// Button click event to navigate to the Date Crime Map page
const goToIndexBtn = document.getElementById('goToIndexBtn');
goToIndexBtn.addEventListener('click', function() {
window.location.href = "index.html";
});
// Button click event to navigate to the Date Crime Map page
const goToDateCrimeBtn = document.getElementById('goToDateCrimeBtn');
goToDateCrimeBtn.addEventListener('click', function() {
window.location.href = "dateCrime.html"; // Redirects to the Date Crime Map page
});
// Button click event to navigate to the Charts page
const goToChartsBtn = document.getElementById('goToChartsBtn');
goToChartsBtn.addEventListener('click', function() {
window.location.href = "charts.html"; // Redirects to the charts
});
// Button click event to navigate to the Crime Stories page
const goToCrimeStoriesBtn = document.getElementById('goToCrimeStoriesBtn');
goToCrimeStoriesBtn.addEventListener('click', function() {
window.location.href = "crimeStories.html"; // Redirects to the Crime Stories page
});
</script>
</head>
<body>
<!-- Floating Dropdown Box Above the Map -->
<div id="dropdown-container">
<label for="dateSelect">Select Date:</label>
<input type="date" id="dateSelect" min="2024-01-01" max="2024-12-31"/>
</div>
<div id="map"></div>
<!-- JavaScript -->
<script type="text/javascript" src="dateCrime.js"></script>
<footer>
<p>Data sourced from NYC Open Data. Powered by Leaflet.js, Chart.js and D3.js</p>
</footer>
</body>
</html>>