-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcharts.html
104 lines (89 loc) · 3.68 KB
/
charts.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
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>NYC Crime Map 2024</title>
<header>
<h1>Crime Charts 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>
<!-- custom -->
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="charts.js"></script>
<!-- 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>
<!-- Dropdown Menu for Selecting Crime Type -->
<div id="dropdown-container">
<br>
<label for="crimeTypeDropdown">Select Crime Type:</label>
<select id="crimeTypeDropdown">
<option value="Murder">Murder</option>
<option value="Arson">Arson</option>
<option value="Auto Theft">Auto Theft</option>
<option value="Robbery">Robbery</option>
</select>
</div>
<!-- Charts Container -->
<div class="dashboard">
<div class="charts-container">
<div class="chart-box">
<canvas id="barChart"></canvas>
</div>
</div>
</div>
<footer>
<p>Data sourced from NYC Open Data. Powered by Leaflet.js, Chart.js and D3.js</p>
</footer>
</body>
</html>