-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
148 lines (134 loc) · 5.16 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
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
140
141
142
143
144
145
146
147
148
<!DOCTYPE html>
<html>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" />
<link href="css/main.css" rel="stylesheet">
<script src="https://d3js.org/d3.v7.js"></script>
<script src="https://unpkg.com/d3fc@14.0.27/build/d3fc.js"></script>
<script src="js/lineChart.js"></script>
<script src="js/violinPlot.js"></script>
<script src="js/heatMap.js"></script>
<script src="js/trafficMap.js"></script>
<script src="js/piechart.js"></script>
<script src="js/main.js"></script>
<script src="js/innovativeChart.js"></script>
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'>
<head>
<title>Dashboard</title>
<meta charset="UTF-8">
</head>
<body>
<header>
<h1 class="text-center">Patterns of Life in Engagement, Ohio</h1>
<h3 class="text-center">Priyadharshini Amudan</h3>
</header>
<div class="chart-container">
<div class="fullchart">
<div class="chart-title">Increase of Balance Per Capita (%)</div>
<svg class="line-chart fullwidth" id="line-chart"></svg>
</div>
</div>
<div class="chart-container">
<div class="mapchart">
<div class="chart-title">City Heatmap</div>
<div class="containerHeatMap" style="width:100%; height:100%">
<div class="ms-5" style="width:80%; height:100%">
<svg class="map-chart" id="heatmap-svg" style="height: 100%;"></svg>
</div>
<div style="width:20%;height:100%;">
<div class="row">
<div class="form-check">
<input class="form-check-input" name="joviality" type="radio" id="id-joviality"
value="value-joviality" onchange="updateCheckboxValues(this.checked, this.id)" checked>
<label class="form-check-label" for="joviality">
Joviality
</label>
</div>
<div class="form-check">
<input class="form-check-input" name="educationLevel" type="radio" id="id-educationLevel"
value="value-educationLevel" onchange="updateCheckboxValues(this.checked, this.id)">
<label class="form-check-label" for="educationLevel">
Education Level
</label>
</div>
<div class="form-check">
<input class="form-check-input" name="cluster" type="radio" id="id-cluster"
value="value-cluster" onchange="updateCheckboxValues(this.checked, this.id)">
<label class="form-check-label" for="cluster">
Cluster
</label>
</div>
</div>
<div class="row mt-5 ">
<div id="area-legend" class="px-0"></div>
<svg id="heatmapLegend-svg" class="px-0"></svg>
</div>
</div>
</div>
</div>
<div class="mapchart">
<div class="chart-title">Traffic Density Map</div>
<svg class="map-chart ms-5" id="traffic-map" style="height: 100%;"></svg>
</div>
</div>
<div class="chart-container">
<div class="mapchart">
<div class="chart-title">Demographic Statistics</div>
<select id="selectMenu" class="form-select form-select-lg" style="width: 90%;" onchange="valueSelected()">
<option value="age">Age</option>
<option value="avg_rent">Average Rent</option>
<option value="monthly_income">Monthly Income</option>
</select>
<svg id="violin" class="small-chart"></svg>
</div>
<div class="mapchart" id="abc">
<div class="chart-title">Check-in Distribution</div>
<svg id="piechart" class="small-chart"></svg>
</div>
</div>
<div class="chart-container" style="height: 650px">
<div class="chart">
<div class="chart-title">Building Type Distribution</div>
<div class="chart-controls">
<div class="form-check">
<input type="checkbox" class="form-check-input" id="check1" name="area" value="0">
<label class="form-check-label" for="check1">Area 0</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="check2" name="area" value="1">
<label class="form-check-label" for="check2">Area 1</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="check2" name="area" value="2">
<label class="form-check-label" for="check3">Area 2</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="check3" name="area" value="3">
<label class="form-check-label" for="check4">Area 3</label>
</div>
<button id="store-selection" class="btn btn-primary mt-3">Choose Area</button>
</div>
<div class="lollipopchart map-chart"></div>
</div>
</div>
</div>
<script>
function responsivefy(svg) {
var container = d3.select(svg.node().parentNode),
width = parseInt(svg.style("width")) - 100,
height = parseInt(svg.style("height")),
aspect = width / height;
svg.attr("viewBox", "0 0 " + width + " " + height)
.attr("perserveAspectRatio", "xMinYMid")
.call(resize);
d3.select(window).on("resize." + container.attr("id"), resize);
function resize() {
var targetWidth = parseInt(container.style("width"));
svg.attr("width", targetWidth - 100);
svg.attr("height", Math.round(targetWidth / aspect));
}
}
</script>
</body>
</html>