-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
205 lines (175 loc) · 6.71 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Daniel Robinson - Designer & Data Analyst</title>
<style>
body, h1, h2, h3, p {
margin: 0;
padding: 0;
}
body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
color: #333;
margin: 0;
padding: 0;
background-image: url('Documents/Pictures/9DBFFCFA-A16C-4067-9811-27B818C049D1_1_105_c.jpeg');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;
text-align: center;
}
.overlay {
background: rgba(255, 255, 255, 0.9);
padding: 100px 0;
}
.container {
width: 90%;
max-width: 1200px;
margin: 0 auto;
padding: 40px;
}
header {
background: transparent;
color: #333;
padding: 20px 0;
}
.welcome {
padding: 40px 0;
}
.file-upload {
background-color: #f7f7f7;
padding: 20px;
margin: 20px 0;
border: 1px solid #ddd;
border-radius: 4px;
transition: all 0.3s ease;
}
.file-upload:hover {
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
cursor: pointer;
}
footer {
background: #333;
color: white;
padding: 20px 0;
bottom: 0;
width: 100%;
}
/* Simple animation */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.animated {
animation-name: fadeIn;
animation-duration: 2s;
}
</style>
</head>
<body>
<header class="animated">
<div class="container">
<h1>Daniel Robinson</h1>
<h2>Designer, Strategist, Data Analyst and Web Developer (Apparently haha) </h2>
</div>
</header>
<div class="overlay">
<div class="container animated">
<section class="welcome">
<h3>Welcome to my professional space</h3>
<p>Here you'll find my portfolio, thoughts, and a unique feature to clean up your data files.</p>
</section>
<section class="file-upload" onclick="alert('File upload feature coming soon!')">
<h3>File Clean-up Portal</h3>
<p>Click here to upload your file and get a cleaner version back!</p>
</section>
</div>
</div>
<footer class="animated">
<p>Copyright © 2023 Daniel Robinson</p>
</footer>
<script>
// Simple JavaScript for interaction
document.querySelector('.file-upload').addEventListener('click', function() {
// Placeholder for file upload functionality
alert('The file upload feature is not implemented yet.');
});
</script>
</body>
<head>
<title>D3.js Histogram</title>
<!-- Include D3.js -->
<script src="https://d3js.org/d3.v6.min.js"></script>
<!-- Optional: Include CSS for styling -->
<style>
/* Add your CSS styling here */
.bar { fill: steelblue; }
.bar:hover { fill: orange; }
.axis-label { font-size: 14px; }
</style>
</head>
<body>
<div id="tooltip" style="position: absolute; opacity: 0; background-color: lightgray; padding: 4px; border-radius: 4px;"></div>
<div id="histogram"></div>
<script>
document.addEventListener('DOMContentLoaded', function() {
var data = [28.0, 409.0, 1345.0, 162.0, 10704.0, 14109.0, 64.0, 9.0, 1494.0, 294.0, 13545.0, 35.0, 17.0, 5.0, 243.0, 16.0, 5456.0, 3685.0, 204.0, 17.0, 596.0, 7523.0, 17.0, 85.0, 200.0, 900748.0, 12594.0, 514.0, 408.0, 17.0, 13.0, 1116.0, 1530.0, 49.0, 2113.0, 8440.0, 14940.0, 35.0, 81.0, 1720.0, 7.0, 2057.0, 9330.0, 69758.0, 221.0, 104.0, 124772.0, 2053.0, 3.0, 833.0, 68.0, 2911.0, 255.0, 10912.0, 1993.0, 17494.0, 3386.0, 5235.0, 70592.0, 205.0, 66824.0, 78.0, 160.0, 943.0, 1423.0, 1104.0, 3730.0, 314.0, 855.0, 273.0, 237.0, 18.0, 54.0, 1852.0, 248.0, 183.0, 1.0, 1051.0, 41.0, 80.0, 28842.0, 2261.0, 1985.0, 145.0, 3720.0, 17.0, 486.0, 88.0, 18.0, 143.0, 1181.0, 41280.0, 6022.0, 104852.0, 264.0, 4624.0, 6022.0, 6.0, 43.0, 176.0, 507.0, 323.0, 758.0, 117.0, 2360.0, 1988.0, 2051.0, 30845.0, 578.0, 131.0, 19454.0, 31360.0, 193.0, 4089.0, 119.0, 11.0, 327.0, 12968.0, 156.0, 3691.0, 534.0, 54936.0, 133456.0, 219.0, 1961.0, 47.0, 59.0, 9.0];
// Define dimensions and margins for the graph
var margin = {top: 20, right: 20, bottom: 30, left: 40},
width = 960 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom;
// Set up the SVG element
var svg = d3.select("#histogram").append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
// Process data and create histogram
var x = d3.scaleLinear()
.domain([0, d3.max(data)])
.range([0, width]);
var histogram = d3.histogram()
.value(function(d) { return d; })
.domain(x.domain())
.thresholds(x.ticks(20));
var bins = histogram(data);
var y = d3.scaleLinear()
.domain([0, d3.max(bins, function(d) { return d.length; })])
.range([height, 0]);
var tooltip = d3.select("#tooltip");
// Append bars for histogram
svg.selectAll(".bar")
.data(bins)
.enter().append("rect")
.attr("class", "bar")
.attr("x", function(d) { return x(d.x0); })
.attr("y", function(d) { return y(d.length); })
.attr("width", x(bins[0].x1) - x(bins[0].x0) - 1)
.attr("height", function(d) { return height - y(d.length); })
.on("mouseover", function(event, d) {
tooltip.transition()
.duration(200)
.style("opacity", .9);
tooltip.html("Range: " + d.x0 + " - " + d.x1 + "<br/>Count: " + d.length)
.style("left", (event.pageX) + "px")
.style("top", (event.pageY - 28) + "px");
})
.on("mouseout", function(d) {
tooltip.transition()
.duration(500)
.style("opacity", 0);
});
// Add the X Axis
svg.append("g")
.attr("transform", "translate(0," + height + ")")
.call(d3.axisBottom(x));
// Add the Y Axis
svg.append("g")
.call(d3.axisLeft(y));
});
</script>
</body>
</html>